Age | Commit message (Collapse) | Author |
|
* pthread.def: Update. Some functions aren't available yet, others
are macros in <pthread.h>.
* tests/join.c: Remove; useless.
|
|
* tests/self.c: Remove; rename to self1.c.
* tests/self1.c: This is the old self.c.
* tests/self2.c: New file. Test pthread_self() with a single
thread. Passes.
* tests/self3.c: New file. Test pthread_self() with a couple of
threads to ensure their thread IDs differ. Passes.
|
|
* misc.c (pthread_once): Use the POSIX mutex primitives, not Win32.
Remove irrelevant FIXME comment.
* pthread.h (PTHREAD_ONCE_INIT): Define.
* tests/once1.c: New file; test for pthread_once(). Passes.
|
|
* misc.c (pthread_equal): Correct inverted logic bug.
* tests/create1.c: New file; test pthread_create(). Passes.
* tests/equal.c: Poor test; remove.
* tests/equal1.c New file; test pthread_equal(). Passes.
|
|
* global.c (PTHREAD_MUTEX_INITIALIZER): Move to pthread.h.
* pthread.h (PTHREAD_MUTEX_INITIALIZER): Define.
(pthread_mutex_t): Reimplement as a struct containing a valid
flag. If the flag is ever down upon entry to a mutex operation,
we call pthread_mutex_create() to initialise the object. This
fixes the problem of how to handle statically initialised objects
that can't call InitializeCriticalSection() due to their context.
* mutex.c (pthread_mutex_init): Set valid flag.
(pthread_mutex_destroy): Clear valid flag.
(pthread_mutex_lock): Check and handle the valid flag.
(pthread_mutex_unlock): Likewise.
(pthread_mutex_trylock): Likewise.
* tests/mutex3.c: New file; test for the static initialisation
macro. Passes.
|
|
* tests/mutex2.c: Test pthread_mutex_trylock(). Passes.
* tests/mutex1.c (main): Eliminate warning.
|
|
* tests/mutex1.c: New basic test for mutex functions (it passes).
|
|
* eyal1.c: New file; contributed by Eyal Lebedinsky
<eyal@eyal.emu.id.au>.
|
|
* exit2.c (func): Return a value.
(main): Call the right thread entry function.
|
|
|
|
|
|
* exit2.c (main): Fix size of pthread_t array.
|
|
|
|
* exit2.c: New file; test pthread_exit() harder.
|
|
* exit1.c: New file; test pthread_exit().
|
|
|