from user into kernel type and vice versa
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/branches/SYSCALL_SWITCH@392
94cd875c-1c1d-0410-91d2-
eb244daf1a30
# define CALL_VC_V11(F,...) CALL_VC_NOOP
#endif
-
+ // gcc does not optimize it; disable it for now, since ctx_t is an uint32_t
+#if 0
+# define CTX_KERNEL2USER(X) (((X)==(uint32_t)(-1)) ? VC_NOCTX : \
+ ((X)==(uint32_t)(-2)) ? VC_SAMECTX : \
+ (X))
+
+# define CTX_USER2KERNEL(X) (((X)==VC_NOCTX) ? (uint32_t)(-1) : \
+ ((X)==VC_SAMECTX) ? (uint32_t)(-2) : \
+ (X))
+#else
+# define CTX_USER2KERNEL(X) (X)
+# define CTX_KERNEL2USER(X) (X)
+#endif
#ifdef __cplusplus
extern "C" {