summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-05-07Support mutex type attributes.mutexattrM Joonas Pihlaja2-15/+190
This patch adds support for the pthread_mutex_settype() function. To have correct single-threaded semantics for PTHREAD_MUTEX_ERRORCHECK kind mutexes, the patch also implements the following functions: pthread_mutex_init, pthread_mutex_lock, pthread_mutex_unlock, pthread_mutexattr_gettype, pthread_mutexattr_init, pthread_mutexattr_destroy If any one of these functions is not implemented by the host system, then all of them are provided by pthread-stubs. This is to avoid mismatches between pthread-stubs and the host.
2010-05-06Fix prototype for pthread_self().M Joonas Pihlaja1-1/+1
The BSD pthread_t is a pointer to a struct and not an int.
2010-05-06Use autom4te to invoke m4.M Joonas Pihlaja2-6/+3
Invoke the right variant of m4 using autom4te -l M4sugar, and don't rely on the GNU m4 -P option to prefix m4_ to all macros. BSD m4 doesn't support -P.
2010-05-05Generate stubs.c via MakefileJulien Danjou2-2/+3
Signed-off-by: Julien Danjou <julien@danjou.info> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-05-05Generate stubs.c at autogen time from a template file.M Joonas Pihlaja6-194/+107
It's easier to add a line to a list of functions in a template file than copy-pasting five lines of template from other entries and editing configure.ac. Reviewed-by: Jamey Sharp <jamey@minilop.net>
2009-11-06fix pthread_exit protoHEADmasterSamuel Thibault1-1/+1
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-14Release libpthread-stubs 0.3Julien Danjou1-1/+1
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-10-10Add additional pthread_* stubs and abort() on pthread_cond_*wait.Samuel Thibault2-4/+55
Here is a patch that adds only pthread_condattr_init/destroy, pthread_cond_timedwait, pthread_exit, and makes both cond_*wait abort instead of just returning 0. Jamey Sharp gave rationale for cond_wait aborting: > In hindsight, I'm concerned about the fact that we provide > pthread_cond_wait as a stub returning 0. If it's ever called in a > single-threaded application, that function should probably call abort(). > The real implementation would be guaranteed to hang in that > circumstance, after all. In XCB, we need this to be available as a stub, > but I can prove that it won't be called unless there are really multiple > threads. Further discussion leading to this patch was in the thread here: http://lists.freedesktop.org/archives/xcb/2009-October/005110.html Signed-off-by: Jamey Sharp <jamey@minilop.net>
2009-10-09Revert "Provide sem_* functions"Julien Danjou2-104/+1
This reverts commit 3d8dfe9a9ad0a22bdcec555bd3d0d9b5950a6dab. Signed-off-by: Julien Danjou <julien@danjou.info>
2009-09-23Release libpthread-stubs 0.2Julien Danjou1-1/+1
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-08-20Provide sem_* functionsSamuel Thibault2-1/+104
Some applications, instead of using pthread_mutex_t, use anonymous semaphores (sem_init) for locking. Signed-off-by: Julien Danjou <julien@danjou.info>
2007-04-11Update autogen.sh to one that does objdir != srcdirMatthias Hopf1-1/+10
2006-11-23Add READMEJosh Triplett1-0/+9
2006-11-21Quote argument of test in AM_CONDITIONAL.Josh Triplett1-1/+1
2006-11-21Library that provides pthread stubs that are missing from your platform libc.Jamey Sharp7-0/+251