-static inline int
-svm_fifo_lock (svm_fifo_t * f, u32 pid, u32 tag, int nowait)
-{
- if (PREDICT_TRUE (nowait == 0))
- pthread_mutex_lock (&f->mutex);
- else
- {
- if (pthread_mutex_trylock (&f->mutex))
- return -1;
- }
- f->owner_pid = pid;
- f->tag = tag;
- return 0;
-}
-
-static inline void
-svm_fifo_unlock (svm_fifo_t * f)
-{
- f->owner_pid = 0;
- f->tag = 0;
- CLIB_MEMORY_BARRIER ();
- pthread_mutex_unlock (&f->mutex);
-}
-