tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [PATCH] swapcontext vs libpthread
On Sat, Aug 25, 2012 at 01:51:14AM +0000, Emmanuel Dreyfus wrote:
> Shall I substitute setcontext by _setcontext in lib/libc/setcontext.S
> and add a WEAK_ALIAS? Or should I invoke RSYSCALL(setcontext) from
> libpthread?
The first way means replacing setcontest system calls by _setcontext
function calls in all MD code in assembly that use it in libc. That
is possible but painful: the changes required in assembly code are
not trivial, and cannot be tested without access to the target CPU.
The second way seems impossible, as RSYSCALL is MD stuff that is not
exported outside of libc. And it does not even address the problem,
since we want libc's swapcontestext() to use libpthread's setcontext(),
hence I think the WEAK_ALIAS on _setcontext cannot be avoided.
--
Emmanuel Dreyfus
manu%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index