summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/uthread/uthread_exit.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use rlimit nofiles max to size fd/fdp tables instead of cur. Fixeskurt2007-04-271-2/+2
| | | | applications that increase nofiles using setrlimit(2). ok marc@
* Part 2 of file descriptor race and deadlock corrections.kurt2006-09-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust design of file descriptor table to eliminate races with both opening and closing of file descriptor entries and eliminates one class of deadlocks. One nice side effect of this change in design should be better performance for applications that open and close many file descriptors due to reduced fd_table_lock contention and fd entry reuse. - Add entry states to manage use of entry and eliminate some closing races. fd entries are not deallocated upon close() now. - Call _thread_fd_table_init with one of five discreet modes to properly initialize an entry and manage the state transition to open. - When closing an entry hold the entry spinlock locked across the state transition and the _thread_sys_close call to close another race. - Introduce a new lock type FD_RDWR_CLOSE that transitions either a closed entry or an open entry into closing state and then waits for a RDWR lock so that the lock queue can unwind normally. All subsequent fd lock attempts for that entry are rejected with EBADF until the fd is fully closed, or reopened by dup2(). Once a thread holds the FD_RDWR_LOCK it is safe to close() it or dup2() on it. - When a thread creates a new fd there is a window of time when another thread could attempt to use the fd before the creating thread has initialized the entry for it. This can result in improper status_flags for the entry, so record the entries init mode, detect when this has happened and correct the status_flags when needed. reviewed by marc@ & brad@, tested by several, okay brad@
* Part 1 of file descriptor race and deadlock corrections.kurt2006-09-221-2/+2
| | | | | | | | | | | | | | | | | | | | File status flags should be shared for dup'ed file descriptors. However fd_table_entry's should not be shared for dup'ed file descriptors so they can be independently be closed without interfering with dup'ed fd's. - split out file status flags into its own structure fs_flags to manage sharing of status flags between dup'ed file descriptors. - when duplicating a fd, initialize a new fd_table_entry for the new fd, but share the status flags via status_flags. - consolidate the code that sets the underlying system fd to be non-blocking to a new function _thread_fs_flags_init() - consolidate the code that sets the underlying system fd back to blocking into a new function _thread_fs_flags_replace() This change is needed as a prerequisite to the coming race and deadlock corrections. okay marc@
* type func(...) -> type\nfunc(...) for function definitionsmarc2002-11-071-2/+3
|
* signal handling changes. This corrects several signalmarc2002-10-301-2/+2
| | | | | | | handling errors in the threads library. Most of the libc_r regression tests are now ok. thread specific kill semantics are still not correct. No negative comments after posting to tech@ a week or so ago. siginfo test fails on sparc64 due to sparc64 oddity.
* More sync.fgsch2001-12-191-3/+1
|
* More sync with freebsd code; join related code this time.fgsch2001-12-111-44/+47
|
* Start syncing with FreeBSD:fgsch2001-08-211-13/+14
| | | | | | | | | | o Implement _get_curthread() and _set_curthread(). Use it where possible. o Add missing _thread_[enter|leave]_cancellation_point(). o Add a couple of not yet used vars to pthread_private.h. o Remove return's from void functions. This is by no means complete, but instead of doing a big commit, i'll split it in small ones, minimizing diffs.
* put proc pid in fatal error string; don't call abort() - instead deliver SIGABRT directly (inside #if); unused varsd2000-01-061-5/+24
|
* clean up the poll fdsets in the garbage collector, not in exit()d1999-11-301-7/+2
|
* sync with FreeBSDd1999-11-251-43/+53
|
* mention the process' pid in the debug message. greatly helps to debug problems when fork()ingd1999-06-141-1/+3
|
* sync with FreeBSDd1999-05-261-6/+25
|
* identd1999-01-061-0/+1
|
* dump thread info on PANICd1998-12-211-0/+3
|
* this thisniklas1998-12-131-1/+1
|
* sync with FreeBSDd1998-12-101-2/+2
|
* fix strcat usage; deraadtd1998-11-201-9/+37
|
* sync with FreeBSD (rwlock, gc thread, man pages)d1998-11-091-47/+21
| | | | | | | add (broken) mips md stuff fix some const warnings add sigaltstack() stub another hash at getting shlib auto-init to work (mips/elf and i386/a.out)
* experimental threaded libc - kernel onlyd1998-08-271-0/+191