summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Check the access mode in the flags before waiting on a read or a writejb1998-06-1012-12/+156
| | | | | that might never be possible if the file was not opened in the corrent mode. This prevents a hang for bad programs. Why do people code like that?
* Remove SA_RESTART from the signal dispatch in user-space since thisjb1998-06-103-276/+117
| | | | seems to be tripping up a lot of applications.
* When doing a F_SETFL, read the flags back so that the ones storedjb1998-06-103-9/+93
| | | | | in the file descriptor table are exactly what the kernel knows subject to the O_NONBLOCK flag being requested by the user.
* Move ftok() from libcompat to libc, so that it can be closer to itsjdp1998-06-104-141/+4
| | | | | | friend shmget(). PR: closes misc/6763
* Fix grammar, "null" -> "NUL"danny1998-06-101-5/+5
|
* Spelling fixes.phk1998-06-101-1/+1
| | | | | | PR: 6903 Reviewed by: phk Submitted by: Josh Gilliam <josh@quick.net>
* This is a null commit to log the fact that I have done a repositoryjdp1998-06-102-2/+2
| | | | | | | copy to bring these files into libc from libcompat. I will enable them and kill off the libcompat versions on the main branch soon. PR: step one toward closing misc/6763
* Quieten gcc 2.8.1brian1998-06-101-2/+2
|
* Cast pid_t to int for sprintf.brian1998-06-101-2/+2
| | | | Pointed out by: Charlie Sorsby <crs@hgo.net>
* Add a commented out CFLAGS entry that can be uncommented to compile threadjb1998-06-093-3/+18
| | | | | lock debug into libc_r. I don't know if this is the best place to document this, but at least it is recorded somewhere. 8-)
* Implement compile time debug support instead of tracking file name andjb1998-06-0962-321/+342
| | | | | | | line number every time a file descriptor is locked. This looks like a big change but it isn't. It should reduce the size of libc_r and make it run slightly faster.
* Add compile time debug instead of doing this all the time. Reduce thejb1998-06-091-46/+333
| | | | | | | time that a thread keeps the file descriptor table locked. In particular, perform malloc/free calls outside the lock and handle the situation where two threads can race to initialise the table entry for the same file descriptor.
* Add support for compile time debug. This is enabled if libc_r is builtjb1998-06-093-60/+156
| | | | | | | | | | with -D_LOCK_DEBUG. This adds the file name and line number to each lock call and these are stored in the spinlock structure. When using debug mode, the lock function will check if the thread is trying to lock something it has already locked. This is not supposed to happen because the lock will be freed too early. Without lock debug, libc_r should be smaller and slightly faster.
* POSIX says that pthread_exit() is not allowed to be called from ajb1998-06-093-0/+30
| | | | | | | | cleanup destructor, so trap this case to prevent me from being being burnt again by applications that try to do this. With this change, an application (like one using a mis-configured ACE) will exit the process after displaying a message quoting the POSIX section that the application has violated.
* Add compile time thread lock debug support.jb1998-06-093-18/+63
| | | | | Add a thread specific flag to trap the case where pthread_exit() is called from a destructor in violation of the Posix standard.
* Remove __NETBSD_SYSCALLS from CFLAGS now that it is set in sys.mk.jb1998-06-091-2/+3
|
* Rename calls when building libc_r.jb1998-06-091-3/+3
|
* Make this thread-safe in both libc as well as libc_r.jb1998-06-091-13/+2
|
* Rename when building libc_r.jb1998-06-095-9/+9
|
* Add rename support for libc_r.jb1998-06-091-1/+50
|
* Fix potential resource leak: when call to des_crypt_1() fails, rememberwpaul1998-06-091-2/+3
| | | | to destroy the RPC CLIENT handle before returning.
* Implement compile time thread lock debug.jb1998-06-092-4/+4
|
* Rename fstat as _thread_sys_fstat if being built into libc_r.jb1998-06-091-1/+5
|
* Implement thread support for libc_r. Make the lseek syscall directlyjb1998-06-091-2/+7
| | | | to avoid recursive locking.
* Implement compile time debug mode for thread locks.jb1998-06-093-11/+11
|
* Add support for thread lock debug. No impact of the malloc code.jb1998-06-091-4/+4
|
* Implement compile time debug support for spinlocks.jb1998-06-091-5/+24
| | | | | | Simplify the atomic lock prototype, removing the lock value. Delete the unlock prototypes that are not required.
* Delete the atomic unlock function since it is no longer required.jb1998-06-093-45/+15
| | | | | Simplify the atomic lock to just write a value of 1 to the lock instead of taking the value passed by the caller (which just confused things).
* Atomic lock asm code for the alpha version of libc_r.jb1998-06-092-0/+114
|
* Don't call PunchFWHole() ifdef NO_FW_PUNCHbrian1998-06-063-0/+6
| | | | Pointed out by: "Steve Sims" <SimsS@IBM.Net>
* Fix this so that it compiles in the !__STDC__ case.steve1998-06-061-1/+5
| | | | | | Also be consistent about usage of #if ... Pointed out by: bde
* Add a warning message for a thread locking against itself. This isjb1998-06-063-9/+42
| | | | | not supposed to happen, but I have seen bogus g++ code that causes it.
* Simplify the handling of thread specific data. Only track if a keyjb1998-06-063-135/+99
| | | | | | is allocated or not, rather than keeping a count and attempting to know it it is in-use. POSIX says that once a key is deleted, using the key again results in undefined behaviour.
* Re-design the thread specific key structure.jb1998-06-063-9/+6
|
* I got the last commit back to front.jb1998-06-063-9/+9
|
* Spelling corrections.jkoshy1998-06-069-29/+29
| | | | | PR: 6868 Submitted by: Josh Gilliam <josh@quick.net>
* Spelling nits.jkoshy1998-06-062-4/+4
| | | | Pointed out by: Sue Blake <sue@welearn.com.au>
* Fix the signal behaviour for internal states which set the threadjb1998-06-053-18/+153
| | | | | state to running despite the SA_RESTART flag which is really just for syscalls.
* Fix handling more than 1 char with non-C localeache1998-06-051-16/+4
| | | | | | Misc. cleanup PR: 6825 Submitted by: Sergey Gershtein <sg@mplik.ru>
* Mention that tftpd(8) also uses syslog(3).jkoshy1998-06-051-2/+3
|
* Add missing uu_lock_txfr() prototypeache1998-06-051-1/+2
|
* Fix a bunch of spelling errors.steve1998-06-0410-18/+18
| | | | | PR: 6856 Submitted by: Josh Gilliam <josh@quick.net>
* No longer need the architecture specific include from libc now thatjb1998-06-031-7/+0
| | | | NetBSD syscalls are defined in sys.mk if they are being used.
* If using NetBSD syscalls the rtprio syscall doesn't exist, so justjb1998-06-031-1/+7
| | | | don't try to use it to set special priorities.
* Correct wrong claim about `telldir()' cookie lifetimes.jkoshy1998-06-031-16/+11
| | | | | PR: 4043 Submitted by: Joe Orthoefer <j_orthoefer@tia.net>
* Add a trivial mechanism for returning a useful default value if one ismsmith1998-06-011-1/+4
| | | | | | | | | available and the kernel MIB setting is zero. Return the result from getpagesize() if the p1003_1b.pagesize MIB value is zero. Suggested by: Joerg Schilling <schilling@fokus.gmd.de>
* Trim a domain part for wtmp as same as showed by "netstat -r".amurai1998-06-012-3/+42
| | | | | | | | | | | | | Here is a some example for avoiding a confusion. It asssumes a logged host domain is "spec.co.jp". All example is longer than UT_HOSTNAMELEN value. 1) turbo.tama.spec.co.jp: 192.19.0.2 -> trubo.tama 2) turbo.tama.foo.co.jp : 192.19.0.2 -> 192.19.0.2 3) specgw.spec.co.jp : 202.32.13.1 -> specgw Submitted by: Atsushi Murai <amurai@spec.co.jp>
* I shouldn't do things early in the morning.jb1998-06-015-152/+3
| | | | | | I shouldn't do things early in the morning. [...] I shouldn't do things early in the morning.
* send and recv are wrappered in libc, so they shouldn't appear here.jb1998-06-013-9/+9
|
* Remove some syscalls that should have been renamed (libc_r doesn't needjb1998-05-313-18/+18
| | | | to wrapper them) and add a couple that should have been there.
OpenPOWER on IntegriCloud