]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/sys/user.h
xnu-517.12.7.tar.gz
[apple/xnu.git] / bsd / sys / user.h
index 0abd1ef5d6cfc200aba37467a45a03f5e11b4bad..8c1a005abf0339cead78144a42148610b7989d57 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
@@ -58,6 +58,7 @@
 #ifndef        _SYS_USER_H_
 #define        _SYS_USER_H_
 
+#include <sys/appleapiopts.h>
 #ifndef KERNEL
 /* stuff that *used* to be included by user.h, or is now needed */
 #include <errno.h>
 #include <sys/sysctl.h>
  
 #ifdef KERNEL
+
+#ifdef __APPLE_API_PRIVATE
+struct nlminfo;
 /*
  *     Per-thread U area.
- *
- *     It is likely that this structure contains no fields that must be
- *     saved between system calls.
- *
- * WARNING:  IF THE SIZE OF THIS STRUCT CHANGES YOU MUST CHANGE THE
- *           CONSTANT IN struct thread_act.bsd_space
  */
 struct uthread {
        int     *uu_ar0;                /* address of users saved R0 */
@@ -92,16 +90,19 @@ struct uthread {
        /* thread exception handling */
        int     uu_code;                        /* ``code'' to trap */
        char uu_cursig;                         /* p_cursig for exc. */
-       int  uu_sig;                            /* p_sig for exc. */
-
+       struct nlminfo *uu_nlminfo;     /* for rpc.lockd */
        /* support for syscalls which use continuations */
        union {
                struct _select {
                        u_int32_t       *ibits, *obits; /* bits to select on */
                        uint    nbytes; /* number of bytes in ibits and obits */
-                       struct  timeval atv;
-                       int     poll;
+                       u_int64_t abstime;
+                       int poll;
                        int error;
+                       int count;
+                       int nfcount;
+                       char * wql;
+                       int allocsize;          /* select allocated size */
                } ss_select;                    /* saved state for select() */
                struct _wait {
                        int     f;
@@ -119,9 +120,33 @@ struct uthread {
     int (*uu_continuation)(int);
     int uu_pri;
     int uu_timo;
+       int uu_flag;
+       struct proc * uu_proc;
+       void * uu_userstate;
+       wait_queue_sub_t uu_wqsub;
+       sigset_t uu_siglist;                            /* signals pending for the thread */
+       sigset_t  uu_sigwait;                           /*  sigwait on this thread*/
+       sigset_t  uu_sigmask;                           /* signal mask for the thread */
+       sigset_t  uu_oldmask;                           /* signal mask saved before sigpause */
+       thread_act_t uu_act;
+       sigset_t  uu_vforkmask;                         /* saved signal mask during vfork */
+
+       TAILQ_ENTRY(uthread) uu_list;           /* List of uthreads in proc */
 
+       struct kaudit_record            *uu_ar;         /* audit record */
+       struct task*    uu_aio_task;                    /* target task for async io */
 };
+
 typedef struct uthread * uthread_t;
+
+/* Definition of uu_flag */
+#define        USAS_OLDMASK    0x1             /* need to restore mask before pause */
+#define UNO_SIGMASK            0x2             /* exited thread; invalid sigmask */
+/* Kept same as in proc */
+#define P_VFORK     0x2000000   /* process has vfork children */
+
+#endif /* __APPLE_API_PRIVATE */
+
 #endif /* KERNEL */
 
 /*