Date: Thu, 14 Apr 2005 02:11:45 GMT From: David Xu <davidxu@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 75116 for review Message-ID: <200504140211.j3E2BjK3009850@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=75116 Change 75116 by davidxu@davidxu_celeron on 2005/04/14 02:10:51 Create a new thread creating syscall, the syscall create new thread in atomic. Affected files ... .. //depot/projects/davidxu_thread/src/sys/sys/thr.h#4 edit Differences ... ==== //depot/projects/davidxu_thread/src/sys/sys/thr.h#4 (text+ko) ==== @@ -34,13 +34,32 @@ #define THR_SUSPENDED 0x0001 /* Create the system scope thread. */ #define THR_SYSTEM_SCOPE 0x0002 +/* Remember user TID address in kernel, when exits, + write zero to the address and do umtx_wake() + on the address, the pthread_join can use this feature. */ +#define THR_REMBER_TID_ADDRESS 0x0004 +struct thr_param { + void (*start_func)(void *); /* thread entry function. */ + char *stack_base; /* stack base address. */ + size_t stack_size; /* stack size. */ + char *tls_base; /* tls base address. */ + size_t tls_size; /* tls size. */ + int tls_seg; /* which seg is to set for tls. */ + sigset_t sigmask; /* signal mask for new thread. */ + long *child_tid; /* address to store new TID. */ + long parent_tid; /* parent accesses the new TID here. */ + int *user_crit; /* reserved */ + int flags; +}; + /* * See pthread_* */ #ifndef _KERNEL int thr_create(ucontext_t *ctx, long *id, int flags); +int thr_create2(struct thr_param *param, int param_size); int thr_self(long *id); void thr_exit(long *state); int thr_kill(long id, int sig);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200504140211.j3E2BjK3009850>