Skip to content
Snippets Groups Projects
Commit d54c3e6b authored by Vijay Pai's avatar Vijay Pai
Browse files

clang-format changed files

parent d6cc1814
Branches
Tags
No related merge requests found
...@@ -65,7 +65,8 @@ typedef union lockfree_node { ...@@ -65,7 +65,8 @@ typedef union lockfree_node {
} lockfree_node; } lockfree_node;
#define ENTRY_ALIGNMENT_BITS 3 /* make sure that entries aligned to 8-bytes */ #define ENTRY_ALIGNMENT_BITS 3 /* make sure that entries aligned to 8-bytes */
#define INVALID_ENTRY_INDEX ((1<<16)-1) /* reserve this entry as invalid */ #define INVALID_ENTRY_INDEX ((1 << 16) - 1) /* reserve this entry as invalid \
*/
struct gpr_stack_lockfree { struct gpr_stack_lockfree {
lockfree_node *entries; lockfree_node *entries;
...@@ -109,8 +110,7 @@ void gpr_stack_lockfree_push(gpr_stack_lockfree *stack, int entry) { ...@@ -109,8 +110,7 @@ void gpr_stack_lockfree_push(gpr_stack_lockfree *stack, int entry) {
head.atm = gpr_atm_no_barrier_load(&(stack->head.atm)); head.atm = gpr_atm_no_barrier_load(&(stack->head.atm));
/* Point to it */ /* Point to it */
stack->entries[entry].contents.index = head.contents.index; stack->entries[entry].contents.index = head.contents.index;
} while (!gpr_atm_rel_cas(&(stack->head.atm), } while (!gpr_atm_rel_cas(&(stack->head.atm), head.atm, newhead.atm));
head.atm, newhead.atm));
/* Use rel_cas above to make sure that entry index is set properly */ /* Use rel_cas above to make sure that entry index is set properly */
} }
...@@ -125,8 +125,6 @@ int gpr_stack_lockfree_pop(gpr_stack_lockfree *stack) { ...@@ -125,8 +125,6 @@ int gpr_stack_lockfree_pop(gpr_stack_lockfree *stack) {
newhead.atm = newhead.atm =
gpr_atm_no_barrier_load(&(stack->entries[head.contents.index].atm)); gpr_atm_no_barrier_load(&(stack->entries[head.contents.index].atm));
} while (!gpr_atm_no_barrier_cas(&(stack->head.atm), } while (!gpr_atm_no_barrier_cas(&(stack->head.atm), head.atm, newhead.atm));
head.atm,
newhead.atm));
return head.contents.index; return head.contents.index;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment