Code Log


Commit Date  
[723a2f] (snap-2000-12-29-patches) by rpj rpj

Add Win64 portability.

2001-02-14 04:57:48 Tree
[0cf178] by rpj rpj

Remove interdependence of mutex and cancel routines.

2001-02-14 00:57:08 Tree
[4b2662] by rpj rpj

Change the thread cancel lock to be a critical section
instead of a pthread_mutex_t.

2001-02-13 07:56:26 Tree
[3208ce] by rpj rpj

Revamp experimental mutex routines again to make
more atomic and cancel-safe.

2001-02-12 08:28:05 Tree
[1c38df] (exp-2001-02-10-passed) by rpj rpj

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.

2001-02-10 08:35:29 Tree
[1648c7] by rpj rpj

Remodeled mutex routines again to eliminate critical sections.

2001-02-09 06:51:30 Tree
[2b3eed] (exp-2001-02-09-passed) by rpj rpj

Fixes to new mutex routines and various tests.

2001-02-08 16:31:20 Tree
[3c0fbf] by rpj rpj

Change the purpose of rwlock6 test and add new rwlock7 test.

2001-02-07 13:08:54 Tree
[7a31ef] by rpj rpj

Updates and minor corrections and changes.

2001-02-07 08:45:46 Tree
[2f4a19] by rpj rpj

Revamp read-write locks and update cond vars.
See ChangeLog.

2001-02-07 03:48:23 Tree
[9a59a1] by rpj rpj

* mutex.c (pthread_mutexattr_settype): New; allow
the following types of mutex:
PTHREAD_MUTEX_DEFAULT
PTHREAD_MUTEX_NORMAL
PTHREAD_MUTEX_ERRORCHECK
PTHREAD_MUTEX_RECURSIVE
(pthread_mutex_lock): Process the lock request
according to the mutex type.

* mutex.c: No longer use Win32 mutexes as the
basis of POSIX mutexes when TryEnterCriticalSection
isn't supported; implement our own versions of
ptw32_{Initialize,Delete,TryEnter,Enter,Leave}CriticalSection
functions to emulate TryEnterCriticalSection when
it isn't supported by the system; don't allow recursive
mutex locks (similar to PTHREAD_MUTEX_ERRORCHECK
on other systems).
- Thomas Pfaff <tpfaff@gmx.net>

2001-02-06 07:56:03 Tree
[ced3d3] by rpj rpj

Update Question 6.

2001-02-06 06:38:56 Tree
[a423d9] by rpj rpj

Update.

2001-02-06 06:30:51 Tree
[47ccfd] by rpj rpj

Update web URL.

2001-02-06 05:52:41 Tree
[25f0d9] by rpj rpj

Created experimental branch.

2001-02-06 05:44:38 Tree
[9171ee] by rpj rpj

Initial version of MS Developer Studio project files.

2001-01-01 03:48:51 Tree
[a97c54] by rpj rpj

Fix typo in URL.

2000-12-30 00:51:56 Tree
[9e771b] (snap-2000-12-29) by rpj rpj

Updated.

2000-12-29 07:14:46 Tree
[0c2cb3] by rpj rpj

./ChangeLog:
2000-12-29 Ross Johnson <rpj@special.ise.canberra.edu.au>

* Makefile: Back-out "for" loops which don't work.

* GNUmakefile: Remove the fake.a target; add the "realclean"
target; don't remove built libs under the "clean" target.

* config.h: Add a guard against multiple inclusion.

* semaphore.h: Add some defines from config.h to make
semaphore.h independent of config.h when building apps.

* pthread.h (_errno): Back-out previous fix until we know how to
fix it properly.

* implement.h (lockCount): Add missing element to pthread_mutex_t_.

* sync.c (pthread_join): Spelling fix in comment.

* private.c (ptw32_threadStart): Reset original termination
function (C++).
(ptw32_threadStart): Cleanup detached threads early in case
the library is statically linked.
(ptw32_callUserDestroyRoutines): Remove [SEH] __try block from
destructor call so that unhandled exceptions will be passed through
to the system; call terminate() from [C++] try block for the same
reason.

* tsd.c (pthread_getspecific): Add comment.

* mutex.c (pthread_mutex_init): Initialise new elements in
pthread_mutex_t.
(pthread_mutex_unlock): Invert "pthread_equal()" test.

2000-12-28 Ross Johnson <rpj@special.ise.canberra.edu.au>

* semaphore.c (mode_t): Use ifndef HAVE_MODE_T to include definition.

* config.h.in (HAVE_MODE_T): Added.
(_UWIN): Start adding defines for the UWIN package.

./tests/ChangeLog:
2000-12-29 Ross Johnson <rpj@special.ise.canberra.edu.au>

* GNUmakefile: Add mutex4 test; ensure libpthreadw32.a is
removed for "clean" target.
* Makefile: Add mutex4 test.

* exception3.c: Remove SEH code; automatically pass the test
under SEH (which is an N/A environment).

* mutex4.c: New test.

* eyal1.c (do_work_unit): Add a dummy "if" to force the
optimiser to retain code; reduce thread work loads.

* condvar8.c (main): Add an additional "assert" for debugging;
increase pthread_cond_signal timeout.

2000-12-29 07:08:44 Tree
[bab189] by rpj rpj

2000-10-10 Ross Johnson <rpj@setup1.ise.canberra.edu.au>

* misc.c (pthread_self): Restore Win32 "last error"
cleared by TlsGetValue() call in
pthread_getspecific()
- "Steven Reddie" <smr@essemer.com.au>

2000-09-20 Ross Johnson <rpj@setup1.ise.canberra.edu.au>

* mutex.c (pthread_mutex_lock): Record the owner
of the mutex. This requires also keeping count of
recursive locks ourselves rather than leaving it
to Win32 since we need to know when to NULL the
thread owner when the mutex is unlocked.
(pthread_mutex_trylock): Likewise.
(pthread_mutex_unlock): Check that the calling
thread owns the mutex, decrement the recursive
lock count, and NULL the owner if zero. Return
EPERM if the mutex is owned by another thread.
* implement.h (pthread_mutex_t_): Add ownerThread
and lockCount members.
- reported by Arthur Kantor <akantor@bexusa.com>

2000-12-28 05:43:49 Tree
[c94735] by rpj rpj

./ChangeLog:
2000-12-28 Ross Johnson <rpj@special.ise.canberra.edu.au>

* private.c (ptw32_threadStart): Unhandled exceptions are
now passed through to the system to deal with. This is consistent
with normal Windows behaviour. C++ applications may use
set_terminate() to override the default behaviour which is
to call ptw32_terminate(). Ptw32_terminate() cleans up some
POSIX thread stuff before calling the system default function
which calls abort(). The users termination function should conform
to standard C++ semantics which is to not return. It should
exit the thread (call pthread_exit()) or exit the application.
* private.c (ptw32_terminate): Added as the default set_terminate()
function. It calls the system default function after cleaning up
some POSIX thread stuff.

* implement.h (ptw32_try_enter_critical_section): Move
declaration.
* global.c (ptw32_try_enter_critical_section): Moved
from dll.c.
* dll.c: Move process and thread attach/detach code into
functions in nonportable.c.
* nonportable.c (pthread_win32_process_attach_np): Process
attach code from dll.c is now available to static linked
applications.
* nonportable.c (pthread_win32_process_detach_np): Likewise.
* nonportable.c (pthread_win32_thread_attach_np): Likewise.
* nonportable.c (pthread_win32_thread_detach_np): Likewise.

* pthread.h: Add new non-portable prototypes for static
linked applications.

* GNUmakefile (OPT): Increase optimisation flag and remove
debug info flag.

* pthread.def: Add new non-portable exports for static
linked applications.

2000-12-11 Ross Johnson <rpj@special.ise.canberra.edu.au>

* FAQ: Update Answer 6 re getting a fully working
Mingw32 built library.

2000-09-09 Ross Johnson <rpj@special.ise.canberra.edu.au>

* pthread.h (ctime_r): Fix arg.

./tests/ChangeLog:
2000-12-28 Ross Johnson <rpj@special.ise.canberra.edu.au>

* eyal1.c: Increase thread work loads.
* exception2.c: New test.
* exception3.c: New test.
* Makefile: Add new tests exception2.c and exception3.c.
* GNUmakefile: Likewise.

2000-12-11 Ross Johnson <rpj@special.ise.canberra.edu.au>

* cleanup3.c: Remove unused variable.
* cleanup2.c: Likewise.
* exception1.c: Throw an exception rather than use
a deliberate zero divide so that catch(...) will
handle it under Mingw32. Mingw32 now builds the
library correctly to pass all tests - see Thomas
Pfaff's detailed instructions re needed changes
to Mingw32 in the Pthreads-Win32 FAQ.

2000-12-28 05:32:07 Tree
[548fc2] by rpj rpj

2000-09-13 Ross Johnson <rpj@setup1.ise.canberra.edu.au>

* mutex.c (pthread_mutex_init): Call
TryEnterCriticalSection through the pointer
rather than directly so that the dll can load
on Windows versions that can't resolve the
function, eg. Windows 95
- "Jef Gearhart" <jgearhart@tpssys.com>

2000-09-13 01:21:11 Tree
[63c486] (snap-2000-09-08) by rpj rpj

Note that pthreadGCE.dll is now built with Mingw32
but it still has known bugs.

2000-09-08 01:36:28 Tree
[9a5870] by rpj rpj

Edit CFLAGS.

2000-09-08 01:29:38 Tree
[199d96] by rpj rpj

2000-09-08 Ross Johnson <rpj@special.ise.canberra.edu.au>

* cancel.c (pthread_cancel): Must get "self" through
calling pthread_self() which will ensure a POSIX thread
struct is built for non-POSIX threads; return an error
if this fails
- Ollie Leahy <ollie@mpt.ie>
(pthread_setcancelstate): Likewise.
(pthread_setcanceltype): Likewise.
* misc.c (ptw32_cancelable_wait): Likewise.

* private.c (ptw32_tkAssocCreate): Remove unused #if 0
wrapped code.

* pthread.h (ptw32_get_exception_services_code):
Needed to be forward declared unconditionally.

2000-09-06 Ross Johnson <rpj@special.ise.canberra.edu.au>

* cancel.c (pthread_cancel): If called from the main
thread "self" would be NULL; get "self" via pthread_self()
instead of directly from TLS so that an implicit
pthread object is created.

* misc.c (pthread_equal): Strengthen test for NULLs.

2000-09-07 15:41:11 Tree
Older >