X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fsvm%2Ftest_svm_message_queue.c;h=84719e6db82b2759cb30a171ee14d5d4dcad8727;hb=c5df8c71c;hp=69ffd131ac2a5b071f353320c46f807895f967a2;hpb=65784c1602c7c8171effd00384f65f546d93a13b;p=vpp.git diff --git a/src/svm/test_svm_message_queue.c b/src/svm/test_svm_message_queue.c index 69ffd131ac2..84719e6db82 100644 --- a/src/svm/test_svm_message_queue.c +++ b/src/svm/test_svm_message_queue.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 Cisco and/or its affiliates. + * Copyright (c) 2018-2019 Cisco and/or its affiliates. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: @@ -35,7 +35,7 @@ test1 (int verbose) void *oldheap; int i; - memset (ssvm, 0, sizeof (*ssvm)); + clib_memset (ssvm, 0, sizeof (*ssvm)); ssvm->ssvm_size = 1 << 20; ssvm->i_am_master = 1; @@ -88,9 +88,9 @@ test1 (int verbose) test1_error ("failed: msg alloc3"); *(u32 *)svm_msg_q_msg_data (mq, &msg2) = 123; - svm_msg_q_add (mq, msg2, SVM_Q_NOWAIT); + svm_msg_q_add (mq, &msg2, SVM_Q_NOWAIT); for (i = 0; i < 12; i++) - svm_msg_q_add (mq, msg[i], SVM_Q_NOWAIT); + svm_msg_q_add (mq, &msg[i], SVM_Q_NOWAIT); if (svm_msg_q_sub (mq, &msg2, SVM_Q_NOWAIT, 0)) test1_error ("failed: dequeue1"); @@ -169,6 +169,7 @@ main (int argc, char *argv[]) unformat_input_t i; int r; + clib_mem_init_thread_safe (0, 256 << 20); unformat_init_command_line (&i, argv); r = test_svm_message_queue (&i); unformat_free (&i);