how to implement linux_gettid
Marcel Moolenaar
marcel at xcllnt.net
Mon Jul 19 14:58:47 PDT 2004
On Mon, Jul 19, 2004 at 11:47:15PM +0200, Georg-W. Koltermann wrote:
>
> Could someone explain how our threading works when accessed from Linux,
> and maybe give me a hint how gettid() should be implemented correctly?
It depends. If user threading under linux compatibility is still
implemented using fork(2), then you'll have a process per user thread.
In that case it doesn't matter how threading is natively implemented.
So, if fork(2) is the basis for threading, return td->td_proc->p_pid,
otherwise you probably want to return td->td_tid.
--
Marcel Moolenaar USPA: A-39004 marcel at xcllnt.net
More information about the freebsd-emulation
mailing list