session: first approximation implementation of tls
[vpp.git] / src / svm / svm_fifo.h
index f10b4d9..0d85951 100644 (file)
@@ -75,7 +75,8 @@ typedef struct _svm_fifo
 #if SVM_FIFO_TRACE
   svm_fifo_trace_elem_t *trace;
 #endif
-  i8 refcnt;
+  u32 freelist_index;          /**< aka log2(allocated_size) - const. */
+  i8 refcnt;                   /**< reference count  */
     CLIB_CACHE_LINE_ALIGN_MARK (data);
 } svm_fifo_t;
 
@@ -139,7 +140,7 @@ svm_fifo_t *svm_fifo_create (u32 data_size_in_bytes);
 void svm_fifo_free (svm_fifo_t * f);
 
 int svm_fifo_enqueue_nowait (svm_fifo_t * f, u32 max_bytes,
-                            u8 * copy_from_here);
+                            const u8 * copy_from_here);
 int svm_fifo_enqueue_with_offset (svm_fifo_t * f, u32 offset,
                                  u32 required_bytes, u8 * copy_from_here);
 int svm_fifo_dequeue_nowait (svm_fifo_t * f, u32 max_bytes, u8 * copy_here);