Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
0a886c56
Unverified
Commit
0a886c56
authored
Oct 03, 2018
by
Wolfgang Bumiller
Committed by
GitHub
Oct 03, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2671 from brauner/2018-10-03/syscall_wrappers
syscalls: move wrappers and raw syscalls to appropriate files
parents
15418afe
07a50156
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
212 additions
and
197 deletions
+212
-197
Makefile.am
src/lxc/Makefile.am
+3
-1
attach.c
src/lxc/attach.c
+1
-0
lxc_user_nic.c
src/lxc/cmd/lxc_user_nic.c
+1
-0
lxc_usernsexec.c
src/lxc/cmd/lxc_usernsexec.c
+1
-0
criu.c
src/lxc/criu.c
+1
-0
lxccontainer.c
src/lxc/lxccontainer.c
+1
-0
network.c
src/lxc/network.c
+1
-0
raw_syscalls.h
src/lxc/raw_syscalls.h
+9
-0
ringbuf.c
src/lxc/ringbuf.c
+1
-0
start.c
src/lxc/start.c
+1
-0
nbd.c
src/lxc/storage/nbd.c
+1
-0
rsync.c
src/lxc/storage/rsync.c
+1
-0
storage_utils.c
src/lxc/storage/storage_utils.c
+1
-0
syscall_wrappers.h
src/lxc/syscall_wrappers.h
+188
-0
terminal.c
src/lxc/terminal.c
+1
-0
utils.h
src/lxc/utils.h
+0
-196
No files found.
src/lxc/Makefile.am
View file @
0a886c56
...
@@ -360,7 +360,8 @@ lxc_user_nic_SOURCES = cmd/lxc_user_nic.c \
...
@@ -360,7 +360,8 @@ lxc_user_nic_SOURCES = cmd/lxc_user_nic.c \
log.c log.h
\
log.c log.h
\
network.c network.h
\
network.c network.h
\
parse.c parse.h
\
parse.c parse.h
\
raw_syscalls.c raw_syscalls.h
raw_syscalls.c raw_syscalls.h
\
syscall_wrappers.h
lxc_usernsexec_SOURCES
=
cmd/lxc_usernsexec.c
\
lxc_usernsexec_SOURCES
=
cmd/lxc_usernsexec.c
\
conf.c conf.h
\
conf.c conf.h
\
list.h
\
list.h
\
...
@@ -368,6 +369,7 @@ lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c \
...
@@ -368,6 +369,7 @@ lxc_usernsexec_SOURCES = cmd/lxc_usernsexec.c \
macro.h
\
macro.h
\
file_utils.c file_utils.h
\
file_utils.c file_utils.h
\
string_utils.c string_utils.h
\
string_utils.c string_utils.h
\
syscall_wrappers.h
\
utils.c utils.h
utils.c utils.h
endif
endif
...
...
src/lxc/attach.c
View file @
0a886c56
...
@@ -60,6 +60,7 @@
...
@@ -60,6 +60,7 @@
#include "mainloop.h"
#include "mainloop.h"
#include "namespace.h"
#include "namespace.h"
#include "raw_syscalls.h"
#include "raw_syscalls.h"
#include "syscall_wrappers.h"
#include "terminal.h"
#include "terminal.h"
#include "utils.h"
#include "utils.h"
...
...
src/lxc/cmd/lxc_user_nic.c
View file @
0a886c56
...
@@ -52,6 +52,7 @@
...
@@ -52,6 +52,7 @@
#include "network.h"
#include "network.h"
#include "parse.h"
#include "parse.h"
#include "raw_syscalls.h"
#include "raw_syscalls.h"
#include "syscall_wrappers.h"
#include "utils.h"
#include "utils.h"
#ifndef HAVE_STRLCPY
#ifndef HAVE_STRLCPY
...
...
src/lxc/cmd/lxc_usernsexec.c
View file @
0a886c56
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
#include "macro.h"
#include "macro.h"
#include "file_utils.h"
#include "file_utils.h"
#include "string_utils.h"
#include "string_utils.h"
#include "syscall_wrappers.h"
#include "utils.h"
#include "utils.h"
extern
int
lxc_log_fd
;
extern
int
lxc_log_fd
;
...
...
src/lxc/criu.c
View file @
0a886c56
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
#include "lxclock.h"
#include "lxclock.h"
#include "network.h"
#include "network.h"
#include "storage.h"
#include "storage.h"
#include "syscall_wrappers.h"
#include "utils.h"
#include "utils.h"
#if IS_BIONIC
#if IS_BIONIC
...
...
src/lxc/lxccontainer.c
View file @
0a886c56
...
@@ -73,6 +73,7 @@
...
@@ -73,6 +73,7 @@
#include "storage/overlay.h"
#include "storage/overlay.h"
#include "storage_utils.h"
#include "storage_utils.h"
#include "sync.h"
#include "sync.h"
#include "syscall_wrappers.h"
#include "terminal.h"
#include "terminal.h"
#include "utils.h"
#include "utils.h"
#include "version.h"
#include "version.h"
...
...
src/lxc/network.c
View file @
0a886c56
...
@@ -57,6 +57,7 @@
...
@@ -57,6 +57,7 @@
#include "network.h"
#include "network.h"
#include "nl.h"
#include "nl.h"
#include "raw_syscalls.h"
#include "raw_syscalls.h"
#include "syscall_wrappers.h"
#include "utils.h"
#include "utils.h"
#ifndef HAVE_STRLCPY
#ifndef HAVE_STRLCPY
...
...
src/lxc/raw_syscalls.h
View file @
0a886c56
...
@@ -83,4 +83,13 @@ static inline pid_t lxc_raw_getpid(void)
...
@@ -83,4 +83,13 @@ static inline pid_t lxc_raw_getpid(void)
return
(
pid_t
)
syscall
(
SYS_getpid
);
return
(
pid_t
)
syscall
(
SYS_getpid
);
}
}
static
inline
pid_t
lxc_raw_gettid
(
void
)
{
#ifdef __NR_gettid
return
syscall
(
__NR_gettid
);
#else
return
lxc_raw_getpid
();
#endif
}
#endif
/* __LXC_RAW_SYSCALL_H */
#endif
/* __LXC_RAW_SYSCALL_H */
src/lxc/ringbuf.c
View file @
0a886c56
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include "config.h"
#include "config.h"
#include "ringbuf.h"
#include "ringbuf.h"
#include "syscall_wrappers.h"
#include "utils.h"
#include "utils.h"
int
lxc_ringbuf_create
(
struct
lxc_ringbuf
*
buf
,
size_t
size
)
int
lxc_ringbuf_create
(
struct
lxc_ringbuf
*
buf
,
size_t
size
)
...
...
src/lxc/start.c
View file @
0a886c56
...
@@ -75,6 +75,7 @@
...
@@ -75,6 +75,7 @@
#include "storage/storage.h"
#include "storage/storage.h"
#include "storage/storage_utils.h"
#include "storage/storage_utils.h"
#include "sync.h"
#include "sync.h"
#include "syscall_wrappers.h"
#include "terminal.h"
#include "terminal.h"
#include "utils.h"
#include "utils.h"
...
...
src/lxc/storage/nbd.c
View file @
0a886c56
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#include "nbd.h"
#include "nbd.h"
#include "storage.h"
#include "storage.h"
#include "storage_utils.h"
#include "storage_utils.h"
#include "syscall_wrappers.h"
#include "utils.h"
#include "utils.h"
#ifndef HAVE_STRLCPY
#ifndef HAVE_STRLCPY
...
...
src/lxc/storage/rsync.c
View file @
0a886c56
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#include "log.h"
#include "log.h"
#include "rsync.h"
#include "rsync.h"
#include "storage.h"
#include "storage.h"
#include "syscall_wrappers.h"
#include "utils.h"
#include "utils.h"
lxc_log_define
(
rsync
,
lxc
);
lxc_log_define
(
rsync
,
lxc
);
...
...
src/lxc/storage/storage_utils.c
View file @
0a886c56
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
#include "parse.h"
#include "parse.h"
#include "storage.h"
#include "storage.h"
#include "storage_utils.h"
#include "storage_utils.h"
#include "syscall_wrappers.h"
#include "utils.h"
#include "utils.h"
#ifndef HAVE_STRLCPY
#ifndef HAVE_STRLCPY
...
...
src/lxc/syscall_wrappers.h
View file @
0a886c56
...
@@ -24,7 +24,9 @@
...
@@ -24,7 +24,9 @@
#define _GNU_SOURCE 1
#define _GNU_SOURCE 1
#endif
#endif
#include <asm/unistd.h>
#include <asm/unistd.h>
#include <errno.h>
#include <linux/keyctl.h>
#include <linux/keyctl.h>
#include <sched.h>
#include <stdint.h>
#include <stdint.h>
#include <sys/syscall.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/types.h>
...
@@ -32,6 +34,14 @@
...
@@ -32,6 +34,14 @@
#include "config.h"
#include "config.h"
#ifdef HAVE_LINUX_MEMFD_H
#include <linux/memfd.h>
#endif
#ifdef HAVE_SYS_SIGNALFD_H
#include <sys/signalfd.h>
#endif
typedef
int32_t
key_serial_t
;
typedef
int32_t
key_serial_t
;
#if !HAVE_KEYCTL
#if !HAVE_KEYCTL
...
@@ -48,6 +58,50 @@ static inline long __keyctl(int cmd, unsigned long arg2, unsigned long arg3,
...
@@ -48,6 +58,50 @@ static inline long __keyctl(int cmd, unsigned long arg2, unsigned long arg3,
#define keyctl __keyctl
#define keyctl __keyctl
#endif
#endif
#ifndef HAVE_MEMFD_CREATE
static
inline
int
memfd_create
(
const
char
*
name
,
unsigned
int
flags
)
{
#ifndef __NR_memfd_create
#if defined __i386__
#define __NR_memfd_create 356
#elif defined __x86_64__
#define __NR_memfd_create 319
#elif defined __arm__
#define __NR_memfd_create 385
#elif defined __aarch64__
#define __NR_memfd_create 279
#elif defined __s390__
#define __NR_memfd_create 350
#elif defined __powerpc__
#define __NR_memfd_create 360
#elif defined __sparc__
#define __NR_memfd_create 348
#elif defined __blackfin__
#define __NR_memfd_create 390
#elif defined __ia64__
#define __NR_memfd_create 1340
#elif defined _MIPS_SIM
#if _MIPS_SIM == _MIPS_SIM_ABI32
#define __NR_memfd_create 4354
#endif
#if _MIPS_SIM == _MIPS_SIM_NABI32
#define __NR_memfd_create 6318
#endif
#if _MIPS_SIM == _MIPS_SIM_ABI64
#define __NR_memfd_create 5314
#endif
#endif
#endif
#ifdef __NR_memfd_create
return
syscall
(
__NR_memfd_create
,
name
,
flags
);
#else
errno
=
ENOSYS
;
return
-
1
;
#endif
}
#else
extern
int
memfd_create
(
const
char
*
name
,
unsigned
int
flags
);
#endif
#if !HAVE_PIVOT_ROOT
#if !HAVE_PIVOT_ROOT
static
int
pivot_root
(
const
char
*
new_root
,
const
char
*
put_old
)
static
int
pivot_root
(
const
char
*
new_root
,
const
char
*
put_old
)
{
{
...
@@ -62,4 +116,138 @@ static int pivot_root(const char *new_root, const char *put_old)
...
@@ -62,4 +116,138 @@ static int pivot_root(const char *new_root, const char *put_old)
extern
int
pivot_root
(
const
char
*
new_root
,
const
char
*
put_old
);
extern
int
pivot_root
(
const
char
*
new_root
,
const
char
*
put_old
);
#endif
#endif
#if !defined(__NR_setns) && !defined(__NR_set_ns)
#if defined(__x86_64__)
#define __NR_setns 308
#elif defined(__i386__)
#define __NR_setns 346
#elif defined(__arm__)
#define __NR_setns 375
#elif defined(__aarch64__)
#define __NR_setns 375
#elif defined(__powerpc__)
#define __NR_setns 350
#elif defined(__s390__)
#define __NR_setns 339
#endif
#endif
/* Define sethostname() if missing from the C library */
#ifndef HAVE_SETHOSTNAME
static
inline
int
sethostname
(
const
char
*
name
,
size_t
len
)
{
#ifdef __NR_sethostname
return
syscall
(
__NR_sethostname
,
name
,
len
);
#else
errno
=
ENOSYS
;
return
-
1
;
#endif
}
#endif
/* Define setns() if missing from the C library */
#ifndef HAVE_SETNS
static
inline
int
setns
(
int
fd
,
int
nstype
)
{
#ifdef __NR_setns
return
syscall
(
__NR_setns
,
fd
,
nstype
);
#elif defined(__NR_set_ns)
return
syscall
(
__NR_set_ns
,
fd
,
nstype
);
#else
errno
=
ENOSYS
;
return
-
1
;
#endif
}
#endif
#ifndef HAVE_SYS_SIGNALFD_H
struct
signalfd_siginfo
{
uint32_t
ssi_signo
;
int32_t
ssi_errno
;
int32_t
ssi_code
;
uint32_t
ssi_pid
;
uint32_t
ssi_uid
;
int32_t
ssi_fd
;
uint32_t
ssi_tid
;
uint32_t
ssi_band
;
uint32_t
ssi_overrun
;
uint32_t
ssi_trapno
;
int32_t
ssi_status
;
int32_t
ssi_int
;
uint64_t
ssi_ptr
;
uint64_t
ssi_utime
;
uint64_t
ssi_stime
;
uint64_t
ssi_addr
;
uint8_t
__pad
[
48
];
};
#ifndef __NR_signalfd4
/* assume kernel headers are too old */
#if __i386__
#define __NR_signalfd4 327
#elif __x86_64__
#define __NR_signalfd4 289
#elif __powerpc__
#define __NR_signalfd4 313
#elif __s390x__
#define __NR_signalfd4 322
#elif __arm__
#define __NR_signalfd4 355
#elif __mips__ && _MIPS_SIM == _ABIO32
#define __NR_signalfd4 4324
#elif __mips__ && _MIPS_SIM == _ABI64
#define __NR_signalfd4 5283
#elif __mips__ && _MIPS_SIM == _ABIN32
#define __NR_signalfd4 6287
#endif
#endif
#ifndef __NR_signalfd
/* assume kernel headers are too old */
#if __i386__
#define __NR_signalfd 321
#elif __x86_64__
#define __NR_signalfd 282
#elif __powerpc__
#define __NR_signalfd 305
#elif __s390x__
#define __NR_signalfd 316
#elif __arm__
#define __NR_signalfd 349
#elif __mips__ && _MIPS_SIM == _ABIO32
#define __NR_signalfd 4317
#elif __mips__ && _MIPS_SIM == _ABI64
#define __NR_signalfd 5276
#elif __mips__ && _MIPS_SIM == _ABIN32
#define __NR_signalfd 6280
#endif
#endif
static
inline
int
signalfd
(
int
fd
,
const
sigset_t
*
mask
,
int
flags
)
{
int
retval
;
retval
=
syscall
(
__NR_signalfd4
,
fd
,
mask
,
_NSIG
/
8
,
flags
);
if
(
errno
==
ENOSYS
&&
flags
==
0
)
retval
=
syscall
(
__NR_signalfd
,
fd
,
mask
,
_NSIG
/
8
);
return
retval
;
}
#endif
/* Define unshare() if missing from the C library */
#ifndef HAVE_UNSHARE
static
inline
int
unshare
(
int
flags
)
{
#ifdef __NR_unshare
return
syscall
(
__NR_unshare
,
flags
);
#else
errno
=
ENOSYS
;
return
-
1
;
#endif
}
#else
extern
int
unshare
(
int
);
#endif
#endif
/* __LXC_SYSCALL_WRAPPER_H */
#endif
/* __LXC_SYSCALL_WRAPPER_H */
src/lxc/terminal.c
View file @
0a886c56
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
#include "lxclock.h"
#include "lxclock.h"
#include "mainloop.h"
#include "mainloop.h"
#include "start.h"
#include "start.h"
#include "syscall_wrappers.h"
#include "terminal.h"
#include "terminal.h"
#include "utils.h"
#include "utils.h"
...
...
src/lxc/utils.h
View file @
0a886c56
...
@@ -43,10 +43,6 @@
...
@@ -43,10 +43,6 @@
#include "raw_syscalls.h"
#include "raw_syscalls.h"
#include "string_utils.h"
#include "string_utils.h"
#ifdef HAVE_LINUX_MEMFD_H
#include <linux/memfd.h>
#endif
/* returns 1 on success, 0 if there were any failures */
/* returns 1 on success, 0 if there were any failures */
extern
int
lxc_rmdir_onedev
(
const
char
*
path
,
const
char
*
exclude
);
extern
int
lxc_rmdir_onedev
(
const
char
*
path
,
const
char
*
exclude
);
extern
int
get_u16
(
unsigned
short
*
val
,
const
char
*
arg
,
int
base
);
extern
int
get_u16
(
unsigned
short
*
val
,
const
char
*
arg
,
int
base
);
...
@@ -60,189 +56,6 @@ extern char *get_rundir(void);
...
@@ -60,189 +56,6 @@ extern char *get_rundir(void);
#endif
#endif
#endif
#endif
#if !defined(__NR_setns) && !defined(__NR_set_ns)
#if defined(__x86_64__)
#define __NR_setns 308
#elif defined(__i386__)
#define __NR_setns 346
#elif defined(__arm__)
#define __NR_setns 375
#elif defined(__aarch64__)
#define __NR_setns 375
#elif defined(__powerpc__)
#define __NR_setns 350
#elif defined(__s390__)
#define __NR_setns 339
#endif
#endif
/* Define setns() if missing from the C library */
#ifndef HAVE_SETNS
static
inline
int
setns
(
int
fd
,
int
nstype
)
{
#ifdef __NR_setns
return
syscall
(
__NR_setns
,
fd
,
nstype
);
#elif defined(__NR_set_ns)
return
syscall
(
__NR_set_ns
,
fd
,
nstype
);
#else
errno
=
ENOSYS
;
return
-
1
;
#endif
}
#endif
/* Define sethostname() if missing from the C library */
#ifndef HAVE_SETHOSTNAME
static
inline
int
sethostname
(
const
char
*
name
,
size_t
len
)
{
#ifdef __NR_sethostname
return
syscall
(
__NR_sethostname
,
name
,
len
);
#else
errno
=
ENOSYS
;
return
-
1
;
#endif
}
#endif
/* Define unshare() if missing from the C library */
#ifndef HAVE_UNSHARE
static
inline
int
unshare
(
int
flags
)
{
#ifdef __NR_unshare
return
syscall
(
__NR_unshare
,
flags
);
#else
errno
=
ENOSYS
;
return
-
1
;
#endif
}
#else
extern
int
unshare
(
int
);
#endif
/* Define signalfd() if missing from the C library */
#ifdef HAVE_SYS_SIGNALFD_H
# include <sys/signalfd.h>
#else
/* assume kernel headers are too old */
#include <stdint.h>
struct
signalfd_siginfo
{
uint32_t
ssi_signo
;
int32_t
ssi_errno
;
int32_t
ssi_code
;
uint32_t
ssi_pid
;
uint32_t
ssi_uid
;
int32_t
ssi_fd
;
uint32_t
ssi_tid
;
uint32_t
ssi_band
;
uint32_t
ssi_overrun
;
uint32_t
ssi_trapno
;
int32_t
ssi_status
;
int32_t
ssi_int
;
uint64_t
ssi_ptr
;
uint64_t
ssi_utime
;
uint64_t
ssi_stime
;
uint64_t
ssi_addr
;
uint8_t
__pad
[
48
];
};
# ifndef __NR_signalfd4
/* assume kernel headers are too old */
# if __i386__
# define __NR_signalfd4 327
# elif __x86_64__
# define __NR_signalfd4 289
# elif __powerpc__
# define __NR_signalfd4 313
# elif __s390x__
# define __NR_signalfd4 322
# elif __arm__
# define __NR_signalfd4 355
# elif __mips__ && _MIPS_SIM == _ABIO32
# define __NR_signalfd4 4324
# elif __mips__ && _MIPS_SIM == _ABI64
# define __NR_signalfd4 5283
# elif __mips__ && _MIPS_SIM == _ABIN32
# define __NR_signalfd4 6287
# endif
#endif
# ifndef __NR_signalfd
/* assume kernel headers are too old */
# if __i386__
# define __NR_signalfd 321
# elif __x86_64__
# define __NR_signalfd 282
# elif __powerpc__
# define __NR_signalfd 305
# elif __s390x__
# define __NR_signalfd 316
# elif __arm__
# define __NR_signalfd 349
# elif __mips__ && _MIPS_SIM == _ABIO32
# define __NR_signalfd 4317
# elif __mips__ && _MIPS_SIM == _ABI64
# define __NR_signalfd 5276
# elif __mips__ && _MIPS_SIM == _ABIN32
# define __NR_signalfd 6280
# endif
#endif
static
inline
int
signalfd
(
int
fd
,
const
sigset_t
*
mask
,
int
flags
)
{
int
retval
;
retval
=
syscall
(
__NR_signalfd4
,
fd
,
mask
,
_NSIG
/
8
,
flags
);
if
(
errno
==
ENOSYS
&&
flags
==
0
)
retval
=
syscall
(
__NR_signalfd
,
fd
,
mask
,
_NSIG
/
8
);
return
retval
;
}
#endif
#ifndef HAVE_MEMFD_CREATE
static
inline
int
memfd_create
(
const
char
*
name
,
unsigned
int
flags
)
{
#ifndef __NR_memfd_create
#if defined __i386__
#define __NR_memfd_create 356
#elif defined __x86_64__
#define __NR_memfd_create 319
#elif defined __arm__
#define __NR_memfd_create 385
#elif defined __aarch64__
#define __NR_memfd_create 279
#elif defined __s390__
#define __NR_memfd_create 350
#elif defined __powerpc__
#define __NR_memfd_create 360
#elif defined __sparc__
#define __NR_memfd_create 348
#elif defined __blackfin__
#define __NR_memfd_create 390
#elif defined __ia64__
#define __NR_memfd_create 1340
#elif defined _MIPS_SIM
#if _MIPS_SIM == _MIPS_SIM_ABI32
#define __NR_memfd_create 4354
#endif
#if _MIPS_SIM == _MIPS_SIM_NABI32
#define __NR_memfd_create 6318
#endif
#if _MIPS_SIM == _MIPS_SIM_ABI64
#define __NR_memfd_create 5314
#endif
#endif
#endif
#ifdef __NR_memfd_create
return
syscall
(
__NR_memfd_create
,
name
,
flags
);
#else
errno
=
ENOSYS
;
return
-
1
;
#endif
}
#else
extern
int
memfd_create
(
const
char
*
name
,
unsigned
int
flags
);
#endif
static
inline
int
lxc_set_cloexec
(
int
fd
)
static
inline
int
lxc_set_cloexec
(
int
fd
)
{
{
return
fcntl
(
fd
,
F_SETFD
,
FD_CLOEXEC
);
return
fcntl
(
fd
,
F_SETFD
,
FD_CLOEXEC
);
...
@@ -424,15 +237,6 @@ static inline uint64_t lxc_getpagesize(void)
...
@@ -424,15 +237,6 @@ static inline uint64_t lxc_getpagesize(void)
*/
*/
extern
uint64_t
lxc_find_next_power2
(
uint64_t
n
);
extern
uint64_t
lxc_find_next_power2
(
uint64_t
n
);
static
inline
pid_t
lxc_raw_gettid
(
void
)
{
#ifdef SYS_gettid
return
syscall
(
SYS_gettid
);
#else
return
lxc_raw_getpid
();
#endif
}
/* Set a signal the child process will receive after the parent has died. */
/* Set a signal the child process will receive after the parent has died. */
extern
int
lxc_set_death_signal
(
int
signal
,
pid_t
parent
);
extern
int
lxc_set_death_signal
(
int
signal
,
pid_t
parent
);
extern
int
fd_cloexec
(
int
fd
,
bool
cloexec
);
extern
int
fd_cloexec
(
int
fd
,
bool
cloexec
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment