Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
TCP cc/window management fixes and debugging
[vpp.git]
/
src
/
svm
/
svm_fifo.h
diff --git
a/src/svm/svm_fifo.h
b/src/svm/svm_fifo.h
index
3955617
..
80e5b0f
100644
(file)
--- a/
src/svm/svm_fifo.h
+++ b/
src/svm/svm_fifo.h
@@
-44,14
+44,16
@@
typedef struct
typedef struct
{
typedef struct
{
+ volatile u32 cursize; /**< current fifo size */
+ u32 nitems;
+ CLIB_CACHE_LINE_ALIGN_MARK (end_cursize);
+
pthread_mutex_t mutex; /* 8 bytes */
pthread_cond_t condvar; /* 8 bytes */
svm_lock_tag_t tag;
pthread_mutex_t mutex; /* 8 bytes */
pthread_cond_t condvar; /* 8 bytes */
svm_lock_tag_t tag;
- volatile u32 cursize; /**< current fifo size */
volatile u8 has_event; /**< non-zero if deq event exists */
u32 owner_pid;
volatile u8 has_event; /**< non-zero if deq event exists */
u32 owner_pid;
- u32 nitems;
/* Backpointers */
u32 server_session_index;
/* Backpointers */
u32 server_session_index;
@@
-105,7
+107,7
@@
svm_fifo_max_dequeue (svm_fifo_t * f)
static inline u32
svm_fifo_max_enqueue (svm_fifo_t * f)
{
static inline u32
svm_fifo_max_enqueue (svm_fifo_t * f)
{
- return f->nitems -
f->cursize
;
+ return f->nitems -
svm_fifo_max_dequeue (f)
;
}
static inline u8
}
static inline u8