Subject: Re: Mapping 2 compat linux32 syscalls on a single native one
To: Nicolas Joly <njoly@pasteur.fr>
From: Christos Zoulas <christos@zoulas.com>
List: tech-kern
Date: 02/01/2007 10:04:20
On Feb 1,  3:48pm, njoly@pasteur.fr (Nicolas Joly) wrote:
-- Subject: Re: Mapping 2 compat linux32 syscalls on a single native one

| > If $LD_ASSUME_KERNEL is set to 2.6.x or not set at all then we use NPTL.
| > If it is set to 2.4.x then we use the old clone based threads, like linux
| > currently does.
| 
| I've been thinking about this, and tested the following.
| 
| I defined a new flag `LINUX_USE_NPTLTHREADS' which will be set in
| linux_emuldata_shared flags field depending on NPTL vs. non-NPTL
| needs. Syscalls that have different behaviour in both cases will check
| for this flag to do their job.
| 
| For now, i set this flag in linux_sys_set_tid_address() syscall, as it
| is done very early during NPTL libpthread loading (.init section), and
| absent from old linux thread code. It works, but i'm not sure this is
| the best way to proceed.
| 
| And, with this new behaviour, the compat linux32 emulation can
| successfully use linux_sys_exit_group().

Excellent, commit it!

christos