Age | Commit message (Collapse) | Author |
|
|
|
critical section to solve deadlock problem.
* pthread.c: Add all remaining C modules.
* pthread.h: Use dllexport/dllimport attributes on functions
to avoid using pthread.def.
* sched.h: Likewise.
* semaphore.h: Likewise.
* GNUmakefile: Add new targets for single translation
unit build to maximise inlining potential; generate
pthread.def automatically.
* Makefile: Likewise, but no longer uses pthread.def.
|
|
|
|
conditional compilation; refinements; bug fixes. See the ChangeLog.
|
|
* mutex.c (pthread_mutex_timedlock): New function suggested by
Alexander Terekhov. The logic required to implement this
properly came from Alexander, with some collaboration
with Thomas Pfaff.
(pthread_mutex_unlock): Wrap the waiters check and sema
post in a critical section to prevent a race with
pthread_mutex_timedlock.
(ptw32_timed_semwait): New function;
returns a special result if the absolute timeout parameter
represents a time already passed when called; used by
pthread_mutex_timedwait(). Have deliberately not reused
the name "ptw32_sem_timedwait" because they are not the same
routine.
* condvar.c (ptw32_cond_timedwait): Use the new sem_timedwait()
instead of ptw32_sem_timedwait(), which now has a different
function. See previous.
* implement.h: Remove prototype for ptw32_sem_timedwait.
See next.
(pthread_mutex_t_): Add critical section element for access
to lock_idx during mutex post-timeout processing.
* semaphore.h (sem_timedwait): See next.
* semaphore.c (sem_timedwait): See next.
* private.c (ptw32_sem_timedwait): Move to semaphore.c
and rename as sem_timedwait().
2002-01-18 Ross Johnson <rpj@special.ise.canberra.edu.au>
* sync.c (pthread_join): Was getting the exit code from the
calling thread rather than the joined thread if
defined(__MINGW32__) && !defined(__MSVCRT__).
2002-01-15 Ross Johnson <rpj@special.ise.canberra.edu.au>
* pthread.h: Unless the build explicitly defines __CLEANUP_SEH,
__CLEANUP_CXX, or __CLEANUP_C, then the build defaults to
__CLEANUP_C style cleanup. This style uses setjmp/longjmp
in the cancelation and thread exit implementations and therefore
won't do stack unwinding if linked to applications that have it
(e.g. C++ apps). This is currently consistent with most/all
commercial Unix POSIX threads implementations.
* spin.c (pthread_spin_init): Edit renamed function call.
* nonportable.c (pthread_num_processors_np): New.
(pthread_getprocessors_np): Renamed to ptw32_getprocessors
and moved to private.c.
* private.c (pthread_getprocessors): Moved here from
nonportable.c.
* pthread.def (pthread_getprocessors_np): Removed
from export list.
* rwlock.c (pthread_rwlockattr_init): New.
(pthread_rwlockattr_destroy): New.
(pthread_rwlockattr_getpshared): New.
(pthread_rwlockattr_setpshared): New.
|
|
Remove unused autoconf files;
Add the file COPYING, which describes the pthread-win32 license
relative to the FSF LGPL.
|
|
* barrier.c: Fix several bugs in all routines. Now passes
tests/barrier5.c which is fairly rigorous. There is still
a non-optimal work-around for a race condition between
the barrier breeched event signal and event wait. Basically
the last (signalling) thread to hit the barrier yields
to allow any other threads, which may have lost the race,
to complete.
tests/ChangeLog:
* barrier3.c: Fixed.
* barrier4.c: Fixed.
* barrier5.c: New; proves that all threads in the group
reaching the barrier wait and then resume together. Repeats
the test using groups of 1 to 16 threads. Each group of
threads must negotiate a large number of barriers (10000).
* spin4.c: Fixed.
* test.h (error_string): Modified the success (0) value.
|
|
* spin.c: Revamped and working; included static initialiser.
* barrier.c: Likewise.
* condvar.c: Macro constant change; inline auto init routine.
* mutex.c: Likewise.
* rwlock.c: Likewise.
* private.c: Add support for spinlock initialiser.
* global.c: Likewise.
* implement.h: Likewise.
* pthread.h (PTHREAD_SPINLOCK_INITIALIZER): Fix typo.
tests/ChangeLog:
* spin3.c: Changed test and fixed.
* spin4.c: Fixed.
* barrier3.c: Fixed.
* barrier4.c: Fixed.
|
|
for this object.
* pthread.h (PTHREAD_BARRIER_INITIALIZER): Removed.
* rwlock.c (pthread_rwlock_wrlock): This routine is
not a cancelation point - disable deferred
cancelation around call to pthread_cond_wait().
tests/ChangeLog:
* spin1.c: New; testing spinlocks.
* spin2.c: New; testing spinlocks.
* spin3.c: New; testing spinlocks.
* spin4.c: New; testing spinlocks.
* barrier1.c: New; testing barriers.
* barrier2.c: New; testing barriers.
* barrier3.c: New; testing barriers.
* barrier4.c: New; testing barriers.
* GNUmakefile: Add new tests.
* Makefile: Add new tests.
|