Re: [PATCH] swapcontext vs libpthread, round 9

2012-09-09 Thread YAMAMOTO Takashi
hi, On Thu, Sep 06, 2012 at 03:26:13AM +, YAMAMOTO Takashi wrote: hi, On Fri, Aug 31, 2012 at 04:45:48PM +, Emmanuel Dreyfus wrote: After a few round behind the scenes with portmasters (Hi Nick, hi Martin!), here is the latest incarnation of swpacontext vs libpthread patch.

Re: [PATCH] swapcontext vs libpthread, round 9

2012-09-06 Thread Joerg Sonnenberger
On Thu, Sep 06, 2012 at 03:26:13AM +, YAMAMOTO Takashi wrote: hi, On Fri, Aug 31, 2012 at 04:45:48PM +, Emmanuel Dreyfus wrote: After a few round behind the scenes with portmasters (Hi Nick, hi Martin!), here is the latest incarnation of swpacontext vs libpthread patch. If

Re: [PATCH] swapcontext vs libpthread, round 9

2012-09-05 Thread YAMAMOTO Takashi
hi, On Fri, Aug 31, 2012 at 04:45:48PM +, Emmanuel Dreyfus wrote: After a few round behind the scenes with portmasters (Hi Nick, hi Martin!), here is the latest incarnation of swpacontext vs libpthread patch. If there are no concerns left, I plan to commit within 2 days. I still

Re: [PATCH] swapcontext vs libpthread, round 9

2012-09-01 Thread Emmanuel Dreyfus
Joerg Sonnenberger jo...@britannica.bec.de wrote: I still object to adding _UC_TLSBASE to ports that don't need it. This can be done entire in userland, so no kernel change should be required or done. For now all ports implement swapcontext() by doing a system call. My patch fixes a bug while

[PATCH] swapcontext vs libpthread, round 9

2012-08-31 Thread Emmanuel Dreyfus
Hi After a few round behind the scenes with portmasters (Hi Nick, hi Martin!), here is the latest incarnation of swpacontext vs libpthread patch. If there are no concerns left, I plan to commit within 2 days. -- Emmanuel Dreyfus m...@netbsd.org Index: distrib/sets/lists/tests/mi

Re: [PATCH] swapcontext vs libpthread, round 9

2012-08-31 Thread Joerg Sonnenberger
On Fri, Aug 31, 2012 at 04:45:48PM +, Emmanuel Dreyfus wrote: After a few round behind the scenes with portmasters (Hi Nick, hi Martin!), here is the latest incarnation of swpacontext vs libpthread patch. If there are no concerns left, I plan to commit within 2 days. I still object to

Re: [PATCH] swapcontext vs libpthread

2012-08-25 Thread Christos Zoulas
On Aug 25, 7:00am, m...@netbsd.org (Emmanuel Dreyfus) wrote: -- Subject: Re: [PATCH] swapcontext vs libpthread | FIX: ./alpha/gen/swapcontext.S: CALL(setcontext)/* setcontext(ucp) */ | | That one seems already fine to me. The CALL macro is here to invoke a function | Am I

Re: [PATCH] swapcontext vs libpthread

2012-08-25 Thread Emmanuel Dreyfus
On Sat, Aug 25, 2012 at 03:10:51AM -0400, Christos Zoulas wrote: [Call a C function from hppa assembly] Yes, that loads the address to %1, you'll need to call afterwards. It seems to be done with bv,n%r0(%r1). I understand bv is branch-something, %r1 makes sense, but I am not sure about %r0.

Re: [PATCH] swapcontext vs libpthread

2012-08-25 Thread Christos Zoulas
On Aug 25, 9:10am, m...@netbsd.org (Emmanuel Dreyfus) wrote: -- Subject: Re: [PATCH] swapcontext vs libpthread | On Sat, Aug 25, 2012 at 03:10:51AM -0400, Christos Zoulas wrote: | [Call a C function from hppa assembly] | Yes, that loads the address to %1, you'll need to call afterwards

Re: [PATCH] swapcontext vs libpthread

2012-08-24 Thread Emmanuel Dreyfus
On Thu, Aug 23, 2012 at 11:24:03AM +, 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

Re: [PATCH] swapcontext vs libpthread

2012-08-23 Thread Christos Zoulas
In article 20120822170050.gj2...@homeworld.netbsd.org, Emmanuel Dreyfus m...@netbsd.org wrote: -=-=-=-=-=- Here is an updated patch for sorting out swapcontext with libpthread, with documentation and test cases. I would appreciate feedback on LWP_PRESERVETLS flag to _lwp_create(). This tells

Re: [PATCH] swapcontext vs libpthread

2012-08-23 Thread Emmanuel Dreyfus
On Thu, Aug 23, 2012 at 11:24:03AM +, 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. Right, I will do that. -- Emmanuel Dreyfus

Re: [PATCH] swapcontext vs libpthread

2012-08-22 Thread Martin Husemann
On Wed, Aug 22, 2012 at 05:00:50PM +, Emmanuel Dreyfus wrote: but that seems a bad choice: after unsetting _UC_TLSBASE it needs to call the real setcontext, which means doing a system call from libpthread. That looks wrong. Why do you think this would be wrong? Martin

Re: [PATCH] swapcontext vs libpthread

2012-08-22 Thread Emmanuel Dreyfus
Martin Husemann mar...@duskware.de wrote: but that seems a bad choice: after unsetting _UC_TLSBASE it needs to call the real setcontext, which means doing a system call from libpthread. That looks wrong. Why do you think this would be wrong? Do we have any precedent? -- Emmanuel