Unverified Commit 3ade8167 by Stéphane Graber Committed by GitHub

Merge pull request #2975 from brauner/2019-05-04/returns_twice

compiler: add __returns_twice attribute
parents 0854538f 633cb8be
......@@ -59,6 +59,10 @@
# define __hot __attribute__((hot))
#endif
#ifndef __returns_twice
#define __returns_twice __attribute__((returns_twice))
#endif
#define __cgfsng_ops
#endif /* __LXC_COMPILER_H */
......@@ -9,6 +9,7 @@
#include <sys/syscall.h>
#include <unistd.h>
#include "compiler.h"
#include "config.h"
#include "macro.h"
#include "raw_syscalls.h"
......@@ -32,7 +33,7 @@ int lxc_raw_execveat(int dirfd, const char *pathname, char *const argv[],
* The nice thing about this is that we get fork() behavior. That is
* lxc_raw_clone() returns 0 in the child and the child pid in the parent.
*/
pid_t lxc_raw_clone(unsigned long flags)
__returns_twice pid_t lxc_raw_clone(unsigned long flags)
{
/*
* These flags don't interest at all so we don't jump through any hoops
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment