c11 safe string handling support
[vpp.git] / src / vnet / ipfix-export / flow_report_classify.c
index 8fb73fc..449bf22 100644 (file)
@@ -197,7 +197,7 @@ ipfix_classify_send_flows (flow_report_main_t * frm,
 
   t = pool_elt_at_index (vcm->tables, table->classify_table_index);
 
-  while (__sync_lock_test_and_set (t->writer_lock, 1))
+  while (clib_atomic_test_and_set (t->writer_lock))
     ;
 
   for (i = 0; i < t->nbuckets; i++)
@@ -385,7 +385,7 @@ flush:
       bi0 = ~0;
     }
 
-  *(t->writer_lock) = 0;
+  clib_atomic_release (t->writer_lock);
   return f;
 }
 
@@ -408,7 +408,7 @@ ipfix_classify_table_add_del_command_fn (vlib_main_t * vm,
   if (fcm->src_port == 0)
     clib_error_return (0, "call 'set ipfix classify stream' first");
 
-  memset (&args, 0, sizeof (args));
+  clib_memset (&args, 0, sizeof (args));
 
   while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
     {