11 #include "int_typedefs.h"
19 #include "workqueues.h"
21 #include <linux/srcu.h>
23 /* Functions needed from modify_srcu.c */
24 bool try_check_zero(struct srcu_struct *sp, int idx, int trycount);
25 void srcu_flip(struct srcu_struct *sp);
27 /* Simpler implementation of synchronize_srcu that ignores batching. */
28 void synchronize_srcu(struct srcu_struct *sp)
32 * This code assumes that try_check_zero will succeed anyway,
33 * so there is no point in multiple tries.
35 const int trycount = 1;
39 /* Ignore the lock, as multiple writers aren't working yet anyway. */
41 idx = 1 ^ (sp->completed & 1);
43 /* For comments see srcu_advance_batches. */
45 assume(try_check_zero(sp, idx, trycount));
49 assume(try_check_zero(sp, idx^1, trycount));