summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix few warnings on the alpha.dt1999-06-236-9/+12
|
* Don't get caught in an infinite recursion when PKT_ALIAS_REVERSEbrian1999-06-222-5/+18
| | | | | | | | is set. Document PKT_ALIAS_REVERSE. Pointed out by: Jonathan Hanna <jh@cr1003333-a.crdva1.bc.home.com> PR: 12304
* Correct troff sequence for backslashes in manual page.jkoshy1999-06-212-2/+2
| | | | | PR: docs/12322 Submitted by: Marc Ramirez <mrami@gbtb.com>
* Remove -DNOPOLL from the compilation flags now that there is a poll wrapperjb1999-06-203-12/+12
| | | | | | | in libc_r. Bump the library version number (the scheduler now uses a poll syscall instead of select).
* In the words of the author:jb1999-06-2078-4373/+5601
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o The polling mechanism for I/O readiness was changed from select() to poll(). In additon, a wrapped version of poll() is now provided. o The wrapped select routine now converts each fd_set to a poll array so that the thread scheduler doesn't have to perform a bitwise search for selected fds each time file descriptors are polled for I/O readiness. o The thread scheduler was modified to use a new queue (_workq) for threads that need work. Threads waiting for I/O readiness and spinblocks are added to the work queue in addition to the waiting queue. This reduces the time spent forming/searching the array of file descriptors being polled. o The waiting queue (_waitingq) is now maintained in order of thread wakeup time. This allows the thread scheduler to find the nearest wakeup time by looking at the first thread in the queue instead of searching the entire queue. o Removed file descriptor locking for select/poll routines. An application should not rely on the threads library for providing this locking; if necessary, the application should use mutexes to protect selecting/polling of file descriptors. o Retrieve and use the kernel clock rate/resolution at startup instead of hardcoding the clock resolution to 10 msec (tested with kernel running at 1000 HZ). o All queues have been changed to use queue.h macros. These include the queues of all threads, dead threads, and threads waiting for file descriptor locks. o Added reinitialization of the GC mutex and condition variable after a fork. Also prevented reallocation of the ready queue after a fork. o Prevented the wrapped close routine from closing the thread kernel pipes. o Initialized file descriptor table for stdio entries at thread init. o Provided additional flags to indicate to what queues threads belong. o Moved TAILQ initialization for statically allocated mutex and condition variables to after the spinlock. o Added dispatching of signals to pthread_kill. Removing the dispatching of signals from thread activation broke sigsuspend when pthread_kill was used to send a signal to a thread. o Temporarily set the state of a thread to PS_SUSPENDED when it is first created and placed in the list of threads so that it will not be accidentally scheduled before becoming a member of one of the scheduling queues. o Change the signal handler to queue signals to the thread kernel pipe if the scheduling queues are protected. When scheduling queues are unprotected, signals are then dequeued and handled. o Ensured that all installed signal handlers block the scheduling signal and that the scheduling signal handler blocks all other signals. This ensures that the signal handler is only interruptible for and by non-scheduling signals. An atomic lock is used to decide which instance of the signal handler will handle pending signals. o Removed _lock_thread_list and _unlock_thread_list as they are no longer used to protect the thread list. o Added missing RCS IDs to modified files. o Added checks for appropriate queue membership and activity when adding, removing, and searching the scheduling queues. These checks add very little overhead and are enabled when compiled with _PTHREADS_INVARIANTS defined. Suggested and implemented by Tor Egge with some modification by me. o Close a race condition in uthread_close. (Tor Egge) o Protect the scheduling queues while modifying them in pthread_cond_signal and _thread_fd_unlock. (Tor Egge) o Ensure that when a thread gets a mutex, the mutex is on that threads list of owned mutexes. (Tor Egge) o Set the kernel-in-scheduler flag in _thread_kern_sched_state and _thread_kern_sched_state_unlock to prevent a scheduling signal from calling the scheduler again. (Tor Egge) o Don't use TAILQ_FOREACH macro while searching the waiting queue for threads in a sigwait state, because a change of state destroys the TAILQ link. It is actually safe to do so, though, because once a sigwaiting thread is found, the loop ends and the function returns. (Tor Egge) o When dispatching signals to threads, make the thread inherit the signal deferral flag of the currently running thread. (Tor Egge) Submitted by: Daniel Eischen <eischen@vigrid.com> and Tor Egge <Tor.Egge@fast.no>
* Typo in previous commit.ru1999-06-181-2/+2
|
* Mention that pid 1 is not affected by kill(-1, SIGXXX) too.ru1999-06-181-3/+8
|
* Add a MAINTAINER line to modules that I maintain.ken1999-06-182-0/+2
| | | | Suggested by: brian, markm
* Minor English corrections were made; SEE ALSO was also fixed (no commas).green1999-06-171-4/+4
|
* cam_get_device() was returning 0 on failure, and 1 on success, whilempp1999-06-151-10/+10
| | | | | | | | camcontrol(8) and the documentation in camlib.c and cam(3) all expect -1 on failure and 0 on success. Updated camlib.c to return the values specified by the documentation. PR: 12023
* Fix a minor style nit in the NAME section.mpp1999-06-111-1/+1
|
* Move the description of the strncmp() function from the RETURN VALUESmpp1999-06-111-6/+6
| | | | | | | section to the DESCRIPTION section. PR: 12133 Submitted by: Sheldon Hearn <sheldonh@uunet.co.za>
* Improvement in the description of what this does.markm1999-06-101-10/+10
| | | | Prompted by (and thanks to): W Richard Stevens
* Ensure that host_addr (which is returned in struct hostent::h_addr_list[0])dt1999-06-071-2/+2
| | | | is aligned so that pointer to it can be safely casted to struct in_addr *.
* Spell the .St macro correctly.steve1999-06-071-1/+1
| | | | PR: 11704
* Spell isinf(3) correctly.steve1999-06-071-1/+1
| | | | PR: 11974
* Call do_ctors() and do_dtors() using indirect calls through functionjdp1999-06-061-3/+12
| | | | | | | pointers. The calls are in different sections from the functions being called, and they can potentially be far away. On a very large program, the 21-bit displacement field of the BSR instruction overflowed at link time.
* Update of intro(2)/errno(2) in the ongoing effort of the Programmer'sjseger1999-06-061-0/+25
| | | | | | | Documentation Project <http://home.wxs.nl/~asmodai/pdp.html> Submitted by: Jeroen Ruigrok van der Werven <asmodai@wxs.nl> PR: docs/12030
* Change an internal variable from "class" to "ns_class" for C++'s benefit.peter1999-06-041-2/+2
| | | | | | Apparently BIND-8.2.1 uses ns_class. Submitted by: John Plevyak <jplevyak@inktomi.com>
* Apply patch for PR #12008: remember to reset _yp_enabled flag inwpaul1999-06-041-0/+2
| | | | | | | endpwent() so we don't trip over a NULL db pointer later. PR: 12008 Submitted by: Valentin Netchayev <netch@lucky.net>
* Typo.pb1999-05-251-2/+2
| | | | | PR: docs/11832 Submitted by: Ralf S. Engelschall <rse@engelschall.com>
* Added Posix rand_r function.wes1999-05-242-5/+74
|
* Added a missing comma to the static condition variable initialisationjb1999-05-243-3/+3
| | | | | | definition. Submitted by: David Leonard <David.Leonard@csee.uq.edu.au>, an OpenBSD guy.
* Remove the static declaration from the line[] variable to allowjb1999-05-241-2/+2
| | | | openpty() to be called from a threaded application.
* brucifybrian1999-05-231-2/+2
| | | | Mentioned by: sprice@hiwaay.net
* Fix a problem with static initialisation of mutexes and conditionjb1999-05-239-6/+120
| | | | | | variables. Submitted by: Dan Eischen <eischen@vigrid.com>
* Cope with non page-aligned arguments to ioperm.dfr1999-05-222-14/+19
|
* I seem to be having some CVS problems... I don't know why this wasn'tobrien1999-05-221-0/+702
| | | | commited with the Makefile fixes. CVS/Entries clearly show it being added...
* Add an a.out ld.so so these distributions are standalone.obrien1999-05-214-8/+1416
|
* Need a few more dependacies.obrien1999-05-211-3/+3
|
* Add usr/libexec/ld.soobrien1999-05-211-2/+4
|
* Chflags was clearing all flags supplied on the command line after ajmz1999-05-214-8/+8
| | | | | | | clearing flag like dump or noschg, etc. PR: bin/10071 Submitted by: Andreas Klussmann <andreas@infosys.heitec.net>
* Print SPANS addresses in the correct byte order.mks1999-05-201-3/+3
| | | | | PR: 11691 Submitted by: Jim Pirzyk <Jim.Pirzyk@disney.com>
* Make incoming packets work as keepalives, too. This should fix problemseivind1999-05-201-0/+1
| | | | | | for some games. Notified of problem by: tim@turbinegames.com
* Fixed disordering and duplication of MLINKS in previous commit tobde1999-05-192-3/+3
| | | | libc/string/Makefile.inc. psignal.3 doesn't live in libc/string.
* Add a strsignal(3) (like strerror(3)) for libc compatability with otherpeter1999-05-184-6/+95
| | | | systems. NetBSD, Linux, SVR4 etc all have it.
* Add a note that when a stream opened via fdopen() is closed via fclose(),archie1999-05-171-0/+4
| | | | | the underlying file descriptor is also closed. To me at least this wasn't immediately obvious.
* $ brucify -deblunderphk1999-05-161-2/+2
|
* Ensure that an existing thread gets it's state set to PS_DEAD tojb1999-05-163-3/+21
| | | | | | prevent being rescheduled. Submitted by: Dan Eischen <eischen@vigrid.com>
* - Fixed bug where we NULL'd before we freed the data causing a memory leak.nate1999-05-143-3/+3
| | | | | Submitted by: Ralf S. Engelschall Obtained from: PR i386/11713
* Removed extraneous comma in xrefs.alex1999-05-144-8/+8
|
* Added missing comma in xrefs.alex1999-05-142-4/+4
|
* fix potential memory overwrite in escape parsingache1999-05-131-2/+2
| | | | | PR: 11687 Submitted by: Don Lewis <Don.Lewis@tsc.tdk.com>
* Fix my own Pie Floater.msmith1999-05-121-2/+2
| | | | (Correctly handle 'wd' devices)
* Tidy up references to <sys/rlist.h> and support for the old swap managementpeter1999-05-111-88/+9
| | | | that went away in January.
* More typos.kris1999-05-091-2/+2
|
* Typo.kris1999-05-091-1/+1
| | | | Obtained from: OpenBSD
* Back out the last change to disk.c - a kernel change removed the need.dfr1999-05-092-3/+6
| | | | Enabled writing to the disklabel when writing a disk (only affects alpha).
* Mutex test program.jb1999-05-092-0/+1556
| | | | Submitted by: Daniel Eischen <eischen@vigrid.com>
* Add mutex test program.jb1999-05-093-6/+6
|
OpenPOWER on IntegriCloud