Subject: Re: lwp_emuldata
To: Emmanuel Dreyfus <>
From: Jaromir Dolecek <>
List: tech-kern
Date: 12/11/2003 10:13:42
Emmanuel Dreyfus wrote:
> Hi folks
> I have the need of per-lwp emuldata for COMPAT_MACH. I have two ideas to
> implement it. The first one is the most straightforward, the second one
> tries to avoid adding emulation hooks, as this tends to make some
> developers unhappy.
> First idea:
> - Add a l_emuldata field in struct lwp. 
> - Add emulation hooks in struct emul to handle lwp_emuldata allocation
> and deallocation: e_newlwp and e_lwp_exit. 
> - Call the emulation hooks in newlwp() and lwp_exit()  

Yeah, this is definitely TRT. Actually, I think the 'proc' hooks
are remains of pre-LWP world and should be replaced with appropriate 'lwp'
hooks. Also p->p_emuldata should be completely replaced by l->l_emuldata.
What do you think? AFAIK only Mach and Linux compat uses emuldata
so far, so it should be easy to change.

Please post a patch for review before checkin :)

Jaromir Dolecek <>  
-=- We should be mindful of the potential goal, but as the Buddhist -=-
-=- masters say, ``You may notice during meditation that you        -=-
-=- sometimes levitate or glow.   Do not let this distract you.''   -=-