Age | Commit message (Collapse) | Author |
|
* {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.
|
|
* exit2.c (func): Return a value.
(main): Call the right thread entry function.
|
|
|
|
* 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.
|
|
* config.h: Create. This is a temporary stand-in for autoconf yet
to be done.
(HAVE_SIGNAL_H): Add.
* pthread.h: Minor rearrangement for temporary config.h.
|
|
* cleanup.c (_pthread_destructor_pop): Implement. Removes
destructors associated with a key without executing them.
(_pthread_destructor_pop_all): Add FIXME comment.
* tsd.c (pthread_key_delete): Add call to _pthread_destructor_pop().
|
|
|
|
* tsd.c (pthread_key_create): Update to properly associate
the destructor routine with the key.
* exit.c (_pthread_vacuum): Add call to
_pthread_destructor_pop_all().
|
|
* implement.h (_pthread_handler_pop_all): Add prototype.
(_pthread_destructor_pop_all): Ditto.
* cleanup.c (_pthread_destructor_push): Implement. This is just a
call to _pthread_handler_push().
(_pthread_destructor_pop_all): Implement. This is significantly
different to _pthread_handler_pop_all().
|
|
* Makefile (SRCS): Create. Preliminary.
* windows.h: Create. Contains Win32 definitions for compile
testing. This is just a standin for the real one.
* pthread.h (SIG_UNBLOCK): Fix typo. Was SIG_BLOCK.
(windows.h): Add include. Required for CRITICAL_SECTION.
(pthread_cond_t): Move enum declaration outside of struct
definition.
(unistd.h): Add include - may be temporary.
* condvar.c (windows.h): Add include.
|
|
* implement.h (_PTHREAD_THIS): Remove - no longer required.
(_PTHREAD_STACK): Use pthread_self() instead of _PTHREAD_THIS.
|
|
* implement.h: Remove _pthread_find_entry() prototype.
* private.c: Extend comments.
Remove _pthread_find_entry() - no longer needed.
* create.c (_pthread_start_call): Add call to TlsSetValue() to
store the thread ID.
* dll.c (PthreadsEntryPoint): Implement. This is called
whenever a process loads the DLL. Used to initialise thread
local storage.
* implement.h: Add _pthread_threadID_TlsIndex.
Add ()s around _PTHREAD_VALID expression.
* misc.c (pthread_self): Re-implement using Win32 TLS to store
the threads own ID.
|
|
* private.c: Corrections in comments.
(_pthread_new_thread): Alter "if" flow to be more natural.
|
|
* cleanup.c (_pthread_handler_push): Same as below.
* create.c (pthread_create): Same as below.
* private.c (_pthread_new_thread): Rename "new" to "new_thread".
Since when has a C programmer been required to know C++?
|
|
* implement.h: Add _PTHREAD_VALID macro.
* sync.c (pthread_join): Modify to use the new thread
type and _pthread_delete_thread(). Rename "target" to "thread".
Remove extra local variable "target".
(pthread_detach): Ditto.
* signal.c (pthread_sigmask): Move init of "us" out of inner block.
Fix instance of "this" should have been "us". Rename "us" to "thread".
* sched.c (pthread_setschedparam): Modify to use the new thread
type.
(pthread_getschedparam): Ditto.
* private.c (_pthread_find_thread): Fix return type and arg.
* implement.h: Remove _PTHREAD_YES and _PTHREAD_NO.
(_pthread_new_thread): Add prototype.
(_pthread_find_thread): Ditto.
(_pthread_delete_thread): Ditto.
(_pthread_new_thread_entry): Remove prototype.
(_pthread_find_thread_entry): Ditto.
(_pthread_delete_thread_entry): Ditto.
( _PTHREAD_NEW, _PTHREAD_INUSE, _PTHREAD_EXITED, _PTHREAD_REUSE):
Add.
* create.c (pthread_create): Minor rename "us" to "new" (I need
these cues but it doesn't stop me coming out with some major bugs
at times).
Load start_routine and arg into the thread so the wrapper can
call it.
* exit.c (pthread_exit): Fix pthread_this should be pthread_self.
* cancel.c (pthread_setcancelstate): Change
_pthread_threads_thread_t * to pthread_t and init with
pthread_this().
(pthread_setcanceltype): Ditto.
|
|
* exit.c (_pthread_exit): Add new pthread_t arg.
Rename _pthread_delete_thread_entry to _pthread_delete_thread.
Rename "us" to "thread".
(pthread_exit): Call _pthread_exit with added thread arg.
|
|
* create.c (_pthread_start_call): Insert missing ")".
Add "us" arg to _pthread_exit() call.
(pthread_create): Modify to use new thread allocation scheme.
|
|
* private.c: Added detailed explanation of the new thread
allocation scheme.
(_pthread_new_thread): Totally rewritten to use
new thread allocation scheme.
(_pthread_delete_thread): Ditto.
(_pthread_find_thread): Obsolete.
|
|
* create.c (pthread_create): Start of rewrite. Not completed yet.
* private.c (_pthread_new_thread_entry): Start of rewrite. Not
complete.
* implement.h (_pthread_threads_thread): Rename, remove thread
member, add win32handle and ptstatus members.
(_pthread_t): Add.
* pthread.h: pthread_t is no longer mapped directly to a Win32
HANDLE type. This is so we can let the Win32 thread terminate and
reuse the HANDLE while pthreads holds it's own thread ID until
the last waiting join exits.
|
|
* private.c (_pthread_delete_thread_entry): Destroy the thread
entry attribute object before deleting the thread entry itself.
* attr.c (pthread_attr_init): Initialise cancel_pending = FALSE.
(pthread_attr_setdetachstate): Rename "detached" to "detachedstate".
(pthread_attr_getdetachstate): Ditto.
* exit.c (_pthread_exit): Fix incorrect check for detachedstate.
* implement.h (_pthread_call_t): Remove env member.
|
|
* implement.h (_pthread_new_thread_entry): Fix prototype.
(_pthread_find_thread_entry): Ditto.
(_pthread_delete_thread_entry): Ditto.
(_pthread_exit): Add prototype.
|
|
* exit.c (_pthread_exit): Clarify comment.
|
|
* exit.c (_pthread_exit): Move thread entry delete call from _pthread_vacuum()
into here. Add more explanation of thread entry deletion.
|
|
* exit.c (_pthread_exit): New function. Called from pthread_exit()
and _pthread_start_call() to exit the thread. It allows an extra
argument which is the return code passed to _endthreadex().
* create.c (_pthread_start_call): Change pthread_exit() call to
_pthread_exit() call.
|
|
* exit.c (_pthread_vacuum): Add thread entry deletion code
moved from _pthread_start_call(). See next item.
(pthread_exit): Remove longjmp(). Add mutex lock around thread table
manipulation code. This routine now calls _enthreadex().
* create.c (_pthread_start_call): Remove setjmp() call and move
cleanup code out. Call pthread_exit(NULL) to terminate the thread.
|
|
* tsd.c (pthread_getspecific): Update comments.
|
|
* mutex.c (pthread_mutexattr_setpshared): Not supported; remove.
(pthread_mutexattr_getpshared): Likewise.
* pthread.h (pthread_mutexattr_setpshared): Remove prototype.
(pthread_mutexattr_getpshared): Likewise.
|
|
* sync.c: Rename all instances of _pthread_count_mutex to
_pthread_table_mutex.
* implement.h: Rename _pthread_count_mutex to
_pthread_table_mutex.
* global.c: Rename _pthread_count_mutex to
_pthread_table_mutex.
* create.c (pthread_create): Add critical sections.
(_pthread_start_call): Rename _pthread_count_mutex to
_pthread_table_mutex.
|
|
* cancel.c (pthread_setcancelstate): Fix indirection bug and rename
"this" to "us".
|
|
* signal.c (pthread_sigmask): Rename "this" to "us" and fix some
minor syntax errors. Declare "us" and initialise it.
* sync.c (pthread_detach): Rename "this" to "target".
|
|
* pthread.h: Converting PTHREAD_* defines to alias the (const int)
values in global.c.
* global.c: Started converting PTHREAD_* defines to (const int) as
a part of making the eventual pthreads DLL binary compatible
through version changes.
|
|
* condvar.c (cond_wait): Add cancelation point. This applies the
point to both pthread_cond_wait() and pthread_cond_timedwait().
* exit.c (pthread_exit): Rename "this" to "us".
* implement.h: Add comment.
* sync.c (pthread_join): I've satisfied myself that pthread_detach()
does set the detached attribute in the thread entry attributes
to PTHREAD_CREATE_DETACHED. "if" conditions were changed to test
that attribute instead of a separate flag.
* create.c (pthread_create): Rename "this" to "us".
(pthread_create): cancelstate and canceltype are not attributes
so the copy to thread entry attribute storage was removed.
Only the thread itself can change it's cancelstate or canceltype,
ie. the thread must exist already.
|
|
* private.c (_pthread_delete_thread_entry): Mutex locks removed.
Mutexes must be applied at the caller level.
(_pthread_new_thread_entry): Ditto.
(_pthread_new_thread_entry): Init cancelstate, canceltype, and
cancel_pending to default values.
(_pthread_new_thread_entry): Rename "this" to "new".
(_pthread_find_thread_entry): Rename "this" to "entry".
(_pthread_delete_thread_entry): Rename "thread_entry" to "entry".
* create.c (_pthread_start_call): Mutexes changed to
_pthread_count_mutex. All access to the threads table entries is
under the one mutex. Otherwise chaos reigns.
Sat Jul 25 23:16:51 1998 Ross Johnson <rpj@ixobrychus.canberra.edu.au>
* implement.h (_pthread_threads_thread): Move cancelstate and
canceltype members out of pthread_attr_t into here.
|
|
* fork.c (fork): Add comment.
|
|
* fork.c (fork): Autoconfiscate.
|
|
* create.c (_pthread_start_call): Set thread priority. Ensure our
thread entry is removed from the thread table but only if
pthread_detach() was called and there are no waiting joins.
(pthread_create): Set detach flag in thread entry if the
thread is created PTHREAD_CREATE_DETACHED.
* pthread.h (pthread_attr_t): Rename member "detachedstate".
* attr.c (pthread_attr_init): Rename attr members.
* exit.c (pthread_exit): Fix indirection mistake.
* implement.h (_PTHREAD_THREADS_TABLE_INDEX): Add.
* exit.c (_pthread_vacuum): Fix incorrect args to
_pthread_handler_pop_all() calls.
Make thread entry removal conditional.
* sync.c (pthread_join): Add multiple join and async detach handling.
* implement.h (_PTHREAD_THREADS_TABLE_INDEX): Add.
* global.c (_pthread_threads_mutex_table): Add.
* implement.h (_pthread_once_flag): Remove.
(_pthread_once_lock): Ditto.
(_pthread_threads_mutex_table): Add.
* global.c (_pthread_once_flag): Remove.
(_pthread_once_lock): Ditto.
* sync.c (pthread_join): Fix tests involving new return value
from _pthread_find_thread_entry().
(pthread_detach): Ditto.
* private.c (_pthread_find_thread_entry): Failure return code
changed from -1 to NULL.
|
|
|
|
* create.c (pthread_create): Change . to -> in sigmask memcpy() args.
|
|
* pthread.h: (pthread_cancel): Add function prototype.
(pthread_testcancel): Ditto.
|