| Age | Commit message (Collapse) | Author | 
|---|
|  | * build.bat: New DOS script to compile and link a pthreads app
        using Microsoft's CL compiler linker.
        * buildlib.bat: New DOS script to compile all the object files
        and create pthread.lib and pthread.dll using Microsoft's CL
        compiler linker. | 
|  | * README: Correct cygwin32 compatibility statement. | 
|  | that hadn't been checked in. Those are to finish off the original TSD management
scheme which will now start to be replaced by John Bossom's implementation.
Anders' description of his changes:-
Fixes the problem with
`TryEnterCriticalSection' on w95 systems. Instead
of directly calling `TryEnterCriticalSection' it
tries to get a pointer at DLL startup and only calls
the function if it exists. See ChangeLog for things
changed.
1998-12-05  Anders Norlander  <anorland@hem2.passagen.se>
	* implement.h (_pthread_try_enter_critical_section): New extern
	* dll.c (_pthread_try_enter_critical_section): New pointer to
	TryEnterCriticalSection if it exists; otherwise NULL.
	* dll.c (PthreadsEntryPoint):
	Initialize _pthread_try_enter_critical_section at startup
	and release kernel32 handle when DLL is being unloaded.
	* mutex.c (pthread_mutex_trylock): Replaced check for NT with
	a check if _pthread_try_enter_critical_section is valid
	pointer to a function. Call _pthread_try_enter_critical_section
	instead of TryEnterCriticalSection to avoid errors on Win95.
Sun Nov 15 21:24:06 1998  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>
	* cleanup.c (_pthread_destructor_run_all): Declare missing void * arg.
	Fixup CVS merge conflicts.
Fri Oct 30 15:15:50 1998  Ross Johnson  <rpj@swan.canberra.edu.au>
	* cleanup.c (_pthread_handler_push): Fixed bug appending new
	handler to list reported by Peter Slacik
	<Peter.Slacik@leibinger.freinet.de>.
	(new_thread): Rename poorly named local variable to
	"new_handler".
Sat Oct 24 18:34:59 1998  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>
	* global.c: Add TSD key management array and index declarations.
	* implement.h: Ditto for externs.
Fri Oct 23 00:08:09 1998  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>
	* implement.h (_PTHREAD_TSD_KEY_REUSE): Add enum.
	* private.c (_pthread_delete_thread): Add call to
	_pthread_destructor_run_all() to clean up the threads keys.
	* cleanup.c (_pthread_destructor_run_all): Check for no more dirty
	keys to run destructors on. Assume that the destructor call always
	succeeds and set the key value to NULL. | 
|  | * condvar.c (cond_wait): Fix semantic error. Test for equality
	instead of making an assignment. | 
|  | * cleanup.c (_pthread_handler_push): Fixed bug appending new
        handler to list reported by Peter Slacik
        <Peter.Slacik@leibinger.freinet.de>.
        (new_thread): Rename poorly named local variable to
        "new_handler". | 
|  | * tsd.c: Add description of pthread_key_delete() from the
	standard as a comment. | 
|  | * private.c (_pthread_new_thread): Remove init of destructorstack.
	No longer an element of pthread_t. | 
|  | * tsd.c (pthread_setspecific): Fix type declaration and cast.
	(pthread_getspecific): Ditto.
	(pthread_getspecific): Change error return value to NULL if key
	is not in use.
Yet again. | 
|  | * tsd.c (pthread_setspecific): Fix type declaration and cast.
        (pthread_getspecific): Ditto. | 
|  | * global.c (_pthread_tsd_key_table): Fix declaration.
        * implement.h(_pthread_TSD_keys_TlsIndex): Add missing extern.
        (_pthread_tsd_mutex): Ditto.
        * create.c (_pthread_start_call): Fix "keys" array declaration.
        Add comment.
        * tsd.c (pthread_setspecific): Fix type declaration and cast.
        (pthread_getspecific): Ditto.
        * cleanup.c (_pthread_destructor_run_all): Declare missing loop
        counter. | 
|  | * private.c (_pthread_new_thread): Increment _pthread_threads_count.
	(_pthread_delete_thread): Decrement _pthread_threads_count.
	Remove some comments.
	* exit.c (_pthread_exit): : Fix two pthread_mutex_lock() calls that
 	should have been pthread_mutex_unlock() calls.
	(_pthread_vacuum): Remove call to _pthread_destructor_pop_all().
	* create.c (pthread_create): Fix two pthread_mutex_lock() calls that
 	should have been pthread_mutex_unlock() calls.
	* global.c (_pthread_tsd_mutex): Add mutex for TSD operations.
	* tsd.c (pthread_key_create): Add critical section.
	(pthread_setspecific): Ditto.
	(pthread_getspecific): Ditto.
	(pthread_key_delete): Ditto.
	* sync.c (pthread_join): Fix two pthread_mutex_lock() calls that
 	should have been pthread_mutex_unlock() calls. | 
|  | * implement.h (_pthread_tsd_key_table): New.
        * create.c (_pthread_start_call): Initialise per-thread TSD keys
        to NULL.
        * misc.c (pthread_once): Correct typo in comment.
        * implement.h (_pthread_destructor_push): Remove.
        (_pthread_destructor_pop): Remove.
        (_pthread_destructor_run_all): Rename from _pthread_destructor_pop_all.
        (_PTHREAD_TSD_KEY_DELETED): Add enum.
        (_PTHREAD_TSD_KEY_INUSE): Add enum.
        * cleanup.c (_pthread_destructor_push): Remove.
        (_pthread_destructor_pop): Remove.
        (_pthread_destructor_run_all): Totally revamped TSD.
        * dll.c (_pthread_TSD_keys_TlsIndex): Initialise.
        * tsd.c (pthread_setspecific): Totally revamped TSD.
        (pthread_getspecific): Ditto.
        (pthread_create): Ditto.
        (pthread_delete): Ditto.
Sun Oct 11 22:44:55 1998  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>
        * global.c (_pthread_tsd_key_table): Add new global.
        * implement.h (_pthread_tsd_key_t and struct _pthread_tsd_key):
        Add.
        (struct _pthread): Remove destructorstack.
        * cleanup.c (_pthread_destructor_run_all): Rename from
        _pthread_destructor_pop_all. The key destructor stack was made
        global rather than per-thread. No longer removes destructor nodes
        from the stack. Comments updated. | 
|  | * condvar.c (cond_wait): Use POSIX, not Win32 mutex calls.
	(pthread_cond_broadcast): Likewise.
	(pthread_cond_signal): Likewise. | 
|  | * pthread.def: Update. Some functions aren't available yet, others
	are macros in <pthread.h>.
	* tests/join.c: Remove; useless. | 
|  | * pthread.def: New file for building the DLL. | 
|  | * 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). | 
|  | * configure.in: Test for __stdcall, not _stdcall. Typo.
	* configure: Regenerate. | 
|  | * attr.c (pthread_attr_setstackaddr): Remove FIXME comment. Win32
        does know about ENOSYS after all.
        (pthread_attr_setstackaddr): Likewise. | 
|  | * create.c (_pthread_start_call): Add STDCALL prefix. | 
|  | * config.h.in: Regenerate. | 
|  | * configure.in: Test for the `_stdcall' keyword.  Define `STDCALL'
	to `_stdcall' if we have it, null otherwise.
	* configure: Regenerate.
	* acconfig.h (STDCALL): New define. | 
|  | * mutex.c (pthread_mutex_init): Correct function signature. | 
|  | * attr.c (pthread_attr_init): Only zero out the `sigmask' member
        if we have the sigset_t type.
        * pthread.h (pthread_sigmask): Only provide if we have the
	sigset_t type. | 
