X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=urcu%2Fstatic%2Fwfstack.h;fp=urcu%2Fstatic%2Fwfstack.h;h=cb68a59a16d8dc270355d1b6b29506d2120c812f;hp=79ed3f774446e042de152ed7c04a7a43cf5aa65b;hb=191098fce0abcec4713428d402c9a892fe79bb77;hpb=e1a3b81e201ccfd019dae3778bd6ba0bd1e545e4 diff --git a/urcu/static/wfstack.h b/urcu/static/wfstack.h index 79ed3f7..cb68a59 100644 --- a/urcu/static/wfstack.h +++ b/urcu/static/wfstack.h @@ -56,8 +56,11 @@ void _cds_wfs_init(struct cds_wfs_stack *s) assert(!ret); } +/* + * Returns 0 if stack was empty, 1 otherwise. + */ static inline -void _cds_wfs_push(struct cds_wfs_stack *s, struct cds_wfs_node *node) +int _cds_wfs_push(struct cds_wfs_stack *s, struct cds_wfs_node *node) { struct cds_wfs_node *old_head; @@ -72,6 +75,7 @@ void _cds_wfs_push(struct cds_wfs_stack *s, struct cds_wfs_node *node) * until node->next is set to old_head. */ CMM_STORE_SHARED(node->next, old_head); + return (old_head != CDS_WF_STACK_END); } /*