Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2002-06-27* thread.cc (pthread::create): Added trace printf to get CreateThreadChristopher Faylor
LastError.
2002-06-232002-06-12 Thomas Pfaff <tpfaff@gmx.net>Robert Collins
* thread.h (pthread::cleanup_stack): Renamed cleanup_handlers to cleanup_stack. * thread.cc (pthread::pthread): Ditto. (pthread::create): Fixed mutex verification. (pthread::push_cleanup_handler): Renamed cleanup_handlers to cleanup_stack. Mutex calls removed, used InterlockedExchangePointer instead. (pthread::pop_cleanup_handler): Renamed cleanup_handlers to cleanup_stack. (pthread::pop_all_cleanup_handlers): Ditto. (__pthread_once): Check state first and return if already done. (__pthread_join): DEADLOCK test reverted to __pthread_equal call. (__pthread_detach): Unlock mutex before deletion.
2002-06-21* uinfo.cc (cygheap_user::ontherange): Use env_name for NetUserGetInfo.Christopher Faylor
(cygheap_user::env_logsrv): Verify env_domain is valid. * environ.cc: Include child_info.h and keep spenvs[] sorted. (environ_init): Check child_proc_info instead of myself->ppid_handle.
2002-06-10/tmp/cvs610a0a90.1Robert Collins
2002-06-102002-06-10 Robert Collins <rbtcollins@hotmail.com>Robert Collins
* cygwin.din: Add _pthread_cleanup_push and _pthread_cleanup_pop. * pthread.cc: Change __pthread_self to pthread::self() thruoghout. (_pthread_cleanup_push): New function. (_pthread_cleanup_pop): Ditto. * thread.cc: Thanks to Thomas Pfaff for the pthread cleanup_push,_pop patch, this work is derived from that. Change __pthread_self to pthread::self() thruoghout. (__pthread_self): Rename to pthread::self. (pthread::self): New method. (pthread::pthread): Initialize new member. (pthread::push_cleanup_handler): New method. (pthread::pop_cleanup_handler): New method. (pthread::pop_all_cleanup_handlers): New method. (__pthread_exit): Pop all cleanup handlers. * thread.h (pthread::push_cleanup_handler): Declare. (pthread::pop_cleanup_handler): Ditto. (pthread::pop_all_cleanup_handlers): Ditto. (pthread::self): New static method. (__pthread_exit): Give C++ linkage. (__pthread_join): Ditto. (__pthread_detach): Ditto. (__pthread_self): Remove. 2002-04-24 Thomas Pfaff <tpfaff@gmx.net> * include/pthread.h (__pthread_cleanup_handler): New structure (pthread_cleanup_push): Rewritten . (pthread_cleanup_pop): Ditto. (_pthread_cleanup_push): New prototype. (_pthread_cleanup_pop) Ditto. 2002-04-24 Thomas Pfaff <tpfaff@gmx.net> * thread.cc (thread_init_wrapper): Check if thread is already joined. (__pthread_join): Set joiner first. (__pthread_detach): Ditto.
2002-06-05/tmp/cvs610a0efc.1Robert Collins
2002-06-05* dtable.cc (handle_to_fn): Attempt to handle "raw" accesses to remote shares.Christopher Faylor
* path.cc (mount_info::conv_to_win32_path): Set flags to binary when mount entry is not found. (mount_info::set_flags_from_win32_path): Ditto.
2002-06-02Remove unneeded sigproc.h includes throughout.Christopher Faylor
* fhandler.h (fhandler_proc::fill_filebuf): Take a pinfo argument. * fhandler_proc.cc (fhandler_proc::get_proc_fhandler): Simplify search for given pid. (fhandler_proc::readdir): Assume that pid exists if it shows up in the winpid list. * fhandler_process.cc (fhandler_process::open): Simplify search for given pid. Call fill_filebuf with pinfo argument. (fhandler_process::fill_filebuf): Pass pinfo here and assume that it exists. * pinfo.h (pinfo::remember): Define differently if sigproc.h is not included. * dll_init.cc (dll_list::detach): Don't run destructor on exit.
2002-05-25Remove unneeded sync.h, where appropriate, throughout. Remove unneeded heap.h,Christopher Faylor
where appropriate, throughout. Remove unneeded exceptions.h, where appropriate, throughout. Remove unneeded perprocess.h, where appropriate, throughout.
2002-05-022002-05-02 Robert Collins <rbtcollins@hotmail.com>Robert Collins
* thread.cc (__pthread_cond_dowait): Fix a race on signalling from a thread woken by the same condition variable it's signalling on. Thanks to Michael Beach for the report and test case.
2002-02-282002-02-28 Robert Collins <rbtcollins@hotmail.com>Robert Collins
* thread.cc (semaphore::TryWait): Set errno as required by posix 1003.1. (__sem_wait): Ditto. (__sem_trywait): Ditto.
2001-12-262001-12-26 Robert Collins <rbtcollins@hotmail.com>Robert Collins
* thread.cc (pthread_cond::Signal): Use a separate flag for signal detection and broadcast semantics. (__pthread_cond_dowait): Ditto. * thread.h (pthread_cond): New flag for testing when a waiter has woken.
2001-12-02minor reformatting.Christopher Faylor
2001-11-28* cygwin.din (ualarm): New export.Christopher Faylor
* dcrt0.cc (_dll_crt0): Add experimental tls storage declaration. (dll_crt0): Ditto. * debug.cc (thread_stub): Ditto. * thread.cc: Minor cleanup. (__pthread_create): Add experimental tls storage declaration. * miscfuncs.cc: Define tls index. * winsup.h: Declare experimental tls storage. * window.cc (alarm): Use old timer return from setitimer. (ualarm): New function.
2001-11-15* include/pthread.h (PTHREAD_COND_INITIALIZER): Define.Egor Duda
* thread.cc (__pthread_cond_destroy): Add support for PTHREAD_COND_INITIALIZER. (__pthread_cond_init): Ditto. (__pthread_cond_broadcast): Ditto. (__pthread_cond_signal): Ditto. (__pthread_cond_dowait): Ditto. (__pthread_mutex_init): Handle PTHREAD_MUTEX_INITIALIZER correctly, don't return error when it's passed as parameter. * winsup.h (check_null_invalid_struct): Call correct function.
2001-11-05Eliminate excess whitespace.Christopher Faylor
2001-09-30Mon Oct 1 00:34:00 2001 Robert Collins <rbtcollins@hotmail.com>Robert Collins
* thread.cc (pthread_cond_dowait): Hopefully eliminate a race on multiple thread wakeups.
2001-09-29Sat Sep 29 18:26:00 2001 Robert Collins <rbtcollins@hotmail.com>Robert Collins
* pthread.cc (pthread_cond_timedwait): Deleted - exported from thread.cc. (pthread_cond_wait): Deleted - exported from thread.cc. * thread.cc (pthread_cond::BroadCast): Update to use the new syntax for verifyable_object_isvalid (). (pthread_cond::Signal): Ditto. Also attempt to fix the lost signal race with pthread_cond::TimedWait(). (check_valid_pointer): Change definiton to void const *. (verifyable_object_isvalid): Add new parameter to allow identification of static initializers, and return a enum rather than magic numbers. (__pthread_create): Ditto. (__pthread_cleanup): Ditto. (__pthread_attr_init): Ditto. (__pthread_attr_getinheritsched): Ditto. (__pthread_attr_getschedparam): Ditto. (__pthread_attr_getschedpolicy): Ditto. (__pthread_attr_getscope): Ditto. (__pthread_attr_setdetachstate): Ditto. (__pthread_attr_getdetachstate): Ditto. (__pthread_attr_setinheritsched): Ditto. (__pthread_attr_setschedparam): Ditto. (__pthread_attr_setschedpolicy): Ditto. (__pthread_attr_setscope): Ditto. (__pthread_attr_setstacksize): Ditto. (__pthread_attr_getstacksize): Ditto. (__pthread_attr_destroy): Ditto. (__pthread_join): Ditto. (__pthread_detach): Ditto. (__pthread_suspend): Ditto. (__pthread_continue): Ditto. (__pthread_getschedparam): Ditto. (__pthread_getsequence_np): Ditto. (__pthread_key_create): Ditto. (__pthread_key_delete): Ditto. (__pthread_setschedparam): Ditto. (__pthread_setspecific): Ditto. (__pthread_getspecific): Ditto. (__pthread_cond_destroy): Ditto. (__pthread_cond_init): Ditto. (__pthread_cond_broadcast): Ditto. (__pthread_cond_signal): Ditto. (__pthread_condattr_init): Ditto. (__pthread_condattr_getpshared): Ditto. (__pthread_condattr_setpshared): Ditto. (__pthread_condattr_destroy): Ditto. (__pthread_kill): Ditto. (__pthread_mutex_init): Ditto. (__pthread_mutex_getprioceiling): Ditto. (__pthread_mutex_lock): Ditto. (__pthread_mutex_trylock): Ditto. (__pthread_mutex_unlock): Ditto. (__pthread_mutex_destroy): Ditto. (__pthread_mutex_setprioceiling): Ditto. (__pthread_mutexattr_getprotocol): Ditto. (__pthread_mutexattr_getpshared): Ditto. (__pthread_mutexattr_gettype): Ditto. (__pthread_mutexattr_init): Ditto. (__pthread_mutexattr_destroy): Ditto. (__pthread_mutexattr_setprotocol): Ditto. (__pthread_mutexattr_setprioceiling): Ditto. (__pthread_mutexattr_getprioceiling): Ditto. (__pthread_mutexattr_setpshared): Ditto. (__pthread_mutexattr_settype): Ditto. (__sem_init): Ditto. (__sem_destroy): Ditto. (__sem_wait): Ditto. (__sem_trywait): Ditto. (__sem_post): Ditto. (__pthread_cond_dowait): New function, contains core logic from __pthread_cond_wait and __pthread_cond_timedwait. Decrement (*cond)->waiting before reentering the cond access mutex to allow detection of lost signals. (__pthread_cond_timedwait): Rename to pthread_cond_timedwait, and call __pthread_cond_dowait after calculating the wait length. (__pthread_cond_wait): Rename to pthread_cond_wait, and call __pthread_cond_dowait. * thread.h: New enum for use with verifyable_object_isvalid. Remove the extern exporting of __pthread_cond_timedwait and __pthread_cond_wait.
2001-09-25Tue Sep 25 21:25:00 2001 Robert Collins <rbtcollins@hotmail.com>Robert Collins
* thread.cc (pthread_cond::BroadCast): Use address with verifyable_object_isvalid(). (pthread_cond::Signal): Ditto. (__pthread_create): Ditto. (__pthread_cleanup): Ditto. (__pthread_attr_init): Ditto. (__pthread_attr_getinheritsched): Ditto. (__pthread_attr_getschedparam): Ditto. (__pthread_attr_getschedpolicy): Ditto. (__pthread_attr_getscope): Ditto. (__pthread_attr_setdetachstate): Ditto. (__pthread_attr_getdetachstate): Ditto. (__pthread_attr_setinheritsched): Ditto. (__pthread_attr_setschedparam): Ditto. (__pthread_attr_setschedpolicy): Ditto. (__pthread_attr_setscope): Ditto. (__pthread_attr_setstacksize): Ditto. (__pthread_attr_getstacksize): Ditto. (__pthread_attr_destroy): Ditto. (__pthread_join): Ditto. (__pthread_detach): Ditto. (__pthread_suspend): Ditto. (__pthread_continue): Ditto. (__pthread_getschedparam): Ditto. (__pthread_getsequence_np): Ditto. (__pthread_key_create): Ditto. (__pthread_key_delete): Ditto. (__pthread_setschedparam): Ditto. (__pthread_setspecific): Ditto. (__pthread_getspecific): Ditto. (__pthread_cond_destroy): Ditto. (__pthread_cond_init): Ditto. (__pthread_cond_broadcast): Ditto. (__pthread_cond_signal): Ditto. (__pthread_cond_timedwait): Ditto. (__pthread_cond_wait): Ditto. (__pthread_condattr_init): Ditto. (__pthread_condattr_getpshared): Ditto. (__pthread_condattr_setpshared): Ditto. (__pthread_condattr_destroy): Ditto. (__pthread_kill): Ditto. (__pthread_mutex_init): Ditto. (__pthread_mutex_getprioceiling): Ditto. (__pthread_mutex_lock): Ditto. (__pthread_mutex_trylock): Ditto. (__pthread_mutex_unlock): Ditto. (__pthread_mutex_destroy): Ditto. (__pthread_mutex_setprioceiling): Ditto. (__pthread_mutexattr_getprotocol): Ditto. (__pthread_mutexattr_getpshared): Ditto. (__pthread_mutexattr_gettype): Ditto. (__pthread_mutexattr_init): Ditto. (__pthread_mutexattr_destroy): Ditto. (__pthread_mutexattr_setprotocol): Ditto. (__pthread_mutexattr_setprioceiling): Ditto. (__pthread_mutexattr_getprioceiling): Ditto. (__pthread_mutexattr_setpshared): Ditto. (__pthread_mutexattr_settype): Ditto. (__sem_init): Ditto. (__sem_destroy): Ditto. (__sem_wait): Ditto. (__sem_trywait): Ditto. (__sem_post): Ditto. (verifyable_object_isvalid): Recieve a pointer to a pointer for verification. (__pthread_mutexattr_getprotocol): Fix typo in magic number. (__pthread_mutexattr_getpshared): Ditto. (__pthread_mutexattr_gettype): Ditto. * thread.h (verifyable_object_isvalid): Change prototype to recieve a pointer to a pointer for verification. * include/pthread.h: Fix typo for __cleanup_routine_type typedef. (Contrib from Net).
2001-09-12 * Makefile.in: Build wincap.o.Corinna Vinschen
* wincap.cc: New file. * wincap.h: Ditto. * autoload.cc: Add dynamic load statement for `CreateHardLinkA'. * dcrt0.cc (os_being_run): Eliminated. (osname): Ditto. (iswinnt): Ditto. (set_os_type): Ditto. (dll_crt0_1): Call wincap.init() instead of set_os_type(). (_dll_crt0): Ditto. * environ.cc (set_chunksize): New function. (parse_thing): `forkchunk' setting now invokes function `set_chunksize'. * fork.cc (chunksize): Eliminated. Moved to be member of wincap. * host_dependent.h: Removed. * syscalls.cc (_link): Try using `CreateHardLinkA' first, if available. * cygheap.cc, dcrt0.cc, delqueue.cc, dir.cc, environ.cc, fhandler.cc, fhandler.h, fhandler_console.cc, fhandler_mem.cc, fork.cc, mmap.cc, net.cc, pinfo.cc, pinfo.h, security.cc, syscalls.cc, sysconf.cc, syslog.cc, thread.cc, times.cc, tty.cc, uinfo.cc, uname.cc, winsup.h: Use new wincap capability check throughout. * winsup.h: Include wincap.h. Eliminate extern declarations of `os_being_run' and `iswinnt'. Eliminate `os_type" definition. * include/cygwin/version.h: Bump version to 1.3.4.
2001-09-12minor cleanupsChristopher Faylor
2001-09-12Wed Sep 12 13:03:00 2001 Robert Collins <rbtcollins@hotmail.com>Robert Collins
* autoload.cc (LoadDLLfuncEx): Auto load TryEnterCriticalSection - its a n NT only call. * thread.cc (pthread_cond::TimedWait): Use critical sections for NT. (pthread_cond::fixup_after_fork): Don't detect bad apps. (pthread_mutex::pthread_mutex): Use critical sections for NT. (pthread_mutex::~pthread_mutex): Ditto. (pthread_mutex::Lock): Ditto. (pthread_mutex::TryLock): Ditto. (pthread_mutex::UnLock): Ditto. (pthread_mutex::fixup_after_fork): Ditto. Also do not detect bad apps. (__pthread_mutex_trylock): Move WIN32 specific test into the class metho d. (__pthread_mutex_destroy): Prevent dereferencing passed pointer without valid address. * thread.h (pthread_mutex): Use critical sections for NT.
2001-09-11Tue Sep 11 21:22:00 2001 Robert Collins <rbtcollins@hotmail.com>Robert Collins
* thread.cc (pthread_cond::~pthread_cond): Bugfix: Incorrect use of InterlockExchangePointer. (pthread_mutex::~pthread_mutex): Ditto. (semaphore::~semaphore): Ditto.
2001-09-11Tue Sep 11 18:15:00 2001 Robert Collins <rbtcollins@hotmail.com>Robert Collins
* dcrt0.cc (cygwin_finished_initializing): Copy _mtinterf on fork; * fork.cc (fork_child): fixup thread-related structures after fork; * thread.cc (MTinterface::Init): Initialise the new mutex, condition and semaphore lists. (MTinterface::fixup_after_fork): Iterate through each list and fixup the objects. (pthread_cond::pthread_cond): Add this to the condition list. (pthread_cond::~pthread_cond): Remove this from the condition list. (pthread_cond::fixup_after_fork): Recreate as best we can the pre-fork state. (pthread_mutex::pthread_mutex): Add this to the mutex list. (pthread_mutex::~pthread_mutex): Remove this from the mutex list. (pthread_mutex::fixup_after_fork): Recreate as best we can the pre-fork state. (semaphore::semaphore): Store the initial value, and add this to the semaphore list. (semaphore::~semaphore): Remove this from the semaphore list. (semaphore::Post): Increment the current semaphore value. (semaphore::TryWait): Decrement the current semaphore value. (semaphore::Wait): Ditto. (semaphote::fixup_after_fork): Recreate the pre-fork state as best we can. * thread.h (pthread_mutex): New members to allow fixup_after_fork. (pthread_cond): Ditto. (semaphore): Ditto. (MTinterface): New list heads for tracking conds and semaphores.
2001-09-10Mon Sep 10 08:28:00 2001 Robert Collins <rbtcollins@hotmail.com>Robert Collins
* thread.h (MT_Interface): Remove pshared mutex array. Add a threadsafe list for mutex tracking (for fixupafter fork). * thread.cc (MTInterface::Init): Remove pshared mutex array. (pthread_mutex::pthread_mutex): Remove pshared mutex functionality. Fail with EINVAL on attempts to use pshared functionality. (__pthread_mutex_getpshared): Remove. (__pthread_cond_timedwait): Remove pshared mutex functionality. (__pthread_cond_wait): Ditto. (__pthread_mutex_init): Ditto. (__pthread_mutex_getprioceiling): Ditto. (__pthread_mutex_lock): Ditto. (__pthread_mutex_trylock): Ditto. (__pthread_mutex_unlock): Ditto. (__pthread_mutex_destroy): Ditto. (__pthread_mutex_setprioceiling): Ditto. (__pthread_mutexattr_setpshared): Ditto.
2001-09-05* thread.cc (InterlockedExchangePointer): Don't define if it already exists.Christopher Faylor
2001-08-05Throughout, change check for running under Windows NT to 'iswinnt'.Christopher Faylor
* dcrt0.cc (set_os_type): Set 'iswinnt' appropriately. * cygheap.cc (init_cheap): Revert to using VirtualAlloc for allocating cygheap. (cygheap_setup_for_child_cleanup): New function. Standard function to call after calling CreateProcess to cleanup cygheap info passed to child. (cygheap_fixup_in_child): Copy cygheap from shared memory into allocated space under Windows 9x or if can't relocate shared space under NT. * cygheap.h: Declare new function. * spawn.cc (spawn_guts): Use cygheap_fixup_in_child. * fork.cc (fork_parent): Ditto. * winsup.h: Declare iswinnt.
2001-07-27* thread.cc (__pthread_equal): Invert return value so that true is returnedChristopher Faylor
when threads are equal.
2001-07-26Tue 24 Jul 2001 02:28:00 PM Trevor Forbes <t4bs@hotmail.com>Robert Collins
* thread.cc (verifyable_object_isvalid): Don't validate PTHREAD_MUTEX_INITIALIZER pointer as it will cause an exception in IsBadWritePtr() when running GDB.
2001-06-28Change check_null_empty_path* to check_null_empty_str* throughout.Christopher Faylor
* path.cc (path_conv::check): Add signal protection here since retrieving info about remote shares can take some time. * path.h (check_null_empty_str_errno): Convert to a function prototype. * path.cc (check_null_empty_str): Move to miscfuncs.cc. * miscfuncs.cc (check_null_empty_str_errno): New function. (__check_null_invalid_struct): Ditto. (__check_null_invalid_struct_errno): Ditto. (check_null_empty_str): Change from VirtualQuery to IsBadWritePtr. * thread.cc (check_valid_pointer): Ditto. * resource.cc (getrlimit): Use check_null_invalid_struct macro for checking validity of pointer. (setrlimit): Ditto.
2001-06-26Remove trailing tabs.Christopher Faylor
2001-06-26* mmap.cc: Clean up *ResourceLock calls throughout.Christopher Faylor
* thread.cc (pthread_cond::TimedWait): Check for WAIT_TIMEOUT as well as WAIT_ABANDONED. (__pthread_cond_timedwait): Calculate a relative wait from the abstime parameter.
2001-06-222001-06-22 Robert Collins rbtcollins@hotmail.comRobert Collins
* thread.cc (__pthread_cond_timedwait): Lock the waiting mutex before the condition protect mutex to avoid deadlocking. (Found by Greg Smith). (__pthread_cond_wait): Ditto.
2001-06-15* thread.cc (pthread_cond::Signal): Release the condition access variableChristopher Faylor
correctly.
2001-06-07* thread.cc (pthread_cond::Broadcast): Don't print error messages on invalidChristopher Faylor
mutexs - user programs are allowed to call pthread_cond_broadcast like that. (__pthread_cond_timedwait): Initialise themutex properly. (__pthread_cond_wait): Initialise themutex properly.
2001-05-07Sun May 6 17:05:00 2001 Robert Collins <rbtcollins@hotmail.com>Robert Collins
* thread.h (pthread_cond): New element cond_access to allow atomic broadcasts. * thread.cc (pthread_cond::pthread_cond): Initialise cond_access. (pthread_cond::~pthread_cond): Destroy cond_access. (pthread_cond::Broadcast): Use cond_access. (pthread_cond::Signal): Use cond_access. (pthread_cond_wait): Use cond_access. (pthread_cond_timedwait): Use cond_access.
2001-05-05Revert much of previous erroneous checkin. Add ChangeLog entry.Christopher Faylor
* pinfo.h: Correctly set __SIGOFFSET. * path.cc (hash_path_name): Avoid calling library functions for simple copying of characters. * shortcut.c: Use WIN32_LEAN_AND_MEAN. * smallprint.c: Ditto. * environ.cc (getwinenv): Minor clarity fix. * localtime.c: No need to include windows.h * string.h: New file.
2001-05-05* exceptions.cc (ctrl_c_handler): Always send signal to process if it has noChristopher Faylor
tty.
2001-04-27* thread.cc (thread_init_wrapper): Use _REENT_INIT to initialize the reentChristopher Faylor
structure of newlib. * sigproc.h (sig_send): Add exception parameter to sig_send. * sigproc.cc (sig_send): Ditto. Use it when setting frame info. * exceptions.cc (handle_exceptions): Use exception flag when calling sig_send.
2001-04-23spacing changes.Christopher Faylor
2001-04-23Mon Apr 23 9:27:00 2001 Robert Collins <rbtcollins@hotmail.com>Robert Collins
* thread.cc (MTinterface::Init): Always initialise per process variables.
2001-04-22* thread.cc (MTinterface::Init): Remove accidentally checked in code.Christopher Faylor
2001-04-21Sun Apr 22 20:22:00 2001 Robert Collins <rbtcollins@hotmail.com>Robert Collins
* passwd.cc (getpwuid): Check for thread cancellation. (getpwuid_r): Ditto. (getpwname): Ditto. (getpwnam_r): Ditto. * thread.h (pthread_mutex): New constructors for pshared operation. (MTinterface): Associative array for pshared mutex's. * thread.cc (MTinterface::Init): Initailize pshared mutex array. (pthread_cond::BroadCast): Implementation notes. (pthread_cond::TimedWait): Remove use of SignalObjectAndWait on non-NT systems. (pthread_mutex::pthread_mutex(unsigned short)): New function. (pthread_mutex::pthread_mutex (pthread_mutex_t *, pthread_mutexattr *)):New function. (pthread_mutex::pthread_mutex(pthread_mutexattr *)): Fail on pshared mutex's. (__pthread_mutex_getpshared): New function. (__pthread_join): Check for thread cancellation. (__pthread_cond_timedwait): Support pshared mutex's. (__pthread_cond_wait): Ditto. (__pthread_condattr_setpshared): Error on PROCESS_SHARED requests. (__pthread_mutex_init): Support pshared mutex's. (__pthread_mutex_getprioceiling): Ditto. (__pthread_mutex_lock): Ditto. (__pthread_mutex_trylock): Ditto. (__pthread_mutex_unlock): Ditto. (__pthread_mutex_destroy): Ditto. (__pthread_mutex_setprioceiling): Ditto. (__pthread_mutexattr_setpshared): Support PTHREAD_PROCESS_PSHARED requests.
2001-04-14Sat Apr 14 17:04:00 2001 Robert Collins <rbtcollins@hotmail.com>Robert Collins
* thread.h (MTinterface): Add threadcount. * thread.cc (MTinterface::Init): Set threadcount to 1. (__pthread_create): Increment threadcount. (__pthread_exit): Decrement threadcount and call exit() from the last thread.
2001-04-13* fork.cc (fork_child): Call the __pthread_atforkchild function.Christopher Faylor
(fork_parent): Call the __pthread_atforkparent function. * cygwin.din: Export pthread_atfork. * thread.h (callback): New class. (MTinterface): Use it. * thread.cc (__pthread_atforkprepare): New function. (__pthread_atforkparent): New function. (__pthread_atforkchild): New function. (__pthread_atfork): New function. * pthread.cc (pthread_atfork): New function.
2001-04-12 * configure.in: Remove PTH_ALLOW.Robert Collins
* cygwin.din: Remove @PTH_ALLOW@ prefixes to pthread functions. Add new pthread exports. * pthread.cc: New wrapper functions for the above new exports. * sched.cc (valid_sched_parameters): New function. (sched_setparam): Use it. (sched_set_thread_priority): New function. Used by pthread_sched*. * thread.cc (pthread_key_destructor::InsertAfter): New function. (pthread_key_destructor::UnlinkNext): New function. (pthread_key_destructor::Next): New function. (pthread_key_destructor_list::Insert): New function. (pthread_key_destructor_list::Remove): New function. (pthread_key_destructor_list::Pop): New function. (pthread_key_destructor::pthread_key_destructor): New function. (pthread_key_destructor_list::IterateNull): New function. (MTinterface::Init): Initialise new member. (pthread::pthread): Initialise new members. (pthread::create): Copy new attributes. Set the new thread priority. (pthread_attr::pthread_attr): Initialise new members. (pthread_key::pthread_key): Setup destructor function. (pthread_key::~pthread_key): Remove destructor function. (pthread_mutexattr::pthread_mutexattr): New function. (pthread_mutexattr::~pthread_mutexattr): New function. (__pthread_once): New function. (__pthread_cleanup): New function. (__pthread_cancel): New function. (__pthread_setcancelstate): New function. (__pthread_setcanceltype): New function. (__pthread_testcancel): New function. (__pthread_attr_getinheritsched): New function. (__pthread_attr_getschedparam): New function. (__pthread_attr_getschedpolicy): New function. (__pthread_attr_getscope): New function. (__pthread_attr_setinheritsched): New function. (__pthread_attr_setschedparam): New function. (__pthread_attr_setschedpolicy): New function. (__pthread_attr_setscope): New function. (__pthread_exit): Call any key destructors on thread exit. (__pthread_join): Use the embedded attr values. (__pthread_detach): Use the embedded attr values. (__pthread_getconcurrency): New function. (__pthread_getschedparam): New function. (__pthread_key_create): Pass the destructor on object creation. (__pthread_key_delete): Correct incorrect prototype. (__pthread_setconcurrency): New function. (__pthread_setschedparam): New function. (__pthread_cond_timedwait): Support static mutex initialisers. (__pthread_cond_wait): Ditto. (__pthread_mutex_getprioceiling): New function. (__pthread_mutex_lock): Support static mutex initialisers. (__pthread_mutex_trylock): Ditto. (__pthread_mutex_unlock): Ditto. (__pthread_mutex_destroy): Ditto. (__pthread_mutex_setprioceiling): New function. (__pthread_mutexattr_getprotocol): New function. (__pthread_mutexattr_getpshared): New function. (__pthread_mutexattr_gettype): New function. (__pthread_mutexattr_init): New function. (__pthread_mutexattr_destroy): New function. (__pthread_mutexattr_setprotocol): New function. (__pthread_mutexattr_setprioceiling): New function. (__pthread_mutexattr_getprioceiling): New function. (__pthread_mutexattr_setpshared): New function. (__pthread_mutexattr_settype): New function. Remove stubs for non MT_SAFE compilation. * thread.h: Remove duplicate #defines. Add prototypes for new functions in thread.cc. (pthread_key_destructor): New class. (pthread_key_destructor_list): New class. (pthread_attr): Add new members. (pthread): Remove members that are duplicated in the pthread_attr class. (pthread_mutex_attr): Add new members. (pthread_once): New class. * include/pthread.h: Add prototypes for new functions exported from cygwin1.dll. Remove typedefs. * include/sched.h: Add prototypes for new functions in sched.cc. * include/cygwin/types.h: Add typedefs from pthread.h
2001-04-09* Makefile.in: Put -lgcc last in list of libraries, since stdc++ library needsChristopher Faylor
it. * cygwin.din: Remove obsolete "__empty" export. * exceptions.cc (call_signal_handler_now): Force inclusion of function even when -finline-functions is specified. * sigproc.h: Remove obsolete call_signal_handler declaration. * fhandler_console.cc (cp_get_internal): New function. (cp_convert): New function. (con_to_str): New function. (str_to_con): New function. (fhandler_console::read): Replace OemToCharBuff with con_to_str. (fhandler_console::write_normal): Replace CharToOemBuff with str_to_con.
2001-03-21* sched.cc: New file. Implement sched*.Christopher Faylor
* include/sched.h: New file. User land includes for sched*. * Makefile.in: Add sched.o * cygwin.din: Add exports for sched*.
2001-03-19Fix spacing, copyrights.Christopher Faylor
2001-03-17* thread.cc (MTinterface::CreateCond): Check for null attr pointer.Christopher Faylor