From 810241190102eaf849f5744ca7eeb68ad34f01d7 Mon Sep 17 00:00:00 2001 From: Florent Revest Date: Tue, 4 Jul 2023 17:59:04 +0200 Subject: pkg/csource: annotate syscall() args with their pretty-printed values This factorizes const arguments into the shortest flags OR bitmask possible so they are easy to read. E.g: /*flags=MAP_FIXED|MAP_ANONYMOUS|MAP_PRIVATE*/ 0x32ul --- sys/test/csource.txt | 3 +++ sys/test/csource.txt.const | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 sys/test/csource.txt.const (limited to 'sys') diff --git a/sys/test/csource.txt b/sys/test/csource.txt index 1f524da89..4efdebb2f 100644 --- a/sys/test/csource.txt +++ b/sys/test/csource.txt @@ -5,6 +5,8 @@ resource fd0[int32] +bitmask = BIT_0, BIT_1, BIT_0_AND_1 + csource0(num int32) fd0 csource1(fd fd0) csource2(buf ptr[in, array[int8]]) @@ -12,3 +14,4 @@ csource3(buf ptr[in, array[const[0, int8], 10]]) csource4(buf ptr[in, array[const[0x30, int8], 10]]) csource5(buf ptr[in, array[const[0x3130, int16], 5]]) csource6(buf ptr[in, array[const[0x3130, int16be], 6]]) +csource7(flag flags[bitmask]) diff --git a/sys/test/csource.txt.const b/sys/test/csource.txt.const new file mode 100644 index 000000000..2c90daac7 --- /dev/null +++ b/sys/test/csource.txt.const @@ -0,0 +1,4 @@ +arches = 32_fork_shmem, 32_shmem, 64, 64_fork +BIT_0 = 1 +BIT_1 = 2 +BIT_0_AND_1 = 3 -- cgit mrf-deployment