From: SVisor <svisor@lycos.com>
To: linux-c-programming@vger.kernel.org
Subject: Re: How to suspend a thread (without pthread)
Date: Wed, 25 May 2005 08:47:55 +0200 [thread overview]
Message-ID: <d716vk$dfu$1@sea.gmane.org> (raw)
In-Reply-To: <429419FC.2090102@hq.ntsp.nec.co.jp>
Ron Michael Khu wrote:
> what do u mean by suspend?
> sleep/block? if ur looking for a time-based threadsleep
> maybe u can make use(improvise) with the select() function.
I mean sleep until awoken. Ive used a yielding spin lock this far. But
there must be a better way. I cant use a timer (like select).
...
> what's wrong with using the pthread library? (ex: pthread_mutex_lock,
> pthread_mutex_unlock)
> license issues? client-preference issues? library-comptability?
pthread doesnt play well with clone( ). LGPL (which is pthread:s licens)
is not realy a problem (today). But the truth is that I try to avoid
(L)GPL as much as possible. Especially when writing support code (like
libraries) which future use is unknown.
// Jarmo
...
>> I need to suspend threads (for locking purpose) but I do not want to
>> use Posix threads library (pthread). Neither do I want to access
>> __KERNEL__ protected parts of the kernel API.
>>
>> There must be a user accesible API for this. The nearest Ive found is
>> sched_yield( ), but it just moves a thread (process) to the end of
>> run-queue.
...
prev parent reply other threads:[~2005-05-25 6:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-25 6:11 How to suspend a thread (without pthread) SVisor
2005-05-25 6:23 ` Ron Michael Khu
2005-05-25 6:47 ` SVisor [this message]
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='d716vk$dfu$1@sea.gmane.org' \
--to=svisor@lycos.com \
--cc=linux-c-programming@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.