2 * This model describes the interaction between ctx->notify_me
5 * Author: Paolo Bonzini <pbonzini@redhat.com>
7 * This file is in the public domain. If you really want a license,
11 * spin -p docs/aio_notify.promela
14 * spin -a docs/aio_notify.promela
18 * To verify it (with a bug planted in the model):
19 * spin -a -DBUG docs/aio_notify.promela
25 #define LAST (1 << (MAX - 1))
26 #define FINAL ((LAST << 1) - 1)
34 active proctype waiter()
47 // Wait for a nudge from the other side
49 :: event == 1 -> { event = 0; break; }
55 atomic { fetch = req; req = 0; }
61 active proctype notifier()
73 :: notify_me == 1 -> event = 1;
74 :: else -> printf("Skipped event_notifier_set\n"); skip;
77 // Test both synchronous and asynchronous delivery
88 never { /* [] done < FINAL */
91 :: done < FINAL -> skip;