X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Frmr%2Fcommon%2Finclude%2Frmr_agnostic.h;fp=src%2Frmr%2Fcommon%2Finclude%2Frmr_agnostic.h;h=31e2c4da7b279c495541ff18e394000ae70a127e;hb=ce1c741c01e8387cb095dac5e36a4d8ad91d006d;hp=ab718d3d896c16a976cf0f97f0aa3ab90a30ed06;hpb=d324fe4bfea9daa22aa16c605bd3157a875a8ccd;p=ric-plt%2Flib%2Frmr.git diff --git a/src/rmr/common/include/rmr_agnostic.h b/src/rmr/common/include/rmr_agnostic.h index ab718d3..31e2c4d 100644 --- a/src/rmr/common/include/rmr_agnostic.h +++ b/src/rmr/common/include/rmr_agnostic.h @@ -258,6 +258,10 @@ typedef struct { #define RING_NONE 0 // no options #define RING_RLOCK 0x01 // create/destroy the read lock on the ring #define RING_WLOCK 0x02 // create/destroy the write lockk on the ring +#define RING_FRLOCK 0x04 // read locking with no wait if locked option + + // flag values +#define RING_FL_FLOCK 0x01 // fast read lock (don't wait if locked when reading) typedef struct ring { uint16_t head; // index of the head of the ring (insert point) @@ -265,6 +269,7 @@ typedef struct ring { uint16_t nelements; // number of elements in the ring void** data; // the ring data (pointers to blobs of stuff) int pfd; // event fd for the ring for epoll + int flags; // RING_FL_* constants pthread_mutex_t* rgate; // read lock if used pthread_mutex_t* wgate; // write lock if used } ring_t;