diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-03-28 11:31:26 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-03-29 18:25:49 -0600 |
commit | 9096e2d9cb6f438e49aa29aa2cfaef1717466a05 (patch) | |
tree | 3ecce9bac17d3a4b89b11f1df281c0587d4443d4 /lib9p/idl/1992-9P0.9p.wip | |
parent | fc462d13cb2f49b4c4745742dfaed994596a54b8 (diff) |
lib9p: idl: Rework bitfields, allow full exprs more places
Diffstat (limited to 'lib9p/idl/1992-9P0.9p.wip')
-rw-r--r-- | lib9p/idl/1992-9P0.9p.wip | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lib9p/idl/1992-9P0.9p.wip b/lib9p/idl/1992-9P0.9p.wip index 360f320..a434ba2 100644 --- a/lib9p/idl/1992-9P0.9p.wip +++ b/lib9p/idl/1992-9P0.9p.wip @@ -37,8 +37,8 @@ struct errstr = "64*(txt[1])" # "O"pen flags (flags to pass to Topen and Tcreate) # Unused bits are *ignored*. bitfield o = 1 - "bit 0=subfield(mode)" # low bit of the 2-bit READ/WRITE/RDWR/EXEC enum - "bit 1=subfield(mode)" # high bit of the 2-bit READ/WRITE/RDWR/EXEC enum + "bit 0=num(MODE)" # low bit of the 2-bit READ/WRITE/RDWR/EXEC enum + "bit 1=num(MODE)" # high bit of the 2-bit READ/WRITE/RDWR/EXEC enum #"bit 2=unused" #"bit 3=unused" "bit 4=TRUNC" @@ -46,13 +46,12 @@ bitfield o = 1 "bit 6=RCLOSE" # remove-on-close #"bit 7=unused" - "alias READ = 0" # make available for this FID: Tread() - "alias WRITE = 1" # make available for this FID: Twrite() - "alias RDWR = 2" # make available for this FID: Tread() and Twrite() - "alias EXEC = 3" # make available for this FID: Tread() + "num(MODE) READ = 0" # make available for this FID: Tread() + "num(MODE) WRITE = 1" # make available for this FID: Twrite() + "num(MODE) RDWR = 2" # make available for this FID: Tread() and Twrite() + "num(MODE) EXEC = 3" # make available for this FID: Tread() - "alias MODE_MASK = 0b00000011" - "alias FLAG_MASK = 0b11111100" + "mask FLAG = 0b11111100" # "CH"annel flags - file permissions and attributes (a "channel" is # what a file handle is called inside of the Plan 9 kernel). @@ -71,7 +70,7 @@ bitfield ch = 4 "bit 1=OTHER_W" "bit 0=OTHER_X" - "alias PERM_MASK=0777" # {OWNER,GROUP,OTHER}_{R,W,X} + "mask PERM=0777" # {OWNER,GROUP,OTHER}_{R,W,X} struct stat = "file_name[name]" "file_owner[name]" |