aboutsummaryrefslogtreecommitdiffstats
path: root/docs/syscall_descriptions_syntax.md
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-03-02 14:26:58 +0100
committerDmitry Vyukov <dvyukov@google.com>2018-03-05 12:10:27 +0100
commita339951e5f3c045290340330bcea3ff4155b8334 (patch)
treee7ec9a7d5379d2ef2bef4c682ed7873f7e725dbb /docs/syscall_descriptions_syntax.md
parent5110ff445ddb5a09a13e17b187c06d2dc3a7d52a (diff)
pkg/compiler: add size attribute for structs
The size attribute allows to pad a struct up to the specified size.
Diffstat (limited to 'docs/syscall_descriptions_syntax.md')
-rw-r--r--docs/syscall_descriptions_syntax.md13
1 files changed, 11 insertions, 2 deletions
diff --git a/docs/syscall_descriptions_syntax.md b/docs/syscall_descriptions_syntax.md
index 82de2f220..42a6439dd 100644
--- a/docs/syscall_descriptions_syntax.md
+++ b/docs/syscall_descriptions_syntax.md
@@ -102,10 +102,19 @@ Structs are described as:
```
structname "{" "\n"
(fieldname type "\n")+
-"}"
+"}" ("[" attribute* "]")?
```
-Structs can have trailing attributes `packed` and `align_N`, they are specified in square brackets after the struct.
+Structs can have attributes specified in square brackets after the struct.
+Attributes are:
+
+```
+"packed": the struct does not have paddings and has default alignment 1
+"align_N": the struct has alignment N
+"size": the struct is padded up to the specified size
+```
+
+attribute
## Unions