X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=util-vserver%2Flib%2Fvserver-internal.h;h=da7d0623254c3776b8e02f5011be4184aa8b63f9;hb=9bac3099d94faabc10f8916475bcfd38eb7acc49;hp=de944d020ad29082f0f012d379c425e228606d0a;hpb=a02f19073e283ba0cb45cdbac16e5208738caa12;p=util-vserver.git diff --git a/util-vserver/lib/vserver-internal.h b/util-vserver/lib/vserver-internal.h index de944d0..da7d062 100644 --- a/util-vserver/lib/vserver-internal.h +++ b/util-vserver/lib/vserver-internal.h @@ -62,6 +62,27 @@ # define CALL_VC_LEGACY(F,...) CALL_VC_NOOP #endif +#ifdef VC_ENABLE_API_V11 +# define CALL_VC_V11(F,...) CALL_VC_GENERAL(0x00010000, v11, F, __VA_ARGS__) +#else +# define CALL_VC_V11(F,...) CALL_VC_NOOP +#endif + + +#if 1 +# define CTX_KERNEL2USER(X) (((X)==(uint32_t)(-1)) ? VC_NOCTX : \ + ((X)==(uint32_t)(-2)) ? VC_SAMECTX : \ + (ctx_t)(X)) + +# define CTX_USER2KERNEL(X) (((X)==VC_RANDCTX) ? (uint32_t)(-1) : \ + ((X)==VC_SAMECTX) ? (uint32_t)(-2) : \ + (uint32_t)(X)) +#else +# define CTX_USER2KERNEL(X) (X) +# define CTX_KERNEL2USER(X) (X) +#endif + + #ifndef HAVE_SYS_VIRTUAL_CONTEXT static UNUSED _syscall3(int, sys_virtual_context,