Thread View: comp.sys.mac.programmer.codewarrior
4 messages
4 total messages
Started by David M. Palmer
Sun, 23 Jun 2002 21:29
Re: Mutex
Author: David M. Palmer
Date: Sun, 23 Jun 2002 21:29
Date: Sun, 23 Jun 2002 21:29
23 lines
1858 bytes
1858 bytes
In article <3d15d1c0$1_2@aeinews.>, William A. McKee <wamckee@msn.com> wrote: > How do you guarantee mutual exclusion with an Apple API or PowerPlant. I > have an ISR that gets called by Open Transport and I don't want collisions > when accessing the same data when handling the ISR routine. Under OS X, you can use the POSIX mutex libraries: % man -k mutex pthread_mutex_destroy(3) - free resources allocated for a mutex pthread_mutex_init(3) - create a mutex pthread_mutex_lock(3) - lock a mutex pthread_mutex_trylock(3) - attempt to lock a mutex without blocking pthread_mutex_unlock(3) - unlock a mutex pthread_mutexattr_init(3), pthread_mutexattr_destroy(3), pthread_mutexattr_setprioceiling(3), pthread_mutexattr_getprioceiling(3), pthread_mutexattr_setprotocol(3), pthread_mutexattr_getprotocol(3), pthread_mutexattr_settype(3), pthread_mutexattr_gettype(3) - mutex attribute operations -- David M. Palmer dmpalmer@email.com (formerly @clark.net, @ematic.com)
Re: Mutex
Author: Sean McBride
Date: Mon, 24 Jun 2002 16:20
Date: Mon, 24 Jun 2002 16:20
6 lines
1193 bytes
1193 bytes
In article <3d173658$1_3@aeinews.>, "William A. McKee" <wamckee@msn.com> wrote: > What about OS 9 ? You should look at Multiprocessing API, in Multiprocessing.h.
Re: Mutex
Author: Herb Petschauer
Date: Mon, 24 Jun 2002 17:58
Date: Mon, 24 Jun 2002 17:58
30 lines
2255 bytes
2255 bytes
In article <cwatson-C2AC16.12205024062002@nr-tor02.bellnexxia.net>, Sean McBride <cwatson@cam.org> wrote: > In article <3d173658$1_3@aeinews.>, > "William A. McKee" <wamckee@msn.com> wrote: > > > What about OS 9 ? > > You should look at Multiprocessing API, in Multiprocessing.h. No guarantees here but something just went "ting" in my head. Now it could have just been the track I was listening to but... Check out boost.org - that's the main library. There are also a whole bunch of add ons in the boost section on Yahoo! (i.e. http://groups.yahoo.com/group/boost/). In the 2001 archive of the "Files" section, http://groups.yahoo.com/group/boost/files/2001/, there is something called "Boost Threads for Carbon.zip" - Implementation of Boost.Threads for Mac OS 8.6, 9.x, and 10.x (with project files, but no binaries) http://groups.yahoo.com/group/boost/files/2001/Boost%20Threads%20for%20Ca rbon.zip You must join the group (i.e. have a valid Yahoo! account). hth, H.
Re: Mutex
Author: Ray Fischer
Date: Mon, 24 Jun 2002 21:12
Date: Mon, 24 Jun 2002 21:12
32 lines
2393 bytes
2393 bytes
William A. McKee <wamckee@msn.com> wrote: >What about OS 9 ? Multiprocesser Services. >"David M. Palmer" <dmpalmer@email.com> wrote in message >> In article <3d15d1c0$1_2@aeinews.>, William A. McKee <wamckee@msn.com> >> wrote: >> >> > How do you guarantee mutual exclusion with an Apple API or PowerPlant. >I >> > have an ISR that gets called by Open Transport and I don't want >collisions >> > when accessing the same data when handling the ISR routine. >> >> Under OS X, you can use the POSIX mutex libraries: >> >> % man -k mutex >> pthread_mutex_destroy(3) - free resources allocated for a mutex >> pthread_mutex_init(3) - create a mutex >> pthread_mutex_lock(3) - lock a mutex >> pthread_mutex_trylock(3) - attempt to lock a mutex without blocking >> pthread_mutex_unlock(3) - unlock a mutex >> pthread_mutexattr_init(3), pthread_mutexattr_destroy(3), >> pthread_mutexattr_setprioceiling(3), >> pthread_mutexattr_getprioceiling(3), pthread_mutexattr_setprotocol(3), >> pthread_mutexattr_getprotocol(3), pthread_mutexattr_settype(3), >> pthread_mutexattr_gettype(3) - mutex attribute operations -- Ray Fischer Most people, sometime in their lives, stumble across truth. rfischer@sonic.net Most jump up, brush themselves off, and hurry on about their business as if nothing had happened. -- Churchill
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads