summaryrefslogtreecommitdiffstats
path: root/lib/libpthread
Commit message (Collapse)AuthorAgeFilesLines
* Make a copy of the caller's iovec array, mallocing if necessary,jb1998-05-271-14/+62
| | | | | and modify that if the writev() syscall does not completely write all bytes in a single call.
* When doing a blocking write, keep looping until all the bytes arejb1998-05-252-20/+106
| | | | | | | written without returning to the caller. This only occurs on pipes where either the number of bytes written is greater than the pipe buffer or if there is insufficient space in the pipe buffer because the reader is reading slower than the writer is writing.
* Treat the lock value as volatile.jb1998-05-051-2/+2
|
* Typo fixesjraynard1998-05-031-2/+3
|
* Cleanup in the child, not the parent.jb1998-05-021-2/+2
| | | | Submitted by: Tor Egge <Tor.Egge@idi.ntnu.no>
* Fix the incremental priority increment.jb1998-04-301-2/+2
| | | | PR: bin/6467 Marino Ladavac <lada@pc8811.gud.siemens.at>
* Change the name of this source file so that libc_r builds it insteadjb1998-04-302-2/+52
| | | | | | of the one in libc that contains the weak symbol for __error. FreeBSD's make accumulates paths to the point that it can find *anything*, possibly including the car keys.
* Add spinlock.jb1998-04-291-3/+4
|
* Change signal model to match POSIX (i.e. one set of signal handlersjb1998-04-2938-1224/+865
| | | | | | | | | | | | | | | | | | | | for the process, not a separate set for each thread). By default, the process now only has signal handlers installed for SIGVTALRM, SIGINFO and SIGCHLD. The thread kernel signal handler is installed for other signals on demand. This means that SIG_IGN and SIG_DFL processing is now left to the kernel, not the thread kernel. Change the signal dispatch to no longer use a signal thread, and call the signal handler using the stack of the thread that has the signal pending. Change the atomic lock method to use test-and-set asm code with a yield if blocked. This introduces separate locks for each type of object instead of blocking signals to prevent a context switch. It was this blocking of signals that caused the performance degradation the people have noted. This is a *big* change!
* Atomic lock source.jb1998-04-291-0/+55
|
* Allow a thread dump to report the thread's sigmask when in thejb1998-04-171-0/+4
| | | | PS_SIGWAIT state.
* When in PS_SIGWAIT state, still call signal handlers and set errnojb1998-04-171-13/+2
| | | | to EINTR.
* Change the FILE locking to be by FILE, not by the underlying fd asjb1998-04-114-11/+39
| | | | | | | | | | | | | it was. Add a FILE_WAIT state and queue threads waiting for a FILE lock. Start using the sys/queue.h macros instead of the way that MIT pthreads did it. Add a thread name to the private thread structure and a non-POSIX function to set this. This helps (me at least) when sending a SIGINFO to a threaded process to get a /tmp/uthread.dump to see what the <expletive deleted> threads are doing this time. It is nice to be able to recognise (yes, I spell that with an 's' too) which threads are which.
* Enable static initialisation of mutexes and condition variables.jb1998-04-042-8/+32
|
* Rename static initializer defines for opaque structures so that thejb1998-04-041-2/+2
| | | | POSIX specified names can be declared in pthread.h.
* Move the magic field initialisation to a place when it is more magic.jb1998-04-041-6/+7
|
* Add a magic field to the pthread structure to help recognize validjb1998-04-034-2/+25
| | | | | | | | | | | | | | threads from invalid ones. The pthread structure is opaque to the user so this change does not cause any incompatibilities. Hopefully this change will help code that was written for draft 4 fail gracefully if the programmer ignores the compiler warning about the change in the level of indirection for the argument passed to pthread_detach(). I got burnt, so I fixed then (expletive deleted) thing. These functions comply with the revised standard. That should shut Terry up!
* This function compiles with the standard, so say so.jb1998-04-031-3/+3
|
* This function compiles with the standard, so say so.jb1998-04-031-4/+6
| | | | | | | | Add a note about not touching errno and warn about previous drafts of the standard which changed the level of indirection to the thread argument. POSIX had a bit of trouble deciding what to do. So anyone coding to both draft 4 and draft 10 (the final draft) will get burnt by this function. I did. Grrr.
* Finish _POSIX_PRIORITY_SCHEDULING. Needs P1003_1B anddufault1998-03-281-4/+4
| | | | | | | | | | | | | | | | _KPOSIX_PRIORITY_SCHEDULING options to work. Changes: Change all "posix4" to "p1003_1b". Misnamed files are left as "posix4" until I'm told if I can simply delete them and add new ones; Add _POSIX_PRIORITY_SCHEDULING system calls for FreeBSD and Linux; Add man pages for _POSIX_PRIORITY_SCHEDULING system calls; Add options to LINT; Minor fixes to P1003_1B code during testing.
* Fixed a function arg type in the synopsis.bde1998-03-231-1/+1
|
* Fix a problem of indirection unblocking signals that would have causedjb1998-03-221-1/+1
| | | | | | | signals to be unblocked even if they were already blocked when entering the function. Pointed out by: bde
* When forking a process, only the running thread gets to live. Alljb1998-03-091-0/+39
| | | | | other threads never see the light of day and if they leave things locked, blame POSIX.
* Add lib/libc/include as an directory to search for header files.jb1998-03-091-3/+16
| | | | | | | | | | Change MACHINE references to MACHINE_ARCH. Declare the names of the syscalls that need to be renamed to allow for the functions that libc_r provides replacements for. This list used to be in lib/libc/sys/Makefile.inc, but has been moved here to keep that makefile tidy and remove the temptation for people to add things to the list without adding a libc_r replacement function.
* Add FreeBSD/Alpha code to initialise a jmpbuf for a created thread.jb1998-03-092-7/+23
| | | | Change a bunch of __alpha references to __alpha__.
* Add sched_yield() witch is the draft 10 equivalent of pthread_yield()jb1998-03-082-22/+22
| | | | | from draft 4. Move some of the schedule definitions to sched.h which is a POSIX header.
* Fixes from Jeremy Allison and Terry Lambert for pthreads:julian1998-02-135-9/+96
| | | | | | | | | | | | | | | | | | | | | specifically: uthread_accept.c: Fix for inherited socket not getting correct entry in pthread flags. uthread_create.c: Fix to allow pthread_t pointer return to be null if caller doesn't care about return. uthread_fd.c: Fix for return codes to be placed into correct errno. uthread_init.c: Changes to make gcc-2.8 thread aware for exception stack frames (WARNING: This is #ifdef'ed out by default and is different from the Cygnus egcs fix). uthread_ioctl.c: Fix for blocking/non-blocking ioctl. uthread_kern.c: Signal handling fixes (only one case left to fix, that of an externally sent SIGSEGV and friends - a fairly unusual case). uthread_write.c: Fix for lock of fd - ask for write lock, not read/write. uthread_writev.c: Fix for lock of fd - ask for write lock, not read/write. Pthreads now works well enough to run the LDAP and ACAPD(with the gcc 2.8 fix) sample implementations.
* Changed pthread_detach to conform to POSIX, i.e. the single argumentalex1997-12-251-10/+3
| | | | | | | | | provided is of type pthread_t instead of pthread_t *. PR: 4320 Return EINVAL instead of ESRCH if attempting to detach an already detached thread.
* Modify the return values to comply with POSIX. Previously thesealex1997-11-259-77/+38
| | | | | | functions would return -1 and set errno to indicate the specific error. POSIX requires that the functions return the error code as the return value of the function instead.
* Added missing source file uthread_sigwait.c.alex1997-11-241-1/+2
| | | | Submitted by: Daniel M. Eischen <deischen@iworks.InterWorks.org>
* Correct the return value from pthread_cond_timedwait when a timeoutalex1997-11-231-1/+1
| | | | | | occurs (was EAGAIN, is now ETIMEDOUT). Submitted by: Daniel M. Eischen <deischen@iworks.InterWorks.org>
* Bring back nanosleep from the cold.jb1997-06-041-1/+1
| | | | | | | | | | The addition of the nanosleep syscall was correctly added to libc/sys/Makefile so that it is renamed as _thread_sys_nanosleep(). This syscall is one of those that libc_r has to re-implement because the only behaviour is to block the process. So libc_r just ignores the fact that a nanosleep syscall exists and goes its own way - as it has done all along .... and now it does again. And now a simple program can sleep again. Phew.
* Fixed overallocation of _thread_fd_table.alex1997-05-131-1/+1
| | | | | PR: 3494 Submitted by: Steve Bauer <sbauer@rock.sdsmt.edu>
* Add const in the thread version of nanosleep()'s argspeter1997-05-121-1/+2
|
* remove prototype for nanosleep(), it's visible in unistd.h now.peter1997-05-121-1/+0
|
* Bye bye CPLUSPLUSLIB hack! It's not needed any more.jdp1997-05-061-3/+1
| | | | | Don't merge this into -2.2 unless you understand the dependencies on c++rt0, bsd.lib.mk, and gcc -shared. I.e., let me do it.
* Use libc makefiles from now on instead of duplicating them in libc_r.jb1997-05-033-150/+9
| | | | Added Id strings too. It's useful to know who last made a change.
* Set wakeup time in pthread_cond_wait() to `forever' (-1) to preventjb1997-04-111-24/+41
| | | | | | | calling thread from being rescheduled based on an unspecified wakeup time. Bug/fix pointed out by Alexandre Fenyo <fenyo@email.enst.fr>.
* Fix indentations. Sigh.jb1997-04-011-15/+17
|
* Add parentheses to make blocking mode work.jb1997-04-014-4/+12
|
* Revert $FreeBSD$ to $Id$peter1997-02-223-3/+3
|
* Submitted by: John Birrelljulian1997-02-0540-172/+994
| | | | uthreads update from the author.
* Sort cross references.wosch1997-01-206-12/+12
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-143-3/+3
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Sync with libc.alex1996-12-291-1/+1
| | | | Submitted by: John Birrell <jb@cimlogic.com.au>
* Added uthread_attr_destroy.c to SRCS.alex1996-12-291-1/+2
| | | | Submitted by: John Birrell <jb@cimlogic.com.au>
* Add pthread_mutexattr_init() and pthread_mutexattr_setkind_np().hsu1996-11-112-0/+122
|
* Add uthread_attr_init.c, uthread_attr_setstacksize.c, uthread_mattr_init.c,hsu1996-11-111-1/+7
| | | | uthread_mattr_kind_np.c, uthread_multi_np.c, and uthread_single_np.c.
* Moved enum pthread_mutextype to pthread.h.hsu1996-11-111-6/+8
| | | | Add pthread_mutexattr_default definition.
* Make pthread_getspecific() compliant with the final IEEE pthreadshsu1996-11-111-9/+9
| | | | specification: return parameter passing changed.
OpenPOWER on IntegriCloud