Re: temporary disable thread switching using pthreads
- From: Casper H.S. *** <Casper.***@xxxxxxx>
- Date: 22 May 2006 17:05:04 GMT
=?ISO-8859-1?Q?Marcel_M=FCller?= <news.5.maazl@xxxxxxxxxxxxxxx> writes:
There is no problem with SMP:
"DosEnterCritSec causes other threads in the process to block themselves
and give up their time slice [...] until the corresponding
DosExitCritSec is completed."
Really? What happens when any other thread holds a library lock
when it is stopped?
However, since there is no way to suspend a thread using pthreads, I
cannot implement it this way.
Nope, and there are good reasons why suspending threads isn't possible.
Unfortunately it is not always that obvious what kind of data is
protected by a critical section which is not directly related to any
data. I think I have to do some more redesign. :-/
If it's just data to be protected, a lock would suffice.
Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
.
- Follow-Ups:
- Re: temporary disable thread switching using pthreads
- From: Marcel Müller
- Re: temporary disable thread switching using pthreads
- References:
- temporary disable thread switching using pthreads
- From: Marcel Müller
- Re: temporary disable thread switching using pthreads
- From: David Hopwood
- Re: temporary disable thread switching using pthreads
- From: Marcel Müller
- temporary disable thread switching using pthreads
- Prev by Date: Re: temporary disable thread switching using pthreads
- Next by Date: Re: temporary disable thread switching using pthreads
- Previous by thread: Re: temporary disable thread switching using pthreads
- Next by thread: Re: temporary disable thread switching using pthreads
- Index(es):