summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/uthread (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Change read_stackseg_np to work with any thread, not just the currentmarc2004-01-261-3/+2
| | | | | thread. Requested by truk at optonline dot net and OK-ed by tedu @.
* Fix -Wsign-compare warnings pointed out by kevlo@, ok marc@millert2004-01-191-6/+6
|
* Include correct includes to unbreak compilation on macppc. ok miod@otto2004-01-161-6/+4
|
* threaded version of closefrommarc2004-01-155-3/+143
| | | | | pthread_stackseg_np added. Minor bump for these changes occurred a day or so ago and will not be bumped again
* Fixes from FreeBSD's libc_rbrad2004-01-031-14/+26
| | | | | | | | | | | | | | | | rev 1.21 Make the libc_r version of select() set the readable or writable file descriptor bit if poll() returns POLLERR, POLLHUP, or POLLNVAL. Othewise, it's possible for select() to return successfully but with no bits set. rev 1.19 Return correct number of total bits set in all fd_set's. Change case of POLLNVAL as an error. Remove POLLHUP and POLLERR from one case, their place is most likely amongst read events. ok marc@
* more cancellation points.brad2004-01-014-5/+25
| | | | ok marc@
* there is no pause() wrapper (thread_sys_pause) so remove the prototypebrad2003-12-311-2/+1
|
* undefer sigs in all paths through the join code.marc2003-12-311-12/+6
| | | | Based upon patch/report from Marc Olzheim <marcolz at stack.nl>
* Add stub implementations of pthread_[gs]etconcurrencybrad2003-12-232-1/+65
| | | | | | From: FreeBSD' libc_r ok marc@
* change the variable name used for status checking,brad2003-12-231-2/+2
| | | | | | LIBC_R_DEBUG -> LIBPTHREAD_DEBUG ok marc@
* Based upon a freebsd change:marc2003-12-231-10/+6
| | | | | | | | | | | | | | If an application closes one of its stdio descriptors (0..2), an excessive close() on one of these descriptors would cause a memory for this descriptor to be allocated in the internal descriptor table. When this descriptor gets used again, e.g. through the call to open() or socket(), the descriptor would be erroneously left in the blocking mode, and the whole application would get stuck on a blocking operation, e.g., in accept(2). but changed to not eat fds when a file that the thread kernel doesn't know about is closed.
* Make accept(), connect(), recvfrom(), recvmsg(), sendmsg(),brad2003-12-237-7/+57
| | | | | | | | and sendto() cancellation points, as required by POSIX.1-2001. From: FreeBSD' libc_r ok marc@
* Fix from FreeBSD' libc_rbrad2003-12-221-7/+22
| | | | | | | | rev 1.21 Fix bogus return values from libc_r's writev() routine in situations where a partial-write is followed by an error. ok marc@
* Fixes from FreeBSD' libc_rbrad2003-12-221-8/+25
| | | | | | | | | | | | | | | rev 1.21 Fix bogus return values from libc_r's write() routine in situations where partial-write is followed by an error. rev 1.22 If __sys_write() returns 0, allow that to exit the loop in libc_r's wrapped version of write(). rev 1.23 Return to the caller if write() returns 0. ok marc@
* Add an nfds_t type as per POSIX and also add pollfd_t like Solaris has.millert2003-12-101-3/+3
|
* missing proto for kqueue(); marc@ okmickey2003-11-101-1/+2
|
* replace magic number for min number of poll_data entriesmarc2003-11-031-3/+8
| | | | to allocate with a define
* Add wrapper for kqueue() to keep track of the allocated fd and allow it tobrad2003-10-223-2/+59
| | | | | | | be closed. This fixes a file descriptor leak when closing a kqueue() fd. from FreeBSD ok marc@
* When about to do an execve(), don't bother resetting the O_NONBLOCK flagbrad2003-10-221-1/+5
| | | | | | | on any file descriptors that have the close-on-exec flag set. from FreeBSD ok marc@
* Fix optimized select handling buglet. Patch from tholo@marc2003-10-191-2/+2
|
* sync FreeBSD RCS idbrad2003-10-191-2/+2
|
* Optimize conversion of fd_set -> pollfd. OK and test by marc@millert2003-10-161-29/+37
|
* Off-by-ones, from aaron@miod2003-09-221-2/+2
|
* Remove some double semicolons (hmm, do two semis equal a maxi?).millert2003-08-061-5/+5
| | | | I've skipped the GNU stuff for now. From Patrick Latifi.
* Go back to using ITIMER_PROF for the non-profiled libpthread and usemillert2003-08-011-2/+2
| | | | | | | ITIMER_VIRTUAL for the profiled version. Fixes problems when programs linked with libpthread try to use ITIMER_VIRTUAL (and have no way of knowing that this will cause conflicts with the threads lib). marc@ OK
* remove variable never readmarc2003-07-083-8/+3
|
* Add support for blocking thread switches during dlopen and othermarc2003-05-133-4/+27
| | | | | | | | non-thread-safe dl functions. Only enabled for ELF architectures at this time as needed dlxxx support has not yet been added to the a.out run time loader. 'doesn't break xmms at least' tedu@. Tested by others with no comment
* fix for pr# 3179 and 3238. Patch verified by author of 3179.marc2003-04-302-4/+10
|
* Remove unused file. OpenBSD uses uthread_info_openbsd.c, instead.marc2003-03-311-317/+0
| | | | This is easier than fixing the strcpy in the file.
* sprintf -> snprintf; ok millert@, henning@marc2003-03-201-3/+3
|
* fix bug that would leave an FD locked if dup'd, then closed.marc2003-02-143-13/+27
| | | | Also, for safety lock the _thread_fd_table when removing entries.
* white spacemarc2003-02-141-4/+4
|
* AARRGGH! 2nd try, handle the case where from_fd == to_fd in _thread_fd_table_dupmarc2003-02-051-2/+2
|
* handle the case where from_fd == to_fd in _thread_fd_table_dupmarc2003-02-051-15/+18
|
* thread fd handling, part 2. Don't mung file flags until forcedmarc2003-02-053-15/+25
| | | | | | | | to notice that the file exists. This fixes a problem where an application may think a file was in non-block mode because the threads kernel played with the flags. Also fix a stupid error introduced in the last commit -- the threaded version of dup and dup2 were foobared. Bad marc.
* Part 1 of thread fd handling fixes. In the new scheme fd_table_entriesmarc2003-02-047-368/+325
| | | | | | | | | | | | | | | | | for dup-ed fds are shared to ensure proper flag handling. A refcnt was added to control when entries should be freed. Specific changes: close: don't free entry unless refcnt is zero dup: rewrite to use new function _thread_fd_table_dup dup2: rewrite to use new function _thread_fd_table_dup fcntl: use _thread_fd_table_dup uthread_fd: initialize thread fd table, searching for dup-ed fds. Add function to share _thread_fd_table entries when an fd is dup-ed. uthread_init: make it readable. Call fd init functions. All current regression tests plus the mysql torture test pass. The new stdfiles regression test fails (I/O redirection problem). Part 2 is intended to fix that problem
* bad marc, commited crap to shut gcc up. Remove the crap.marc2003-01-311-2/+1
|
* Create a siginfo_t for thread-to-thread kill.marc2003-01-3115-168/+97
| | | | | Clean up (compiler warning elimination). Compile check options added but commented out as they have not been checked on all architectures, yet.
* pthreads signal handling improvements. With these changes allmarc2003-01-277-383/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of the thread regressions tests pass on i386, sparc, sparc64 (save the siginfo test on sparc64 due to a kernel issue) and alpha. The tests should also pass on ppc. In addition, it fixes the problems with the "mysql torture test" provided by one of our users. The python port also appears to work correctly with these changes. Summary of changes: * check_pending removed from thread structure, no longer used. * unused elements of sigstatus structure removed. The sigstatus structure is now used to keep track of siginfo data instead of defining a local array in uthread_sig.c. * _thread_kern_sched_sig removed * _thread_sig_process goes away -- can't have a lock active when signal handlers are called. Functions now call _thread_sig_handle directly. * _thread_clear_pending now used lib wide to clear pending flags. It was named _clean_pending_flag and only used in uthread_sig.c. The function clears both per thread signals, and per process signals. * _thread_sig_handle now returns a value. * unused debugging macros removed from the thread kernel * dispatch pending signals after switching to a thread providing that signal handling hasn't been deferred by the thread. * process thread switchhooks before dispatching pending sigs * check for thread cancellation before dispatching pending sigs * re-wrote pthread-kill to do the correct thing. It now does minimal thread-kill-specific processing and then calls the existing code in uthread_sig to process the generated signal. * shut the compiler up when compiling uthread_mutex.c * no more "signal_lock". It does more harm than good. * keep track of "per-process" signals. * don't bother saving siginfo_t data for the scheduling signal. * per posix: SIGSTOP cleared when SIGCONT received and vice versa. * add _dispatch_signal to properly dispatch a signal to a thread. It sets the appropriate signal mask, something that was missing in the previous implementation. This fixes several bugs. The previous method held a lock. If the signal handler longjmp-ed the lock was never cleared and no more signals were processed.
* save and restore fp state when switching threads. This, withmarc2003-01-243-77/+46
| | | | | | | | | | | an arch/i386 patch previously commited and arch/sparc64 patches from jason@ make the preemption_float test pass on those two architectures. Do not run signal handlers for a thread until the thread has been made current, ensuring the proper context. Solves several (if not all) of the '_pq_insert_tail: Already in priority queue' problems.
* remove libc_r mention in commentmarc2003-01-201-4/+4
|
* Allow the fetching of current stack info from threaded apps.marc2003-01-201-4/+36
| | | | | This is necessary for alpha setjmp. The alpha setjmp/longjmp regression tests pass with -pthread with this change
* Use the sources that exist in sibdirs of libpthread, not libc_rmarc2003-01-201-3/+3
|
* return (func(...)) not needed when the current function and funcmarc2003-01-192-5/+11
| | | | | | are both void. The select call is a cancellation point per IEEE Std 1003.1-2001. This should fix a problem espie@ found in kde.
* add a debugging function not normally calledmarc2002-12-112-3/+63
|
* remove unused data member from pthread_cond.marc2002-12-081-2/+1
|
* get rid of compiler warningsmarc2002-11-123-6/+6
|
* kill two compiler warnings; ok marc@todd2002-11-081-4/+6
|
* Do not try to initialize entries in the fd table before the tablemarc2002-11-081-10/+1
| | | | is created.
* Add needed table of strong functions that override weak functionsmarc2002-11-072-22/+97
| | | | | | in libc so static linking works with -lpthreads. There is a (linker?) problem that still shows up with static -pthread, though. Solution to problem from freebsd.