Confirmed users
699
edits
mNo edit summary |
|||
| Line 3: | Line 3: | ||
New syntax | New syntax | ||
['[' access access ']'] Shmem | ['[' access, access ']'] Shmem | ||
|access| can be one of | |access| can be one of | ||
| Line 20: | Line 20: | ||
The second |access| specifier refers to the ''other side's'' shmem access after ''receiving'' the Shmem in a message. So |+w| would mean that the other side is granted write privileges. | The second |access| specifier refers to the ''other side's'' shmem access after ''receiving'' the Shmem in a message. So |+w| would mean that the other side is granted write privileges. | ||
Fine-grained access change is optional. If no access change is specified, then it defaults to |[-r-w +r+w]|, which is what is currently implemented. | Fine-grained access change is optional. If no access change is specified, then it defaults to |[-r-w, +r+w]|, which is what is currently implemented. | ||
An actor may take away particular access from itself without granting it to the other actor. This could be called a "reserved" right. The actor may later grant it to the other actor, or grant it to itself. For example | An actor may take away particular access from itself without granting it to the other actor. This could be called a "reserved" right. The actor may later grant it to the other actor, or grant it to itself. For example | ||
[-w +r] Shmem | [-w, +r] Shmem | ||
// reserve write access for myself, but only grant read access to the other actor | // reserve write access for myself, but only grant read access to the other actor | ||
| Line 41: | Line 41: | ||
sync protocol PDrawWindow { | sync protocol PDrawWindow { | ||
child: | child: | ||
Init([-w +r ] Shmem[] front, | Init([-w, +r ] Shmem[] front, | ||
[-r-w +r+w] Shmem[] back); | [-r-w, +r+w] Shmem[] back); | ||
parent: | parent: | ||
sync Drew([-r +r ] Shmem[] dirtyFronts, | sync Drew([-r, +r ] Shmem[] dirtyFronts, | ||
[-r-w +r+w] Shmem[] dirtyBacks, | [-r-w, +r+w] Shmem[] dirtyBacks, | ||
DirtyRects[] damage, | DirtyRects[] damage, | ||
...) | ...) | ||
returns ([-r-w +r+w] Shmem[] newBacks, | returns ([-r-w, +r+w] Shmem[] newBacks, | ||
[-w +r ] Shmem[] newFronts, | [-w, +r ] Shmem[] newFronts, | ||
...); | ...); | ||