tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [RFC][PATCH] _UC_TLSBASE for all ports
On Aug 10, 2012, at 9:58 AM, Joerg Sonnenberger wrote:
> On Fri, Aug 10, 2012 at 04:36:17PM +0000, Emmanuel Dreyfus wrote:
>> Summary of the previous episode: NetBSD's swapcontext restores the
>> thread_self pointer. When using swapcontext() on a context obtained
>> from getcontext() in another thread, this makes two threads with the
>> same pthread_self, leading to chaos
>
> I maintain that trying to move contexts between threads is an inherently
> bad idea and that it is a very inefficient interface for implementing
> coroutines. I object to this change for the sake of misdesigned
> software.
I concur. A thread's stack is its identity and one can't swap stacks
without swapping its sense of self. (granted thread local storage
helps but that isn't universally available).
Home |
Main Index |
Thread Index |
Old Index