[BACK]Return to lwp.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / sys

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/sys/lwp.h between version 1.32.4.1 and 1.33

version 1.32.4.1, 2006/09/09 02:59:42 version 1.33, 2006/02/16 20:17:20
Line 62  struct lwp {
Line 62  struct lwp {
         int     l_stat;          int     l_stat;
         lwpid_t l_lid;          /* LWP identifier; local to process. */          lwpid_t l_lid;          /* LWP identifier; local to process. */
   
 #define l_startzero l_cred  #define l_startzero l_swtime
         struct kauth_cred *l_cred;      /* Cached credentials */  
         u_short l_acflag;       /* Accounting flags */  
         u_int   l_swtime;       /* Time swapped in or out. */          u_int   l_swtime;       /* Time swapped in or out. */
         u_int   l_slptime;      /* Time since last blocked. */          u_int   l_slptime;      /* Time since last blocked. */
   
Line 94  struct lwp {
Line 92  struct lwp {
         struct  mdlwp l_md;     /* Any machine-dependent fields. */          struct  mdlwp l_md;     /* Any machine-dependent fields. */
 };  };
   
 #if !defined(USER_TO_UAREA)  
 #if !defined(UAREA_USER_OFFSET)  
 #define UAREA_USER_OFFSET       0  
 #endif /* !defined(UAREA_USER_OFFSET) */  
 #define USER_TO_UAREA(user)     ((vaddr_t)(user) - UAREA_USER_OFFSET)  
 #define UAREA_TO_USER(uarea)    ((struct user *)((uarea) + UAREA_USER_OFFSET))  
 #endif /* !defined(UAREA_TO_USER) */  
   
 LIST_HEAD(lwplist, lwp);                /* a list of LWPs */  LIST_HEAD(lwplist, lwp);                /* a list of LWPs */
   
 #ifdef _KERNEL  #ifdef _KERNEL
Line 113  extern struct pool lwp_uc_pool;  /* memo
Line 103  extern struct pool lwp_uc_pool;  /* memo
 extern struct lwp lwp0;                 /* LWP for proc0 */  extern struct lwp lwp0;                 /* LWP for proc0 */
 #endif  #endif
   
 /* These flags are kept in l_flag. [*] is shared with p_flag */  /* These flags are kept in l_flag. */
 #define L_INMEM         0x00000004 /* [*] Loaded into memory. */  #define L_INMEM         0x00004 /* Loaded into memory. */
 #define L_SELECT        0x00000040 /* [*] Selecting; wakeup/waiting danger. */  #define L_SELECT        0x00040 /* Selecting; wakeup/waiting danger. */
 #define L_SINTR         0x00000080 /* [*] Sleep is interruptible. */  #define L_SINTR         0x00080 /* Sleep is interruptible. */
 #define L_SA            0x00000400 /* [*] Scheduler activations LWP */  #define L_TIMEOUT       0x00400 /* Timing out during sleep. */
 #define L_SA_UPCALL     0x00200000 /* SA upcall is pending */  #define L_SA            0x100000 /* Scheduler activations LWP */
 #define L_SA_BLOCKING   0x00400000 /* Blocking in tsleep() */  #define L_SA_UPCALL     0x200000 /* SA upcall is pending */
 #define L_DETACHED      0x00800000 /* Won't be waited for. */  #define L_SA_BLOCKING   0x400000 /* Blocking in tsleep() */
 #define L_CANCELLED     0x02000000 /* tsleep should not sleep */  #define L_DETACHED      0x800000 /* Won't be waited for. */
 #define L_SA_PAGEFAULT  0x04000000 /* SA LWP in pagefault handler */  #define L_CANCELLED     0x2000000 /* tsleep should not sleep */
 #define L_TIMEOUT       0x08000000 /* Timing out during sleep. */  #define L_SA_PAGEFAULT  0x4000000 /* SA LWP in pagefault handler */
 #define L_SA_YIELD      0x10000000 /* LWP on VP is yielding */  #define L_SA_YIELD      0x10000000 /* LWP on VP is yielding */
 #define L_SA_IDLE       0x20000000 /* VP is idle */  #define L_SA_IDLE       0x20000000 /* VP is idle */
 #define L_COWINPROGRESS 0x40000000 /* UFS: doing copy on write */  #define L_COWINPROGRESS 0x40000000 /* UFS: doing copy on write */
Line 154  do {         \
Line 144  do {         \
 } while (/* CONSTCOND */ 0)  } while (/* CONSTCOND */ 0)
 #define PRELE(l)        (--(l)->l_holdcnt)  #define PRELE(l)        (--(l)->l_holdcnt)
   
 #define LWP_CACHE_CREDS(l, p)                                           \  
 do {                                                                    \  
         if ((l)->l_cred != (p)->p_cred)                                 \  
                 lwp_update_creds(l);                                    \  
 } while (/* CONSTCOND */ 0)  
   
 void    preempt (int);  void    preempt (int);
 int     mi_switch (struct lwp *, struct lwp *);  int     mi_switch (struct lwp *, struct lwp *);
Line 195  void lwp_exit (struct lwp *);
Line 180  void lwp_exit (struct lwp *);
 void    lwp_exit2 (struct lwp *);  void    lwp_exit2 (struct lwp *);
 struct lwp *proc_representative_lwp(struct proc *);  struct lwp *proc_representative_lwp(struct proc *);
 __inline int lwp_suspend(struct lwp *, struct lwp *);  __inline int lwp_suspend(struct lwp *, struct lwp *);
 int     lwp_create1(struct lwp *, const void *, size_t, u_long, lwpid_t *);  
 void    lwp_update_creds(struct lwp *);  
 #endif  /* _KERNEL */  #endif  /* _KERNEL */
   
 /* Flags for _lwp_create(), as per Solaris. */  /* Flags for _lwp_create(), as per Solaris. */
Line 206  void lwp_update_creds(struct lwp *);
Line 189  void lwp_update_creds(struct lwp *);
 #define __LWP_ASLWP     0x00000100 /* XXX more icky signal semantics */  #define __LWP_ASLWP     0x00000100 /* XXX more icky signal semantics */
   
 #endif  /* !_SYS_LWP_H_ */  #endif  /* !_SYS_LWP_H_ */
   

Legend:
Removed from v.1.32.4.1  
changed lines
  Added in v.1.33

CVSweb <webmaster@jp.NetBSD.org>