proctype urcu_updater()
{
+ /* prior synchronize_rcu(), second counter flip. */
+ need_mb = 1;
+ do
+ :: need_mb == 1 -> skip;
+ :: need_mb == 0 -> break;
+ od;
+ urcu_gp_ctr = urcu_gp_ctr + RCU_GP_CTR_BIT;
+ need_mb = 1;
+ do
+ :: need_mb == 1 -> skip;
+ :: need_mb == 0 -> break;
+ od;
+ do
+ :: 1 ->
+ if
+ :: (urcu_active_readers & RCU_GP_CTR_NEST_MASK) != 0 &&
+ (urcu_active_readers & ~RCU_GP_CTR_NEST_MASK) !=
+ (urcu_gp_ctr & ~RCU_GP_CTR_NEST_MASK) ->
+ skip;
+ :: else -> break;
+ fi;
+ od;
+ need_mb = 1;
+ do
+ :: need_mb == 1 -> skip;
+ :: need_mb == 0 -> break;
+ od;
+
/* Removal statement, e.g., list_del_rcu(). */
removed = 1;
- /* synchronize_rcu(), first counter flip. */
+ /* current synchronize_rcu(), first counter flip. */
need_mb = 1;
do
:: need_mb == 1 -> skip;
od;
do
:: 1 ->
- printf("urcu_gp_ctr=%x urcu_active_readers=%x\n", urcu_gp_ctr, urcu_active_readers);
- printf("urcu_gp_ctr&0x7f=%x urcu_active_readers&0x7f=%x\n", urcu_gp_ctr & ~RCU_GP_CTR_NEST_MASK, urcu_active_readers & ~RCU_GP_CTR_NEST_MASK);
if
:: (urcu_active_readers & RCU_GP_CTR_NEST_MASK) != 0 &&
(urcu_active_readers & ~RCU_GP_CTR_NEST_MASK) !=
(urcu_gp_ctr & ~RCU_GP_CTR_NEST_MASK) ->
skip;
:: else -> break;
- fi
+ fi;
od;
need_mb = 1;
do
:: need_mb == 0 -> break;
od;
- /* Erroneous removal statement, e.g., list_del_rcu(). */
- /* removed = 1; */
-
- /* synchronize_rcu(), second counter flip. */
+ /* current synchronize_rcu(), second counter flip. */
need_mb = 1;
do
:: need_mb == 1 -> skip;
od;
do
:: 1 ->
- printf("urcu_gp_ctr=%x urcu_active_readers=%x\n", urcu_gp_ctr, urcu_active_readers);
- printf("urcu_gp_ctr&0x7f=%x urcu_active_readers&0x7f=%x\n", urcu_gp_ctr & ~RCU_GP_CTR_NEST_MASK, urcu_active_readers & ~RCU_GP_CTR_NEST_MASK);
if
:: (urcu_active_readers & RCU_GP_CTR_NEST_MASK) != 0 &&
(urcu_active_readers & ~RCU_GP_CTR_NEST_MASK) !=