#include <unistd.h>
-static inline ALWAYSINLINE int
+static inline ALWAYSINLINE xid_t
vc_new_s_context_compat(xid_t ctx, unsigned int remove_cap, unsigned int flags)
{
struct vcmd_new_s_context_v1 msg;
static int rev_s_context=0;
#if defined(__pic__) && defined(__i386)
-inline static int
+inline static xid_t
new_s_context_rev0(int newctx, int remove_cap, int flags)
{
return syscall(__NR_new_s_context_rev0, newctx, remove_cap, flags);
is_init = true;
}
-static ALWAYSINLINE int
+static ALWAYSINLINE xid_t
vc_new_s_context_legacy(int ctx, int remove_cap, int flags)
{
- int ret = -1;
+ xid_t ret = -1;
init();
if (rev_s_context == 0){
return new_s_context_rev0(ctx, remove_cap, flags);
}else{
errno = -ENOSYS;
- ret = -1;
+ ret = VC_NOCTX;
}
return ret;
}
#if defined(VC_ENABLE_API_COMPAT) || defined(VC_ENABLE_API_LEGACY)
-int
+xid_t
vc_new_s_context(xid_t ctx, unsigned int remove_cap, unsigned int flags)
{
CALL_VC(CALL_VC_COMPAT(vc_new_s_context, ctx, remove_cap, flags),