This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Sun, Oct 28, 2007 at 06:06:17PM -0000, Dave Korn wrote:
As far as I know, there is no separate 'pthreads' spec apart from what is defined in the Threads section (2.9) of the SUS (http://tinyurl.com/2wdq2u) and what it says about the various pthread_ functions in the system interfaces (http://tinyurl.com/2r7c5k) chapter. None of that, as far as I have been able to determine, makes any kind of claims about access to shared state or the use of volatile.
Having just been pointed to that copy of the SUS, I must agree. I can't find anything in there saying anything at all about what is required to safely share data between threads. If that is really so it seems 'pthreads' are even more under-specified than I thought (and I had fairly low expectations in that regard.) I really hope there is something I have missed.
I think the relevant part is here: http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap04.html#tag_04_10
fork() pthread_barrier_wait() pthread_cond_broadcast() pthread_cond_signal() pthread_cond_timedwait() pthread_cond_wait() pthread_create() pthread_join() pthread_mutex_lock() pthread_mutex_timedlock() pthread_mutex_trylock() pthread_mutex_unlock() pthread_spin_lock() pthread_spin_trylock() pthread_spin_unlock() pthread_rwlock_rdlock() pthread_rwlock_timedrdlock() pthread_rwlock_timedwrlock() pthread_rwlock_tryrdlock() pthread_rwlock_trywrlock() pthread_rwlock_unlock() pthread_rwlock_wrlock() sem_post() sem_trywait() sem_wait() wait() waitpid()
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |