|
|
|
@ -39,12 +39,12 @@ typedef struct gpr_stack_lockfree gpr_stack_lockfree; |
|
|
|
|
/* This stack must specify the maximum number of entries to track.
|
|
|
|
|
The current implementation only allows up to 65534 entries */ |
|
|
|
|
gpr_stack_lockfree *gpr_stack_lockfree_create(int entries); |
|
|
|
|
void gpr_stack_lockfree_destroy(gpr_stack_lockfree *); |
|
|
|
|
void gpr_stack_lockfree_destroy(gpr_stack_lockfree* stack); |
|
|
|
|
|
|
|
|
|
/* Pass in a valid entry number for the next stack entry */ |
|
|
|
|
void gpr_stack_lockfree_push(gpr_stack_lockfree *, int entry); |
|
|
|
|
void gpr_stack_lockfree_push(gpr_stack_lockfree* stack, int entry); |
|
|
|
|
|
|
|
|
|
/* Returns -1 on empty or the actual entry number */ |
|
|
|
|
int gpr_stack_lockfree_pop(gpr_stack_lockfree *); |
|
|
|
|
int gpr_stack_lockfree_pop(gpr_stack_lockfree* stack); |
|
|
|
|
|
|
|
|
|
#endif /* GRPC_INTERNAL_CORE_SUPPORT_STACK_LOCKFREE_H */ |
|
|
|
|