# define CALL_VC(...) \
do { \
int ver = utilvserver_checkCompatVersion(); \
- uint_least32_t UNUSED conf = utilvserver_checkCompatConfig(); \
+ vc_vci_t UNUSED conf = utilvserver_checkCompatConfig(); \
if (ver==-1) return -1; \
VC_SUFFIX, __VA_ARGS__, VC_PREFIX; \
errno = ENOSYS; \
# define CALL_VC_SPACES(F,...) CALL_VC_NOOP
#endif
+#if defined(VC_ENABLE_API_V23)
+# define CALL_VC_TAG(F,...) CALL_VC_GENERAL_CONFIG(VC_VCI_PPTAG, tag, F, __VA_ARGS__)
+#else
+# define CALL_VC_TAG(F,...) CALL_VC_NOOP
+#endif
+
#ifdef VC_ENABLE_API_V22
# define CALL_VC_V22(F,...) CALL_VC_GENERAL(0x00020200, v22, F, __VA_ARGS__)
#else
# define CALL_VC_V23(F,...) CALL_VC_NOOP
#endif
+#ifdef VC_ENABLE_API_V23
+# define CALL_VC_V23P(F,...) CALL_VC_GENERAL(0x00020304, v23, F, __VA_ARGS__)
+#else
+# define CALL_VC_V23P(F,...) CALL_VC_NOOP
+#endif
+
#ifdef VC_ENABLE_API_NET
# define CALL_VC_NET(F,...) CALL_VC_GENERAL(0x00010016, net, F, __VA_ARGS__)
#else
#endif
#if 1
+# define TAG_KERNEL2USER(X) (((X)==(uint32_t)(-1)) ? VC_NOCTX : \
+ ((X)==(uint32_t)(-2)) ? VC_SAMECTX : \
+ (tag_t)(X))
+
+# define TAG_USER2KERNEL(X) (((X)==VC_DYNAMIC_XID) ? (uint32_t)(-1) : \
+ ((X)==VC_SAMECTX) ? (uint32_t)(-2) : \
+ (uint32_t)(X))
+#else
+# define TAG_USER2KERNEL(X) (X)
+# define TAG_KERNEL2USER(X) (X)
+#endif
+
+#if 1
# define EXT2FLAGS_USER2KERNEL(X) (((X) & ~(VC_IMMUTABLE_FILE_FL|VC_IMMUTABLE_LINK_FL)) | \
((X) & VC_IMMUTABLE_FILE_FL ? EXT2_IMMUTABLE_FILE_FL : 0) | \
((X) & VC_IMMUTABLE_LINK_FL ? EXT2_IMMUTABLE_LINK_FL : 0))
#define EXT2_IOC_GETCONTEXT _IOR('x', 1, long)
#define EXT2_IOC_SETCONTEXT _IOW('x', 2, long)
+#if defined(__GNUC__)
+# define VC_ATTR_HIDDEN __attribute__ ((hidden))
+#else
+# define VC_ATTR_HIDDEN
+#endif
+
#ifndef HAVE_VSERVER
#ifdef ENSC_SYSCALL_TRADITIONAL
inline static UNUSED ALWAYSINLINE