[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: Any lightweight way for one thread to force another thread to suspend execution?
From:       "Bart Van Assche" <bart.vanassche () gmail ! com>
Date:       2008-06-22 6:33:51
Message-ID: e2e108260806212333q669a0ae5o9df105652352ae89 () mail ! gmail ! com
[Download RAW message or body]

On Sun, Jun 22, 2008 at 3:55 AM, Eric Smith <eric@brouhaha.com> wrote:
> Andi wrote:
>> Any such mechanism will need a syscall, and it's unlikely that
>> any syscall will get much cheaper than a kill(SIGSTOP)
>
> But is there a way for the process sending the SIGSTOP to wait until it
> has taken effect?  I need a method to *synchronously* stop another
> thread.  That's why I thought I probably needed something more
> elaborate than SIGSTOP, though I'd like to minimize the number of
> system calls required.

Are you aware that SIGSTOP suspends all the threads in a process
instead of a single thread ? (Note: this is how the NPTL behaves. With
LinuxThreads it was possible to suspend a single thread via SIGSTOP,
but this was a violation of the POSIX standards.)

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic