mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Bart Van Assche" <bart.vanassche@gmail.com>
To: "Eric Smith" <eric@brouhaha.com>
Cc: linux-kernel@vger.kernel.org, "Andi Kleen" <andi@firstfloor.org>
Subject: Re: Any lightweight way for one thread to force another thread to suspend execution?
Date: Sat, 21 Jun 2008 18:38:24 +0200	[thread overview]
Message-ID: <e2e108260806210938k4ba12874t5f46e524ee188ab3@mail.gmail.com> (raw)
In-Reply-To: <40921.64.62.206.10.1214006079.squirrel@ruckus.brouhaha.com>

On Sat, Jun 21, 2008 at 1:54 AM, Eric Smith <eric@brouhaha.com> wrote:
> Is there any method for one thread to force another thread to suspend
> execution, then later let it resume, that is lighter weight than using
> signals?  I don't need it to be portable to anything other than Linux.
> The suspend needs to be synchronous, but resume doesn't.

Trying to suspend another thread synchronously is a bad idea because
this can easily trigger deadlocks. E.g. if you suspend a thread while
that thread holds a lock on a mutex, your application will deadlock.

Bart.

  parent reply	other threads:[~2008-06-21 16:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-20 23:54 Eric Smith
2008-06-21 14:04 ` Andi Kleen
2008-06-22  1:55   ` Eric Smith
2008-06-22  6:33     ` Bart Van Assche
2008-06-22  9:14     ` Jan Engelhardt
2008-06-23 21:08   ` Eric Smith
2008-06-24  7:59     ` Mikael Pettersson
2008-06-21 16:38 ` Bart Van Assche [this message]
2008-06-22  2:02   ` Eric Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e2e108260806210938k4ba12874t5f46e524ee188ab3@mail.gmail.com \
    --to=bart.vanassche@gmail.com \
    --cc=andi@firstfloor.org \
    --cc=eric@brouhaha.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®