X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=urcu%2Fstatic%2Fwfstack.h;h=79ed3f774446e042de152ed7c04a7a43cf5aa65b;hb=bc2433a9853a945a825c244e9ccfe341b73b2ceb;hp=ff18c4a3f213214188ef6bfe6f6c98a795132bab;hpb=af7c2dbeac32c663b64ad05e4eca70e18784463b;p=urcu.git diff --git a/urcu/static/wfstack.h b/urcu/static/wfstack.h index ff18c4a..79ed3f7 100644 --- a/urcu/static/wfstack.h +++ b/urcu/static/wfstack.h @@ -30,7 +30,7 @@ #include #include #include -#include +#include #ifdef __cplusplus extern "C" { @@ -40,11 +40,13 @@ extern "C" { #define CDS_WFS_ADAPT_ATTEMPTS 10 /* Retry if being set */ #define CDS_WFS_WAIT 10 /* Wait 10 ms if being set */ +static inline void _cds_wfs_node_init(struct cds_wfs_node *node) { node->next = NULL; } +static inline void _cds_wfs_init(struct cds_wfs_stack *s) { int ret; @@ -54,6 +56,7 @@ void _cds_wfs_init(struct cds_wfs_stack *s) assert(!ret); } +static inline void _cds_wfs_push(struct cds_wfs_stack *s, struct cds_wfs_node *node) { struct cds_wfs_node *old_head; @@ -74,6 +77,7 @@ void _cds_wfs_push(struct cds_wfs_stack *s, struct cds_wfs_node *node) /* * Returns NULL if stack is empty. */ +static inline struct cds_wfs_node * ___cds_wfs_pop_blocking(struct cds_wfs_stack *s) { @@ -100,6 +104,7 @@ retry: goto retry; /* Concurrent modification. Retry. */ } +static inline struct cds_wfs_node * _cds_wfs_pop_blocking(struct cds_wfs_stack *s) {