aboutsummaryrefslogtreecommitdiffstats
path: root/doc/protocol
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-04-27 01:02:03 +0200
committerMattias Andrée <maandree@operamail.com>2015-04-27 01:02:03 +0200
commitb612067dc7e156cf4e0bc8d0ffd9e9cc4ba542eb (patch)
tree7ec619bd32864b1f28efe31289147946c379ab93 /doc/protocol
parentderp (diff)
downloadbus-b612067dc7e156cf4e0bc8d0ffd9e9cc4ba542eb.tar.gz
bus-b612067dc7e156cf4e0bc8d0ffd9e9cc4ba542eb.tar.bz2
bus-b612067dc7e156cf4e0bc8d0ffd9e9cc4ba542eb.tar.xz
improve error handling + patch possible race condition, abi and protocl breakage
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--doc/protocol41
1 files changed, 21 insertions, 20 deletions
diff --git a/doc/protocol b/doc/protocol
index bdff6ac..def8f6f 100644
--- a/doc/protocol
+++ b/doc/protocol
@@ -1,33 +1,34 @@
-init:
+create:
Select a filename.
- Create XSI semaphore array {S = 0, W = 0, X = 1 and Q = 0}
- with random key. Store the semaphore array's key in
- decimal form on the first line in the selected file.
+ Create XSI semaphore array {S = 0, W = 0, X = 1, Q = 0 and N = 0}
+ with random key. Store the semaphore array's key in decimal form
+ on the first line in the selected file.
- Create XSI shared memory, with an allocation of 2048 bytes,
- with a random key. Store the shared memory's key in
- decimal form on the second line in the selected file.
+ Create XSI shared memory, with an allocation of 2048 bytes, with a
+ random key. Store the shared memory's key in decimal form on the
+ second line in the selected file.
broadcast:
with P(X):
Z(W)
Write NUL-terminate message to shared memory
- Q := 0
- Z(S)
+ with V(N):
+ Q := 0
+ Z(S)
listen:
- V(S) with undo on exit
- forever:
- V(Q)
- Z(Q)
- Read NUL-terminated message from shared memory
- if breaking:
- P(S) with undo on exit
- break
- with V(W):
- with P(S):
- Z(S)
+ with V(S):
+ forever:
+ V(Q)
+ Z(Q)
+ Read NUL-terminated message from shared memory
+ if breaking:
+ break
+ with V(W):
+ with P(S):
+ Z(S)
+ Z(N)