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
2010-02-12* pthread.cc (pthread_mutex_init): Explicitly fill out third arg toChristopher Faylor
pthread_mutex::init. * thread.cc: Remov some obsolete comments. (verifyable_object_isvalid): Reflect change to use thread_magic_t for magic numbers. (pthread_mutex::pthread_mutex): Set magic number to invalid initially until we've verified that everything is valid. (pthread_mutex::unlock): Fix a comment. (verifyable_object::verifyable_object): Delete here. (~verifyable_object::~verifyable_object): Ditto. (pthread_mutex::init): Don't run is_good_initializer for non-static objects. * thread.h (thread_magic_t): New typedef. (verifyable_object::verifyable_object): Use thread_magic_t; (verifyable_object::magic): Ditto. (pthread_mutex::is_good_initializer_or_bad_object): Remove unneeded variable names. (pthread_mutex::can_be_unlocked): Ditto. (pthread_mutex::init): Ditto. Remove default for third argument.
2010-02-10* dcrt0.cc (_dll_crt0): Set _main_tls as early as possible.Christopher Faylor
* thread.cc (pthread_mutex::can_be_unlocked): Remove check for MUTEX_OWNER_ANONYMOUS since it is racy and unsafe. (pthread::init_mainthread): Initialize thread directly from _my_tls. (pthread::self): Ditto. (pthread::get_tls_self_pointer): Delete. (pthread_mutex::pthread_mutex): Use an event rather than a semaphore. (pthread_mutex::lock): Rename from _<func>. Derive self directly. (pthread_mutex::tryunlock): Ditto. (pthread_mutex::destroy): Ditto. (pthread_mutex::unlock): Ditto. Accommodate change from semaphore to event. (pthread_mutex::_fixup_after_fork): Accommodate change from semaphore to event. (pthread_mutex::init): Don't attempt to initialize a semaphore unless it is in an initialized state. Do this check under mutex_initialization_lock.lock * thread.h (fast_mutex::init): Use event rather than semaphore. (fast_mutex::lock): Ditto. (pthread_mutex::_lock): Delete. (pthread_mutex::_unlock): Ditto. (pthread_mutex::_trylock): Ditto. (pthread_mutex::_destroy): Ditto. (pthread_mutex::get_pthread_self): Ditto. (pthread_mutex::get_tls_self_pointer): Ditto. (pthread_mutex::lock): Un-inline. (pthread_mutex::unlock): Ditto. (pthread_mutex::trylock): Ditto. (pthread_mutex::destroy): Ditto.
2010-02-10* cygtls.h (struct _cygtls): Remove unneeded elements.Christopher Faylor
* thread.cc (pthread::exit): Avoid potential double call to _my_tls.remove. * tlsoffsets.h: Regenerate.
2009-12-18 Throughout, replace hMainProc with GetCurrentProcess/NtCurrentProcessCorinna Vinschen
according to context. Throughout, replace hMainThread with GetCurrentThread/NtCurrentThread according to context. * dcrt0.cc (dll_crt0_0): Drop duplication of GetCurrentProcess to hMainProc. Drop duplication of GetCurrentThread to hMainThread. * dtable.cc (dtable::stdio_init): Remove useless comment. * globals.cc (hMainProc): Remove. (hMainThread): Remove. * ntdll.h (NtCurrentProcess): Define. (NtCurrentThread: Define.
2009-06-04 * thread.cc (__cygwin_lock_lock): Delete racy optimisation.Dave Korn
(__cygwin_lock_unlock): Likewise.
2009-01-20 * thread.h (struct pthread_rwlock::RWLOCK_READER): Add counter n.Corinna Vinschen
* thread.cc (pthread_rwlock::rdlock): If a thread already owns a read lock, just count the number of locks for it, per SUSv4. (pthread_rwlock::tryrdlock): Ditto. (pthread_rwlock::unlock): If a thread has more than one concurrent read locks, just count down.
2008-11-07* pthread.cc (pthread_mutex::_unlock): Avoid unlocking a mutex if theChristopher Faylor
recursion_counter is already 0. (pthread_mutex::_destroy): Don't consider a mutex busy if its recursion_counter == 0. (pthread_mutex::_fixup_after_fork): Set recursion_counter to 0 to flag that we've just forked. Don't reset the owner of this mutex since the forkee may think it still owns the mutex. Reinstate initialization of win32_obj_id. * fhandler_floppy.cc (fhandler_dev_floppy::raw_read): Initialize a variable to bypass a C++ warning.
2008-09-30* thread.cc (pthread_mutex::_fixup_after_fork): Reinstate DEBUGGINGChristopher Faylor
conditional.
2008-09-30* thread.cc (pthread_mutex::_fixup_after_fork): Just reset lock to pristineChristopher Faylor
state after fork. Don't recreate a mutex since it may not actually be needed.
2008-04-21 * Makefile.in (DLL_OFILES): Add kernel32.o.Corinna Vinschen
* autoload.cc (WSACloseEvent): Remove. (WSACreateEvent): Remove. * cygheap.cc (cygheap_init): Drop initializing shared_prefix. * cygheap.h (struct init_cygheap): Drop shared_prefix and shared_prefix_buf members. * fhandler_socket.cc (sock_shared_name): New static function. (search_wsa_event_slot): Convert name buffers to WCHAR. Call NtCreateMutant/NtOpenMutant to create mutexes in session local namespace. (fhandler_socket::init_events): Ditto. Fix debug output. (fhandler_socket::release_events): Close mutexes using NtClose. (fhandler_socket::dup): Ditto. * kernel32.cc: New file, implementing Win32 calls in a Cygwin-specific way. * mmap.cc (MapView): Make static. * ntdll.h: Fix status code sorting. (STATUS_OBJECT_NAME_EXISTS): Define. (SEMAPHORE_QUERY_STATE): Define. (CYG_SHARED_DIR_ACCESS): Define. (CYG_MUTANT_ACCESS): Define. (CYG_EVENT_ACCESS): Define. (CYG_SEMAPHORE_ACCESS): Define. (enum _PROCESSINFOCLASS): Define ProcessSessionInformation. (struct _PROCESS_SESSION_INFORMATION): Define. (NtCreateSemaphore): Declare. (NtOpenSemaphore): Declare. * flock.cc: Use CYG_xxx_ACCESS access masks where appropriate. * posix_ipc.cc (ipc_mutex_init): Use native functions to create mutex. Create in cygwin-shared subdir. (ipc_cond_init): Ditto for event. (ipc_mutex_close): Use NtClose. (ipc_cond_close): Ditto. (mq_open): Drop "cyg" prefix from mqh_uname. * shared.cc (CYG_SHARED_DIR_ACCESS): Drop definition here. (_cygwin_testing): Declare extern on file level. (get_shared_parent_dir): Change name of shared directory. Add name to api_fatal output. (get_session_parent_dir): New function. (shared_name): Simplify. (shared_info::initialize): Call get_session_parent_dir. * shared_info.h (get_session_parent_dir): Declare. * smallprint.cc (__small_vswprintf): Fix bug in multibyte string conversion. * thread.cc (semaphore::semaphore): Align semaphore name to object names in posix IPC functions. * include/cygwin/version.h (CYGWIN_VERSION_SHARED_DATA): Bump.
2008-04-07Remove unneeded header files from source files throughout.Christopher Faylor
2008-04-07Add miscfuncs.h to files as needed throughout.Christopher Faylor
* mount.cc: New file. * path.cc: Move mount-specific stuff into mount.cc. Move common stuff into miscfuncs.cc. Remove unneeded includes. * miscfuncs.cc: Move some common path functions here. * miscfuncs.h: New file. * winsup.h: Move miscelleneous functions to miscfuncs.h. * dcrt0.cc: Remove unneeded includes. * Makefile.in (DLL_OFILES): Add mount.o. * include/cygwin/config.h: Fix a minor typo.
2008-04-01 * Fix copyright dates.Corinna Vinschen
2008-02-15Perform whitespace cleanup throughout.Christopher Faylor
* dcrt0.cc (signal_shift_subtract): Eliminate ancient backwards compatibility. (check_sanity_and_sync): Ditto. * winsup.h (SIGTOMASK): Ditto. Just use constant in signal calculation. * include/cygwin/version: Remove backwards signal mask compatibility define. * path.cc (symlink_info::check_sysfile): Cosmetic change. * registry.cc (get_registry_hive_path): Remove unneeded variable. * exceptions.cc (handle_sigsuspend): Eliminate thread signal mask and use either main sigmask or current thread sigmask. (set_process_mask): Ditto. (sighold): Ditto. (sigrelse): Ditto. (sigset): Ditto. (set_process_mask_delta): Ditto. (_cygtls::call_signal_handler): Ditto. * fhandler_process.cc (format_process_status): Ditto. * fhandler_termios.cc (fhandler_termios::bg_check): Ditto. * pinfo.h (class pinfo): Ditto. * select.cc (pselect): Ditto. * signal.cc (sigprocmask): Ditto. (abort): Ditto. (sigpause): Ditto. (sigsend): Ditto. (wait_sig): Ditto. * thread.h (pthread::parent_tls): New member. * thread.cc (pthread::pthread): Record parent_tls here. (pthread::thread_init_wrapper): Initialize sigmask from parent thread.
2008-02-13* syscalls.cc (_isatty): Define as an alias to isatty to override newlibChristopher Faylor
version. * thread.cc (pthread_kill): Deal with signal 0 as per POSIX and also avoid manipulating an invalid thread.
2007-12-05 * fhandler_registry.cc: Use NAME_MAX + 1 instead of CYG_MAX_PATHCorinna Vinschen
throughout for subkey name buffer size. * fhandler_socket.cc (search_wsa_event_slot): Use MAX_PATH instead of CYG_MAX_PATH for mutext name buffer size. (fhandler_socket::init_events): Ditto. * fhandler_virtual.cc (fhandler_virtual::opendir): Check path length against PATH_MAX instead of against CYG_MAX_PATH. * registry.cc (get_registry_hive_path): Use PATH_MAX instead of CYG_MAX_PATH for registry value path buffer size. * shared.cc (open_shared): Use MAX_PATH instead of CYG_MAX_PATH for shared memory name buffer size. * thread.cc (semaphore::semaphore): Use MAX_PATH instead of CYG_MAX_PATH for semaphore name buffer size. * uinfo.cc (cygheap_user::env_userprofile): Use PATH_MAX instead of CYG_MAX_PATH for temporary path name buffer size. * winf.h (LINE_BUF_CHUNK): Define as MAX_PATH * 2. * include/sys/dirent.h: Include sys/limits.h. Define name buffer sizes using NAME_MAX.
2007-11-27 Drop old SetResourceLock stuff in favor of mutos.Corinna Vinschen
* dcrt0.cc (_reslock): Remove. (__cygwin_user_data): Accommodate removal of resourcelocks member. (dll_crt0_0): Don't initialize resourcelocks. * exceptions.cc (_cygtls::signal_exit): Drop resourcelocks handling. * mmap.cc (mmap_guard): New muto. (LIST_LOCK): Define. (LIST_UNLOCK): Define. (mmap_list::search_record): Remove. (mmap_list::try_map): Include code for anonymous case from mmap_list::search_record. (mmap_is_attached_or_noreserve): Access bookkeeping lists in a thread safe way. (mmap64): Replace SetResourceLock/ReleaseResourceLock by LIST_LOCK/LIST_UNLOCK. Lock at the latest possible point. (munmap): Replace SetResourceLock/ReleaseResourceLock by LIST_LOCK/LIST_UNLOCK. (msync): Ditto. (mprotect): Ditto. * thread.cc (ResourceLocks::Lock): Remove. (SetResourceLock): Remove. (ReleaseResourceLock): Remove. (ResourceLocks::Init): Remove. (ResourceLocks::Delete): Remove. * thread.h (SetResourceLock): Drop declaration. (ReleaseResourceLock): Ditto. (class ResourceLocks): Drop definition. * include/sys/cygwin.h (class ResourceLocks): Drop forward declaration. (struct per_process): Replace resourcelocks with additional unused2 element. (per_process_overwrite): Accommodate above change.
2007-11-06 * thread.cc (pthread_key_create): Drop check for incoming valid object.Corinna Vinschen
2007-03-29 * cygheap.cc (cygheap_init): Fix formatting. Remove comment. SetCorinna Vinschen
shared_prefix depending only on terminal service capability. * dcrt0.cc (dll_crt0_1): Don't call set_cygwin_privileges here. * fhandler_fifo.cc (fhandler_fifo::open): Create the mutex as global object. * posix_ipc.cc (ipc_mutex_init): Use cygheap->shared_prefix. (ipc_cond_init): Ditto. * sec_helper.cc (privilege_name): Make static. Use LookupPrivilegeName directly to be independent of the state of cygheap. (set_privilege): Take a LUID as parameter instead of an index value. Only print debug output in case of failure. (set_cygwin_privileges): Add comment. Use LookupPrivilegeValue to get privilege LUIDs. (init_global_security): Call set_cygwin_privileges here. * security.h (privilege_name): Drop declaration. (set_privilege): Declare according to above change. (set_process_privilege): Call privilege_luid to get LUID. (_push_thread_privilege): Ditto. * shared.cc (open_shared): Add comment. On systems supporting the SeCreateGlobalPrivilege, try to create/open global shared memory first. Fall back to local shared memory if that fails. * thread.cc (semaphore::semaphore): Use cygheap->shared_prefix. * wincap.h (wincapc::has_create_global_privilege): New element. * wincap.cc: Implement above element throughout.
2007-02-22* dcrt0.cc (child_info_fork::alloc_stack_hard_way): Change sense of guard test.Christopher Faylor
Increase size of stack reserved and increase size before the current stack pointer. Use pointers when doing arithmetic. (dll_crt0_1): Initialize exception handler when we notice we're the child of a fork from non-main thread. * fork.cc (frok::parent): Make argument volatile. (frok::child): Ditto. (lock_signals): New class. (lock_pthread): Ditto. (hold_everhthing): Ditto. (frok::parent): Move atforkprepare and atforkparent to lock_pthread class. (fork): Make ischild boolean. Use hold_everything variable within limited scope to set various mutexes in such a way as to avoid deadlocks. * thread.h (pthread_mutex::tid): New variable, active when debugging for tracking thread id of owner. (pthread_mutex::set_owner): Set tid when debugging. * thread.cc (pthread_mutex::pthread_mutex): Clear tid. (pthread_mutex::_unlock): Ditto when unlocking. (pthread_mutex::fixup_after_fork): Set tid to special value after forking since owner is unknown.
2007-02-20 * cygwin.din (sem_unlink): Export.Corinna Vinschen
* posix_ipc.cc: Include thread.h and semaphore.h. Remove TODO comment. (ipc_names): Add max_len member. Set to maximum length of the path before tacking on the prefix path. Set prefix path for named semaphors to /dev/shm, as on Linux. (enum ipc_type_t): Change sem to semaphore to avoid name conflicts. (check_path): Detect empty paths. Use ipc_names's max_len member. Use __small_sprintf to create full object path name. Special case semaphores. (ipc_cond_init): Drop superfluous strcpy. (class ipc_flock): New class to simplify file locking in subsequent code. (struct mq_hdr): Raise size of mqh_uname to allow adding a unique LUID to the name. (mq_open): Fix formatting. Create unique synchronization object names using AllocateLocallyUniqueId. (struct sem_finfo): New structure defining named semaphore file content. (sem_open): Move here. Rework implementation to allow kernel persistent implementation of POSIX named semaphores. (_sem_close): Implement sem_close. (sem_close): Move here. Just call _sem_close with do_close parameter set to true. (sem_unlink): New function. * pthread.cc (mangle_sem_name): Remove. (sem_open): Move to posix_ipc.cc. (sem_close): Ditto. * syscalls.cc (close_all_files): Call semaphore::terminate here. * thread.cc: Fix formatting. Rearrange semaphore functions so that they are close together. (semaphore::semaphore): Rework to play nicely with new named semaphore implementation. (semaphore::_terminate): Call _sem_close if semaphore is a named semaphore. (semaphore::destroy): Don't destroy named semaphores. Return EINVAL instead. (semaphore::close): Only destroy named semaphores. Return EINVAL otherwise. (semaphore::open): Rework to play nicely with new named semaphore implementation. Loop through existing semaphores to be able to return same sem_t pointer as a former call on the same named semaphore. (semaphore::getinternal): New function called from _sem_close. * thread.h (class List): Make mx and head public. (class semaphore): Fix formatting. Align method declarations with implementation in thread.cc. Add members used for named semaphores. (semaphore::terminate): New static method. * include/semaphore.h: Redefine SEM_FAILED. Fix formatting. (sem_unlink): Add declaration. * include/cygwin/version.h: Bump API minor number.
2006-05-27* thread.cc (verifyable_object_isvalid): Check for NULL specifically.Christopher Faylor
2006-03-22 * thread.cc (pthread_mutex::is_good_initializer_or_bad_object): Delete.Corinna Vinschen
(pthread_cond::is_good_initializer_or_bad_object): Delete. (pthread_rwlock::is_good_initializer_or_bad_object): Delete. (pthread_cond::init): Remove disabled code. Guard assignment to object to initialize against access violation. (pthread_rwlock::init): Ditto. (pthread_mutex::init): Ditto.
2006-03-22 * thread.cc (pthread_cond::init): Disable validity test of objectCorinna Vinschen
to initialize since test of uninitialized content is unreliable. (pthread_rwlock::init): Ditto. (pthread_mutex::init): Ditto.
2006-02-06Always zero all elements of siginfo_t throughout.Christopher Faylor
* cygtls.h (_cygtls::thread_context): Declare new field. (_cygtls::thread_id): Ditto. (_cygtls::signal_exit): Move into this class. (_cygtls::copy_context): Declare new function. (_cygtls::signal_debugger): Ditto. * cygtls.cc (_cygtls::init_thread): Fill out thread id field. * exceptions.cc (exception): Change message when exception info is unknown. Copy context to thread local storage. (_cygtls::handle_exceptions): Avoid double test for fault_guarded. Reflect move of signal_exit to _cygtls class. (sigpacket::process): Copy context to thread local storage. (_cygtls::signal_exit): Move to _cygtls class. Call signal_debugger to notify debugger of exiting signal (WIP). Call stackdump here (WIP). (_cygtls::copy_context): Define new function. (_cygtls::signal_debugger): Ditto. * tlsoffsets.h: Regenerate. * include/cygwin.h (_fpstate): New internal structure. (ucontext): Declare new structure (WIP). (__COPY_CONTEXT_SIZE): New define. * exceptions.cc (_cygtls::interrupt_setup): Clear "threadkill" field when there is no sigwaiting thread. (setup_handler): Move event handling into interrupt_setup.
2005-12-03* cygtls.h (_cygtls::el): New field.Christopher Faylor
(_cygtls::handle_exceptions): New function declaration. (_cygtls::handle_threadlist_exception): Ditto. (_cygtls::init_exception_handler): Ditto. (_cygtls::init_threadlist_exceptions): Remove arg from declaration. * cygtls.cc (_cygtls::call2): Don't initialize exceptions here. (_cygtls::init_thread): Do it here instead and use member function. (_cygtls::handle_threadlist_exception): Move into _cygtls class. (_cygtls::init_exception_handler): Ditto. Rely on existence of 'el' memmber in _cygtls. (_cygtls::init_threadlist_exceptions): Ditto. * dcrt0.cc (dll_crt0_1): Remove exception_list definition and setting since it now commonly resides in the tls. * exceptions.cc (init_exception_handler): Move to cygtls.cc. (init_exceptions): Ditto. (rtl_unwind): New, safe wrapper function for RtlUnwind. (_cygtls::handle_exceptions): Move to _cygtls. Call rtl_unwind to unwind frames and eliminate copying of structures. Put address of failing instruction in si_addr, not the address on the stack. Return 0 to indicate that we've handled this exception. * external.cc (cygwin_internal): Make CW_INIT_EXCEPTIONS a no-op. * sigproc.cc (wait_sig): Accommodate argument change to _cygtls::init_threadlist_exceptions. * tlsoffsets.h: Regenerate. * include/exceptions.h (exception_list): Add more stuff to the exception list. Apparently windows needs this? (init_exceptions): Remove bogus declaration. * include/cygwin/signal.h (SI_USER): Redefine as zero as per SUSv3. * thread.cc (pthread_kill): Set si_pid and si_uid. * timer.cc (timer_thread): Set si_code to SI_TIMER.
2005-09-06 * thread.h: Revert patch from 2005-09-05.Corinna Vinschen
* thread.cc (pthread_mutex::can_be_unlocked): Return true also if mutex is owned by MUTEX_OWNER_ANONYMOUS.
2005-08-12white spaceChristopher Faylor
2005-08-05 * thread.cc (pthread::create(3 args)): Make bool.Corinna Vinschen
(pthread_null::create): Ditto. (pthread::create(4 args)): Check return of inner create rather than calling is_good_object(). * thread.h: Ditto.
2005-08-05 * thread.cc (pthread_cond_timedwait): Check abstime for validityCorinna Vinschen
according to SUSv3. Rewrite timeout check and waitlength calculation to avoid overflow problems.
2005-07-07Eliminate (void) cast on standalone function calls throughout.Christopher Faylor
2005-07-05Change foo (void) to foo () for all c++ functions throughout. Remove allChristopher Faylor
fhandler_*::dump functions throughout. * fhandler.h (fhandler_dev_mem::close): Remove pass-through function in favor of virtual method. (handler_dev_raw::close): Ditto. (fhandler_dev_clipboard::fixup_after_exec): New method. * fhandler_dev_mem.cc (fhandler_dev_mem::close): Eliminate pass through * fhandler_dev_raw.cc (fhandler_dev_raw::close): Ditto. * fhandler_clipboard.cc (fhandler_dev_clipboard::close): Don't go to extra effort when execing. (fhandler_dev_clipboard::fixup_after_exec): New function. * fhandler_console.cc (fhandler_console::close): Don't do "extra stuff" when we know we're execing. * fhandler_disk_file.cc (fhandler_disk_file::close): Ditto. * fhandler_dsp.cc (fhandler_dev_dsp::close): Ditto. * fhandler_fifo.cc (fhandler_fifo.cc::close): Ditto. function in favor of base function. * fhandler_random.cc (fhandler_dev_random::close): Ditto. * fhandler_registry.cc (fhandler_registry::close): Ditto. * fhandler_tty.cc (fhandler_tty_slave::close): Ditto. * fhandler_virtual.cc (fhandler_virtual::close): Ditto. * pinfo.cc (proc_waiter): Remove unneeded hExeced declaration. * sigproc.cc: Ditto. * winsup.h (hExeced): Define here. * fhandler_virtual.cc (fhandler_virtual::fixup_after_exec): Just call close() to reinitialize things to known state.
2005-07-05ARGH. Check in previous uncommitted-but-ChangeLog'ed entry.Christopher Faylor
2005-07-03* thread.h (verifyable_object_state verifyable_object_isvalid): Delete functionChristopher Faylor
declaration that should have been static. * thread.cc (verifyable_object_state verifyable_object_isvalid): Make inline static. (pthread*::is_good_object): Move to directly after verifyable_object_state verifyable_object_isvalid and make inline.
2005-07-03Replace valid memory checks with new myfault class "exception handling", almostChristopher Faylor
everywhere. Leave some thread.cc stuff alone for now. * cygtls.h: Kludge some definitions to avoid including a problematic windows header. (_cygtls::_myfault): New entry. (_cygtls::_myfault_errno): Ditto. (_cygtls::fault_guarded): New function. (_cygtls::setup_fault): Ditto. (_cygtls::return_from_fault): Ditto. (_cygtls::clear_fault): Ditto. (myfault): New class. * exceptions.cc (handle_exceptions): Handle case of guarded fault in system routine. * gendef: Add another entry point for setjmp that the compiler doesn't know about and won't complain about. * gentls_offsets: Just include windows.h rather than kludging a HANDLE def. * miscfuncs.cc (check_null_str): Delete. (check_null_empty_str): Ditto. (check_null_empty_str_errno): Ditto. (check_null_str_errno): Ditto. (__check_null_invalid_struct): Ditto. (__check_null_invalid_struct_errno): Ditto. (__check_invalid_read_ptr): Ditto. (__check_invalid_read_ptr_errno): Ditto. (dummytest): New function. (check_iovec_for_read): Delete. (chec_iovec): Rename from check_iovec_for_write. Take a read/write parameter. * tlsoffsets.h: Regenerate. * winsup.h: Remove check_* declarations. (check_iovec_for_read): Delete declaration. Turn into a define instead. (check_iovec_for_write): Ditto. (check_iovec): New declaration. * thread.h: Use ifdef guard name consistent with other header files.
2005-06-30revert erroneous checkinChristopher Faylor
2005-06-30* autoload.cc (LoadDLLprime): Use a more descriptive name for autoload textChristopher Faylor
sections. * cygwin.sc: Ditto.
2005-06-11* include/pthread.h: Change PTHREAD_MUTEX_DEFAULT to PTHREAD_MUTEX_NORMAL.Christopher Faylor
Revert PTHREAD_MUTEX_INITIALIZER to PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP since that is actually closer to what linux does. * thread.h (cw_cancel_action): New enum. (cancelable_wait): Use cw_cancel_action as third argument. * thread.cc (cancelable_wait): Ditto. Don't wait for cancel if cancel_action == cw_no_cancel. (pthread::create): Don't wait for cancel event since that is racy. (pthread_mutex::pthread_mutex): Set default to PTHREAD_MUTEX_ERRORCHECK. (pthread_mutexattr::pthread_mutexattr): Ditto. (pthread_mutex::_lock): Tell cancelable_wait not to wait for cancellation event. (semaphore::_timedwait): Accommodate change in cancelable_wait args. (pthread::join): Ditto.
2005-06-10* cygtls.h (_local_storage::setmode_file): New element.Christopher Faylor
(_local_storage::setmode_mode): New element. * tlsoffsets.h: Regenerate. * cygwin.din (setmode): Define as cygwin_getmode. * syscalls.cc (setmode_helper): Use setmode_* variables from tls rather than using unthreadsafe static. (setmode): Break out fwalk stuff. (cygwin_setmode): New function. Put fwalk stdio stuff here.
2005-06-10* thread.cc (pthread_mutex::_lock): Use cancelable_wait rather thanChristopher Faylor
WaitForSingleObject.
2005-06-09* thread.cc (cancelable_wait): No-op change to make sure that res is always aChristopher Faylor
valid WFMO return.
2005-06-09Change pthread::cancelable_wait to just cancelable_wait, throughout.Christopher Faylor
* thread.h (cw_sig_wait): New enum. (fast_mutex::lock): Use cancelable_wait with resumable signal. (cancelable_wait): Change fourth argument to cw_sig_wait enum. * thread.cc (cancelable_wait): Ditto. Loop on signal detection if fourth argument == cw_sig_resume.
2005-05-29* thread.h (pthread_key::set): Inline.Christopher Faylor
(pthread_key::get): Ditto. * thread.cc (pthread::set): Delete. (pthread::get): Ditto.
2005-02-20copyrightChristopher Faylor
2005-01-29* cygthread.cc (new): Add a little more debugging.Christopher Faylor
* thread.cc (pthread_null::exit): Add a _my_tls.remove() for safety.
2004-09-07* cygtls.cc (_cygtls::init_thread): Set __sdidinit to negative value toChristopher Faylor
indicate that it is "special". * thread.cc (pthread::exit): If __sdidinit is < 0, it was never really initialized so reset it to 0 before calling _reclaim_reent.
2004-06-27* thread.cc (__cygwin_lock_lock): Don't bother locking when there is only oneChristopher Faylor
known thread. (__cygwin_lock_unlock): Ditto for unlocking.
2004-06-07* dtable.cc (dtable::find_fifo): Release lock after fifo found (still racy).Christopher Faylor
* fhandler.h (fhandler_fifo::get_io_handle): New fifo-specific method. * fhandler_fifo.cc (fhandler_fifo::close): Close output_handle only if it is open. (fhandler_fifo::open_not_mine): Reorganize slightly. Don't call _pinfo methods when the fifo is owned by me or suffer dtable lock_cs deadlock. (fhandler_fifo::open): Call open_not_mine first, otherwise open myself (racy). * pinfo.cc (_pinfo::commune_recv): Duplicate fifo handles here in requesting processes arena to avoid one potential race (of many). (_pinfo::commune_send): Move all PICOM_FIFO code under one case statement. * thread.cc (pthread::init_mainthread) Use existing hMainProc handle rather than calling GetCurrentProcess.
2004-05-28* path.cc (chdir): Always use the normalized_path as posix_cwd, except if itChristopher Faylor
starts with a drive. Also perform whitespace cleanup.
2004-05-17 * cygwin.din: Add symbols flockfile, ftrylockfile, funlockfile,Corinna Vinschen
getgrgid_r, getgrnam_r and getlogin_r. * grp.cc (getgrgid_r): New function. (getgrnam_r): Ditto. * syscalls.cc (flockfile): Ditto. (ftrylockfile): Ditto. (funlockfile): Ditto. * sysconf.cc (sysconf): Return LOGIN_NAME_MAX in case of _SC_LOGIN_NAME_MAX. * thread.cc (__cygwin_lock_trylock): Define int. Return value from call to pthread_mutex_trylock. * uinfo.cc (getlogin_r): New function. * include/limits.h: Define LOGIN_NAME_MAX. * include/cygwin/version.h: Bump API minor number. * include/sys/lock.h: Add declarations for __cygwin_lock_xxx functions. * include/sys/stdio.h: Add define for _ftrylockfile.