how to implement linux_gettid
Georg-W. Koltermann
gwk at rahn-koltermann.de
Tue Jul 20 14:59:40 PDT 2004
Am Mo, den 19.07.2004 schrieb Marcel Moolenaar um 23:58:
> 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.
I am not quite sure. I see that i386/linux/syscalls.master has fork,
vfork, and clone. clone is implemented by calling fork1(). Does this
make sure that Linux threading is implemented using fork()?
Or could it depend on the application or library layer, e.g. libpthread
in linux_base?
--
Regards,
Georg.
More information about the freebsd-emulation
mailing list