~lttng/lttng-modules/trunk

Viewing all changes in revision 1372.

  • Committer: Mathieu Desnoyers
  • Author(s): Francis Deslauriers
  • Date: 2020-08-05 19:30:41 UTC
  • Revision ID: git-v1:3cf55950d0f6aa43eb5ad119bad1dbda69f75a54
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

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: