Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Commit [1c38df] exp-2001-02-10-passed Maximize Restore History

2001-02-09 Ross Johnson <rpj@setup1.ise.canberra.edu.au>

* nonportable.c (pthread_mutex_setdefaulttype_np): New
function for changing the default mutex type.

* mutex.c (ptw32_InitializeCriticalSection): Removed.
(ptw32_InitializeCriticalSection): Removed.
(ptw32_InitializeCriticalSection): Removed.
(ptw32_InitializeCriticalSection): Removed.
(ptw32_InitializeCriticalSection): Removed.
(pthread_mutex_init): Apply Thomas Pfaff's original
patches; remove use of critical sections and adapt
for different mutex types (see log entry for 2001-01-10).
The disadvantage of using critical sections is that
they don't appear to be sharable between processes.
This implementation provides the opportunity to place
mutex objects in shared memory. Thread priority
determines the order in which waiting threads acquire
the mutex although the implementation includes a
mechanism to prevent threads hogging the mutex through
successive unlock/lock operations.
(pthread_mutex_destroy): Likewise.
(pthread_mutex_lock): Likewise.
(pthread_mutex_unlock): Likewise.
(pthread_mutex_trylock): Likewise.

* pthread.h (rand_r): Add redundant test of '_seed' arg
to avoid "unused variable" warnings. Any good compiler
will optimise the test away anyway.

rpj rpj 2001-02-10

changed tests/cancel2.c
changed tests/rwlock7.c
changed ANNOUNCE
changed ChangeLog
changed implement.h
changed mutex.c
changed nonportable.c
changed pthread.h
tests/cancel2.c Diff Switch to side-by-side view
Loading...
tests/rwlock7.c Diff Switch to side-by-side view
Loading...
ANNOUNCE Diff Switch to side-by-side view
Loading...
ChangeLog Diff Switch to side-by-side view
Loading...
implement.h Diff Switch to side-by-side view
Loading...
mutex.c Diff Switch to side-by-side view
Loading...
nonportable.c Diff Switch to side-by-side view
Loading...
pthread.h Diff Switch to side-by-side view
Loading...