syscalls: Make mmap()'s fields `prot` and `flags` enums
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 5 Jun 2020 15:38:14 +0000 (11:38 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 5 Aug 2020 19:30:41 +0000 (15:30 -0400)
commit3cf55950d0f6aa43eb5ad119bad1dbda69f75a54
tree1610936ed0e4df751f779661254b39d294367b0d
parent8c7f2a9f2732b11f5cc9798cecb621420cc0e972
syscalls: Make mmap()'s fields `prot` and `flags` enums

The `prot` flags is a simple CTF enumeration.

The `flags` field is a CTF struct of 2 CTF enumerations (`type` and
`options`). This is needed to express the two parts of this integer
flag. The 4 least significant bits of the integer are reserved to
express the type of the mapping (MAP_SHARED=0x1, MAP_PRIVATE=0x2, and
MAP_SHARED_VALIDATE=0x3).

The remaining 28 bits are used to specify optional configurations on the
mapping. As opposed to the type part, the options part is bit flag
field where all values are power of 2. This part can be expressed as
ORed bit flag values.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I5ae78754b5863b31d9a3ba1b1173502e1ae284d3
include/instrumentation/syscalls/headers/syscalls_integers_override.h
src/lttng-syscalls.c
This page took 0.025472 seconds and 4 git commands to generate.