aboutsummaryrefslogtreecommitdiffstats
path: root/src/svm/queue.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-10-17 10:38:51 -0400
committerDamjan Marion <dmarion@me.com>2018-10-23 13:06:46 +0000
commitb7b929931a07fbb27b43d5cd105f366c3e29807e (patch)
tree438681c89738802dbb5d339715b96ea2c31bafb4 /src/svm/queue.c
parentb9a4c445c1d4e9cdab476a8e1fb8a46ff0fc6080 (diff)
c11 safe string handling support
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/svm/queue.c')
-rw-r--r--src/svm/queue.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/svm/queue.c b/src/svm/queue.c
index 6a578fb4d6b..6972f14cd33 100644
--- a/src/svm/queue.c
+++ b/src/svm/queue.c
@@ -37,15 +37,15 @@ svm_queue_init (void *base, int nels, int elsize)
pthread_condattr_t cattr;
q = (svm_queue_t *) base;
- memset (q, 0, sizeof (*q));
+ clib_memset (q, 0, sizeof (*q));
q->elsize = elsize;
q->maxsize = nels;
q->producer_evtfd = -1;
q->consumer_evtfd = -1;
- memset (&attr, 0, sizeof (attr));
- memset (&cattr, 0, sizeof (cattr));
+ clib_memset (&attr, 0, sizeof (attr));
+ clib_memset (&cattr, 0, sizeof (cattr));
if (pthread_mutexattr_init (&attr))
clib_unix_warning ("mutexattr_init");
@@ -75,7 +75,7 @@ svm_queue_alloc_and_init (int nels, int elsize, int consumer_pid)
q = clib_mem_alloc_aligned (sizeof (svm_queue_t)
+ nels * elsize, CLIB_CACHE_LINE_BYTES);
- memset (q, 0, sizeof (*q));
+ clib_memset (q, 0, sizeof (*q));
q = svm_queue_init (q, nels, elsize);
q->consumer_pid = consumer_pid;