tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH] swapcontext vs libpthread



On Aug 25,  1:51am, manu%netbsd.org@localhost (Emmanuel Dreyfus) wrote:
-- Subject: Re: [PATCH] swapcontext vs libpthread

| On Thu, Aug 23, 2012 at 11:24:03AM +0000, Christos Zoulas wrote:
| > Why do you say that? pthread_cancelstub.c does exactly this (wrapping
| > a syscall and calling it) all the time. I don't think we should be
| > getting the kernel involved with this.
| 
| This is not strightforward for setcontext as it is not defined as a
| WEAK_ALIAS of _setcontext in libc. 
| 
| Shall I substitute setcontext by _setcontext in  lib/libc/setcontext.S
| and add a WEAK_ALIAS? Or should I invoke RSYSCALL(setcontext) from 
| libpthread?

In lib/libc/sys/Makefile.inc, move setcontext.S from the ASM section to the
WEAKASM section. This will define for you a _sys_setcontext() to use directly.

christos


Home | Main Index | Thread Index | Old Index