Andrew Doran <a...@netbsd.org> wrote: > - The dup code for fork1() code makes me uncomfortable. Maybe it's > worthwhile changing our native code so that LIDs are always allocated > from the PID table or something along those lines? Tend to think these > should be globally unique with the system and not just within a process. > Could also be of potential help with things like inter-process pthread > objects in shared memory.
You mean the clone() fragment which duplicates sys__lwp_create()? Perhaps just abstract into e.g. lwp_setrunnable() or so? Not sure if worth adding extra overhead to native code. For uniqueness, combining PID and LID as a key should be enough. -- Mindaugas