*
* @APPLE_LICENSE_HEADER_START@
*
- * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
- *
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
#define MACHDEP_SYSCALL_TRAP lcall $0x7, $0
+/*
+ * This is the same as UNIX_SYSCALL, but it can call an alternate error
+ * return function. It's generic to support potential future callers.
+ */
+#define UNIX_SYSCALL_ERR(name, nargs,error_ret) \
+ .globl error_ret ;\
+LEAF(_##name, 0) ;\
+ movl $ SYS_##name, %eax ;\
+ UNIX_SYSCALL_TRAP ;\
+ jnb 2f ;\
+ BRANCH_EXTERN(error_ret) ;\
+2:
+
#define UNIX_SYSCALL(name, nargs) \
.globl cerror ;\
LEAF(_##name, 0) ;\
#define SYS_shmget 265
#endif
+#if !defined(SYS___pthread_canceled)
+#define SYS___pthread_markcancel 332
+#define SYS___pthread_canceled 333
+#define SYS___semwait_signal 334
+#endif
+