Re: Thread critical sections
Re: Thread critical sections
- Subject: Re: Thread critical sections
- From: Steve Checkoway <email@hidden>
- Date: Fri, 28 Oct 2005 17:15:40 -0700
Brian Bergstrand wrote:
pthread_mutex_lock();
// critical code here...
pthread_mutex_unlock();
That's not quite what I was looking for. From the Thread Manager page:
http://developer.apple.com/documentation/Carbon/Reference/Thread_Manager/threadman_ref/chapter_61.2_section_7.html
The ThreadBeginCritical function disables scheduling by marking the
beginning of a section of critical code. That is, no other threads in
the current application can run—even if the current thread yields
control—until the current thread exits the critical section (by calling
the ThreadEndCritical function).
It's that behavior that I wish to have, not data mutual exclusion.
- Steve
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden