Subj : Re: Windows Suspend/ResumeThread API equivalent for Linux or POSIX? To : comp.programming.threads From : Joe Seigh Date : Thu May 12 2005 07:04 am On Wed, 11 May 2005 18:25:38 -0700, Chris Thomasson <_no_damn_spam_cristom@_no_damn_comcast.net_spam> wrote: > For this tweaked version of SMR I need to suspend the threads in order to > get a snapshot of there current context, at least on windows. > There's nothing on unix that's portable. On Solaris there's a /proc based funtion to stop a thread but it wasn't guaranteed to take effect in any specific amount of time so it wasn't very useful. You'd have to use unix signals but if you use that then you might as well have the thread do the context examination so it doesn't have to spend too much time suspended. SMR hazard pointers were designed so you don't have to look at context for the thread's registers. Regular Boehm style GC needs to do this. If you can guarantee that GC tracked local references are never copied to shared memory, ie. the heap, then you can do GC by stopping one thread at a time rather than the whole world. -- Joe Seigh When you get lemons, you make lemonade. When you get hardware, you make software. .