|  | * pthread.h: No need to include <unistd.h>.  It doesn't even exist
	on Win32! Again, an artifact of cross-compilation. | 
|  | * process.h: Remove. This was a stand-in before we started doing
	native compilation under Win32.
	* pthread.h (pthread_mutex_init): Make `attr' argument const. | 
|  | * COPYING: Remove.
	* COPYING.LIB: Add. This library is under the LGPL. | 
|  |  | 
|  |  | 
|  | * configure.in: Test for required system features.
	* configure: Generate.
	* acconfig.h: New file.
	* config.h.in: Generate.
	* Makefile.in: Renamed from Makefile.
	* COPYING: Import from a recent GNU package.
	* config.guess: Likewise.
	* config.sub: Likewise.
	* install-sh: Likewise.
	* Makefile: Remove.
	* config.h: Likewise. | 
|  | POSIX TSD on top of Win32 TLS. | 
|  | * windows.h: No longer needed; remove.
        * windows.c: Likewise. | 
|  |  | 
|  | * {most}.c: Include <errno.h> to get POSIX error values.
        * signal.c (pthread_sigmask): Only provide if HAVE_SIGSET_T is
        defined.
        * config.h: #undef features, don't #define them.  This will be
        generated by autoconf very soon. | 
|  | * Makefile (LIB): Define.
        (clean): Define target.
        (all): Build a library not just the object files.
        * pthread.h: Provide a definition for struct timespec if we don't
        already have one.
        * windows.c (TlsGetValue): Bug fix. | 
|  |  | 
|  | Thu Aug  6 15:19:22 1998  Ross Johnson  <rpj@swan.canberra.edu.au>
	* create.c (pthread_create): Typecast (HANDLE) NULL.
	Typecast (unsigned (*)(void *)) start_routine. | 
|  | * condvar.c (pthread_cond_init): Add address-of operator & to
	arg 1 of pthread_mutex_init() call.
	(pthread_cond_destroy): Add address-of operator & to
	arg 1 of pthread_mutex_destroy() call. | 
|  | * cleanup.c (_pthread_destructor_pop_all): Add (int) cast to
	pthread_getspecific() arg.
	(_pthread_destructor_pop): Add (void *) cast to "if" conditional.
	(_pthread_destructor_push): Add (void *) cast to
	_pthread_handler_push() "key" arg.
	(malloc.h): Add include. | 
|  | * implement.h (_pthread_destructor_pop): Add prototype.
	* tsd.c (implement.h): Add include. | 
|  | * sync.c (pthread_join): Remove target_thread_mutex and it's
	initialisation. Rename getdetachedstate to getdetachstate.
	Remove unused variable "exitcode".
	(pthread_detach): Remove target_thread_mutex and it's
	initialisation. Rename getdetachedstate to getdetachstate.
	Rename setdetachedstate to setdetachstate. | 
|  | * signal.c (pthread_sigmask): Rename SIG_SET to SIG_SETMASK.
	Cast "set" to (long *) in assignment to passify compiler warning.
	Add address-of operator & to thread->attr.sigmask in memcpy() call
	and assignment.
	(pthread_sigmask): Add address-of operator & to thread->attr.sigmask
	in memcpy() call and assignment. | 
|  | * windows.h (THREAD_PRIORITY_ERROR_RETURN): Add.
	(THREAD_PRIORITY_LOWEST): Add.
	(THREAD_PRIORITY_HIGHEST): Add.
	* sched.c (is_attr): Add function.
	(implement.h): Add include.
	(pthread_setschedparam): Rename all instances of "sched_policy"
	to "sched_priority".
	(pthread_getschedparam): Ditto. | 
|  | * private.c (_pthread_delete_thread): Fix typo. Add missing ';'.
        * global.c (_pthread_virgins): Change types from pointer to
        array pointer.
        (_pthread_reuse): Ditto.
        (_pthread_win32handle_map): Ditto.
        (_pthread_threads_mutex_table): Ditto.
        * implement.h(_pthread_virgins): Change types from pointer to
        array pointer.
        (_pthread_reuse): Ditto.
        (_pthread_win32handle_map): Ditto.
        (_pthread_threads_mutex_table): Ditto.
        * private.c (_pthread_delete_thread): Fix "entry" should be "thread".
        * misc.c (pthread_self): Add extern for _pthread_threadID_TlsIndex.
        * global.c: Add comment.
        * misc.c (pthread_once): Fix member -> dereferences.
        Change _pthread_once_flag to once_control->flag in "if" test. | 
|  | * implement.h(_pthread_virgins): Add extern.
	(_pthread_virgin_next): Ditto.
	(_pthread_reuse): Ditto.
	(_pthread_reuse_top): Ditto.
	(_pthread_win32handle_map): Ditto.
	(_pthread_threads_mutex_table): Ditto.
	* global.c (_pthread_virgins): Changed from array to pointer.
	Storage allocation for the array moved into dll.c.
	(_pthread_reuse): Ditto.
	(_pthread_win32handle_map): Ditto.
	(_pthread_threads_mutex_table): Ditto.
	* dll.c (PthreadsEntryPoint): Set up thread admin storage when
	DLL is loaded.
	* fork.c (pthread_atfork): Fix function pointer arg to all
	_pthread_handler_push() calls. Change "arg" arg to NULL in child push.
	* exit.c: Add windows.h and process.h includes.
	(_pthread_exit): Add local detachstate declaration.
	(_pthread_exit): Fix incorrect name for pthread_attr_getdetachstate().
	* pthread.h (_POSIX_THREAD_ATTR_STACKSIZE): Move from global.c
	(_POSIX_THREAD_ATTR_STACKADDR): Ditto.
	* create.c (pthread_create): Fix #if should be #ifdef.
	(_pthread_start_call): Remove usused variables.
	* process.h: Create.
	* windows.h: Move _beginthreadex and _endthreadex into
	process.h
Mon Aug  3 21:19:57 1998  Ross Johnson  <rpj@ixobrychus.canberra.edu.au>
	* condvar.c (pthread_cond_init): Add NULL attr to
	pthread_mutex_init() call - default attributes will be used.
	(cond_wait): Fix typo.
	(cond_wait): Fix typo - cv was ev.
	(pthread_cond_broadcast): Fix two identical typos.
	* cleanup.c (_pthread_destructor_pop_all): Remove _ prefix from
	PTHREAD_DESTRUCTOR_ITERATIONS.
	* pthread.h: Move _POSIX_* values into posix.h
	* pthread.h: Fix typo in pthread_mutex_init() prototype.
	* attr.c (pthread_attr_init): Fix error in priority member init.
	* windows.h (THREAD_PRIORITY_NORMAL): Add.
	* pthread.h (sched_param): Add missing ';' to struct definition.
	* attr.c (pthread_attr_init): Remove obsolete pthread_attr_t
	member initialisation - cancelstate, canceltype, cancel_pending.
	(is_attr): Make arg "attr" a const.
	* implement.h (_PTHREAD_HANDLER_POP_LIFO): Remove definition.
	(_PTHREAD_HANDLER_POP_FIFO): Ditto.
	(_PTHREAD_VALID): Add missing newline escape (\).
	(_pthread_handler_node): Make element "next" a pointer. | 
|  | * windows.h: Remove duplicate TlsSetValue() prototype.  Add
        TlsGetValue() prototype.
        (FALSE): Define.
        (TRUE): Likewise.
        Add forgotten errno values.  Guard against multiple #includes.
        * windows.c: New file.  Implement stubs for Win32 functions.
        * Makefile (SRCS): Remove.  Not explicitly needed.
        (CFLAGS): Add -Wall for all warnings with GCC. |