[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [call for testing] NPTL like pthread implementation for GNU/kFreeBSD



/* TID of the helper thread.  */
-extern __lwpid_t __helper_tid attribute_hidden;
+extern pid_t __helper_tid attribute_hidden;

(in kernel-posix-timers.h and timer_routines.c)

lwpid_t happens to match pid_t but AFAICT they're supposed to be
different things. Nothing prevents upstream from eventually diverging
them:

sys/sys/_types.h:typedef     __int32_t       __lwpid_t;      /* Thread
ID (a.k.a. LWP) */
sys/sys/_types.h:typedef     __int32_t       __pid_t;        /*
process [group] */

In theory yes, but in practice, both pid and tid are limited
to range 1 .. (2^30-1) due to other constrains in kernel.

Moreover, even currently the TID value is in some places
(thr_exit, thr_self) passed as long.
See $SVN-glibc-bsd/glibc-ports/fbtl-misc/pid-tid.txt

I choose to sync with NPTL linux version as much as possible.

Petr


Reply to: