summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/sys
diff options
context:
space:
mode:
authorraf <none@none>2008-01-23 12:00:31 -0800
committerraf <none@none>2008-01-23 12:00:31 -0800
commita574db851cdc636fc3939b68e80d79fe7fbd57f2 (patch)
tree7a28122042d1d24d9c4df92ba257e2d34d111e2e /usr/src/uts/common/sys
parent4a7ceb24cfcc0a97f96d86cfe5852ae445b50e57 (diff)
downloadillumos-joyent-a574db851cdc636fc3939b68e80d79fe7fbd57f2.tar.gz
6598890 cancellation code abuses synonyms
--HG-- rename : usr/src/lib/libc/amd64/crt/cerror64.s => deleted_files/usr/src/lib/libc/amd64/crt/cerror64.s rename : usr/src/lib/libc/port/gen/wait3.c => deleted_files/usr/src/lib/libc/port/gen/wait3.c rename : usr/src/lib/libc/port/gen/wait4.c => deleted_files/usr/src/lib/libc/port/gen/wait4.c rename : usr/src/lib/libc/port/sys/fsync.c => deleted_files/usr/src/lib/libc/port/sys/fsync.c rename : usr/src/lib/libc/sparc/sys/syssun.s => deleted_files/usr/src/lib/libc/sparc/sys/syssun.s rename : usr/src/lib/libc/common/sys/__fcntl.s => usr/src/lib/libc/common/sys/fcntl.s rename : usr/src/lib/libc/common/sys/_rename.s => usr/src/lib/libc/common/sys/rename.s rename : usr/src/lib/libc/port/gen/rename.c => usr/src/lib/libc/port/gen/remove.c rename : usr/src/lib/libc/port/sys/fcntl.c => usr/src/lib/libc/port/sys/libc_fcntl.c
Diffstat (limited to 'usr/src/uts/common/sys')
-rw-r--r--usr/src/uts/common/sys/schedctl.h13
-rw-r--r--usr/src/uts/common/sys/syscall.h9
2 files changed, 15 insertions, 7 deletions
diff --git a/usr/src/uts/common/sys/schedctl.h b/usr/src/uts/common/sys/schedctl.h
index 9a118ce7e6..74a534d48c 100644
--- a/usr/src/uts/common/sys/schedctl.h
+++ b/usr/src/uts/common/sys/schedctl.h
@@ -18,8 +18,9 @@
*
* CDDL HEADER END
*/
+
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -61,16 +62,22 @@ typedef struct sc_public {
/*
* The private portion of the sc_shared data is for
* use by user-level threading support code in libc.
+ * Java has a contract to look at sc_state and sc_cpu (PSARC/2005/351).
*/
typedef struct sc_shared {
volatile ushort_t sc_state; /* current LWP state */
volatile char sc_sigblock; /* all signals blocked */
- volatile char sc_park; /* calling lwp_park() */
+ volatile uchar_t sc_flgs; /* set only by curthread; see below */
volatile processorid_t sc_cpu; /* last CPU on which LWP ran */
int sc_pad;
sc_public_t sc_preemptctl; /* preemption control data */
} sc_shared_t;
+/* sc_flgs */
+#define SC_PARK_FLG 0x01 /* calling lwp_park() */
+#define SC_CANCEL_FLG 0x02 /* cancel pending and not disabled */
+#define SC_EINTR_FLG 0x04 /* EINTR returned due to SC_CANCEL_FLG */
+
/*
* Possible state settings. These are same as the kernel thread states
* except there is no zombie state.
@@ -95,6 +102,8 @@ void schedctl_set_nopreempt(kthread_t *, short);
void schedctl_set_yield(kthread_t *, short);
int schedctl_sigblock(kthread_t *);
void schedctl_finish_sigblock(kthread_t *);
+int schedctl_cancel_pending(void);
+void schedctl_cancel_eintr(void);
int schedctl_is_park(void);
void schedctl_set_park(void);
void schedctl_unpark(void);
diff --git a/usr/src/uts/common/sys/syscall.h b/usr/src/uts/common/sys/syscall.h
index b04d0cf876..779672e7f5 100644
--- a/usr/src/uts/common/sys/syscall.h
+++ b/usr/src/uts/common/sys/syscall.h
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -128,12 +128,10 @@ extern "C" {
* msgsnap(...) :: msgsys(5, ...)
* see <sys/msg.h>
*/
-#define SYS_syssun 50
#define SYS_sysi86 50
/*
* subcodes:
- * syssun(code, ...)
- * see <sys/sys3b.h>
+ * sysi86(code, ...)
*/
#define SYS_acct 51
#define SYS_shmsys 52
@@ -301,7 +299,8 @@ extern "C" {
#define SYS_fstatvfs 104
#define SYS_getloadavg 105
#define SYS_nfssys 106
-#define SYS_waitsys 107
+#define SYS_waitid 107
+#define SYS_waitsys SYS_waitid /* historical */
#define SYS_sigsendsys 108
#define SYS_hrtsys 109
#define SYS_sigresend 111