Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
./pan -a -v -c1 -X -m1000000 -w19
run_weak_fair: pan_fair
- ./pan_fair -a -f -v -c1 -X -m1000000 -w20
+ ./pan_fair -a -v -c1 -X -m1000000 -w20
+ #fairness
+ #./pan_fair -a -f -v -c1 -X -m1000000 -w20
pan_fair: pan_fair.c
gcc -w ${CFLAGS} -DNFAIR=4 -o pan_fair pan_fair.c
#define need_pause() (_pid == 2)
+/*
+ * do_pause() disabled:
+ * get similar effect by disabling weak fairness.
+ */
/*
* Test weak fairness by either not pausing or cycling for any number of
* steps, or forever.
do
:: 1 ->
- do_pause();
+progress_B:
+ //do_pause();
spin_lock(lock, ticket);
refcount = refcount + 1;
- do_pause();
+ //do_pause();
refcount = refcount - 1;
spin_unlock(lock);
od;