From b36379a1ce5e7d572a44a3e77db09529b4129ee3 Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Thu, 9 Oct 2003 01:38:25 +0000 Subject: [PATCH] added CTX_NOCTX macro added getctx()/getcctx() functions added ctx_t datatype git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@60 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- util-vserver/lib/vserver.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/util-vserver/lib/vserver.h b/util-vserver/lib/vserver.h index 5485446..e425fc1 100644 --- a/util-vserver/lib/vserver.h +++ b/util-vserver/lib/vserver.h @@ -19,10 +19,17 @@ #ifndef H_VSERVER_SYSCALL_H #define H_VSERVER_SYSCALL_H +#include +#include + +#define CTX_NOCTX ((ctx_t)(-1)) + #ifdef __cplusplus extern "C" { #endif + typedef short int ctx_t; + int call_new_s_context(int nbctx, int ctxs[], int remove_cap, int flags); int call_set_ipv4root (unsigned long ip[], int nb, unsigned long bcast, unsigned long mask[]); @@ -32,6 +39,10 @@ int call_set_ctxlimit (int res, long limit); void vserver_init(); + ctx_t getctx(pid_t pid); + +#define getcctx() (getctx(getpid())) + #ifdef __cplusplus } #endif -- 1.8.1.5