@@ -50,7 +50,9 @@ __syscall_cancel (__syscall_arg_t nr, __syscall_arg_t a1,
{
INTERNAL_SYSCALL_DECL (err);
result = INTERNAL_SYSCALL_NCS (nr, err, 6, a1, a2, a3, a4, a5, a6);
- return INTERNAL_SYSCALL_ERROR_P (result, err) ? -result : result;
+ if (INTERNAL_SYSCALL_ERROR_P (result, err))
+ return -INTERNAL_SYSCALL_ERRNO (result, err);
+ return result;
}
/* Call the arch-specific entry points that contains the globals markers
@@ -54,9 +54,9 @@
push {r4, r5, lr}; \
.save {r4, r5, lr}; \
PSEUDO_CANCEL_BEFORE; \
- movw r0, SYS_ify (syscall_name); \
+ ldr r0, =SYS_ify (syscall_name); \
PSEUDO_CANCEL_AFTER; \
- pop {r4, r5, pc}; \
+ pop {r4, r5, lr}; \
.fnend; \
cmn r0, $4096