]> git.ipfire.org Git - thirdparty/lxc.git/commit
compiler: add __returns_twice attribute 2975/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 4 May 2019 11:35:51 +0000 (13:35 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sat, 4 May 2019 11:35:51 +0000 (13:35 +0200)
commit633cb8bee31b0ce075adbe8a143f88f533605552
tree6c7a4c276190f097855ae8386fe9e641e33dfad3
parent5b94d538dd1e69fd690f7994036a070c2857ffc2
compiler: add __returns_twice attribute

The returns_twice attribute tells the compiler that a function may return more
than one time. The compiler will ensure that all registers are dead before
calling such a function and will emit a warning about the variables that may be
clobbered after the second return from the function. Examples of such functions
are setjmp and vfork. The longjmp-like counterpart of such function, if any,
might need to be marked with the noreturn attribute.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/compiler.h
src/lxc/raw_syscalls.c