summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/uthread/uthread_info_openbsd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* threads waiting on PS_FDW_WAIT state should not be interruptible iffgsch2011-10-071-1/+3
| | | | | | | | | SA_RESTART is set, with connect(2) being the exception thus getting its own state. as pointed by kurt, threads on this and PS_FDR_WAIT states need to be set to PS_RUNNING since the current signal dispatching code only looks at the current thread. ok kurt@
* For threads in PS_FDR_WAIT state, check SA_RESTART before marking it asfgsch2011-09-131-1/+3
| | | | | | | | interrupted, thus simulating the system call restart behaviour in the non-pthreads case. Add a state for kevent since it shouldn't be restarted regardless of SA_RESTART being present. guenther@ ok.
* clean up lint warnings related to the nfds_t type. okay marc@ millert@kurt2007-05-211-2/+2
|
* Eliminate many lint warnings by either: using the appropriate type,kurt2007-05-181-6/+7
| | | | | casting when safe or adding ARGSUSED where needed. Reviewed and improvements from millert@ and marc@. okay marc@
* lint warning corrections:kurt2007-05-011-2/+2
| | | | | | | - use the correct types - mark _thread_gc() w/ARGSUSED - fix a 'a cast does not yield an lvalue' okay marc@
* Use rlimit nofiles max to size fd/fdp tables instead of cur. Fixeskurt2007-04-271-3/+3
| | | | applications that increase nofiles using setrlimit(2). ok marc@
* Part 2 of file descriptor race and deadlock corrections.kurt2006-09-261-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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@
* Change a debug interface to take const char pointers so we don't avekrw2006-04-091-2/+2
| | | | | | | | | | to cast away constness whenever we want to pass in a string that is already const -- we copy the string if we want to use it, so having it be non-const in the first place does not make any sense. From tholo@ ok tedu@
* sprintf -> snprintf; ok millert@, henning@marc2003-03-201-3/+3
|
* Create a siginfo_t for thread-to-thread kill.marc2003-01-311-8/+5
| | | | | Clean up (compiler warning elimination). Compile check options added but commented out as they have not been checked on all architectures, yet.
* add a debugging function not normally calledmarc2002-12-111-2/+61
|
* Check for null pointer before deref in info output. Based uponmarc2002-10-211-5/+8
| | | | | a freebsd patch forwarded to me by millert@ (thanks!). Change also applied to uthread_info.c even though we do not use it
* More sync with freebsd code; join related code this time.fgsch2001-12-111-1/+4
|
* Partially sync with FreeBSD; mostly pthread_cancel(3) related changes.fgsch2001-12-081-3/+2
| | | | make includes is needed in case you want to play.
* better column titles. show prioq and scheduler timing informationd2000-02-261-5/+34
|
* dump verbosely only if PTHREAD_DEBUG env var is definedd2000-01-061-20/+39
|
* keep freebsd's thread info distcint from mined1999-11-251-0/+364