I also found in ...kernel/thread.h
status_t thread_block()
void thread_unblock()
status_t _user_suspend_thread()
status_t _user_resume_thread()
This makes me wonder if I should be using these calls instead.
From: Dario Casalinuovo <b.vitruvio@xxxxxxxxx>
To: haiku-3rdparty-dev <haiku-3rdparty-dev@xxxxxxxxxxxxx>
Sent: Tuesday, April 19, 2016 8:01 AM
Subject: [haiku-3rdparty-dev] Re: Multi-Threaded Code
Hello,
On Tue, Apr 19, 2016 at 8:47 AM, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote:
Am 18/04/2016 um 02:53 schrieb Earl Pottinger (Redacted sender
earl_colby_pottinger for DMARC):
What I wanted to asked before doing a major rewrite, does anyone know if
resume_thread() and suspend_thread() are very fast calls?
In addition to what the others said, they both have syscall overhead, but are
otherwise very simple and short calls.
I've questioned myself a similar question recently, how it compares to
acquiring a lock to a semaphore? Is there any reason I should use resume_thread
over releasing a semaphore?
--
Best Regards,Daro