jb
e55019792f
Check the access mode in the flags before waiting on a read or a write
...
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?
1998-06-10 22:28:45 +00:00
jb
45e8efa5ea
Remove SA_RESTART from the signal dispatch in user-space since this
...
seems to be tripping up a lot of applications.
1998-06-10 22:25:18 +00:00
jb
cccdaf6051
When doing a F_SETFL, read the flags back so that the ones stored
...
in the file descriptor table are exactly what the kernel knows subject
to the O_NONBLOCK flag being requested by the user.
1998-06-10 22:24:12 +00:00
jdp
0b6b117e6b
Move ftok() from libcompat to libc, so that it can be closer to its
...
friend shmget().
PR: closes misc/6763
1998-06-10 16:20:21 +00:00
danny
45d39484dc
Fix grammar, "null" -> "NUL"
1998-06-10 12:37:45 +00:00
phk
7a64d46ca3
Spelling fixes.
...
PR: 6903
Reviewed by: phk
Submitted by: Josh Gilliam <josh@quick.net>
1998-06-10 12:34:27 +00:00
jdp
aa1c40519a
This is a null commit to log the fact that I have done a repository
...
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
1998-06-10 04:24:21 +00:00
brian
4ff4152e09
Quieten gcc 2.8.1
1998-06-10 00:26:19 +00:00
brian
62a6d48ec9
Cast pid_t to int for sprintf.
...
Pointed out by: Charlie Sorsby <crs@hgo.net>
1998-06-10 00:16:28 +00:00
jb
5728cd1f8f
Add a commented out CFLAGS entry that can be uncommented to compile thread
...
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-)
1998-06-09 23:25:13 +00:00
jb
765df5f4d2
Implement compile time debug support instead of tracking file name and
...
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.
1998-06-09 23:21:05 +00:00
jb
5ed1d7e948
Add compile time debug instead of doing this all the time. Reduce the
...
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.
1998-06-09 23:16:53 +00:00
jb
4d1f252a40
Add support for compile time debug. This is enabled if libc_r is built
...
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.
1998-06-09 23:13:10 +00:00
jb
10b40100e5
POSIX says that pthread_exit() is not allowed to be called from a
...
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.
1998-06-09 23:08:41 +00:00
jb
ca0476a680
Add compile time thread lock debug support.
...
Add a thread specific flag to trap the case where pthread_exit() is
called from a destructor in violation of the Posix standard.
1998-06-09 23:02:43 +00:00
jb
44521e5a33
Remove __NETBSD_SYSCALLS from CFLAGS now that it is set in sys.mk.
1998-06-09 22:59:16 +00:00
jb
dd948fe380
Rename calls when building libc_r.
1998-06-09 22:57:34 +00:00
jb
14b9607019
Make this thread-safe in both libc as well as libc_r.
1998-06-09 22:56:24 +00:00
jb
2f5fa8684d
Rename when building libc_r.
1998-06-09 22:45:39 +00:00
jb
47cdbd2757
Add rename support for libc_r.
1998-06-09 22:43:34 +00:00
wpaul
9ac915bc7d
Fix potential resource leak: when call to des_crypt_1() fails, remember
...
to destroy the RPC CLIENT handle before returning.
1998-06-09 17:38:33 +00:00
jb
1d52ca33dc
Implement compile time thread lock debug.
1998-06-09 08:37:35 +00:00
jb
2d48c54020
Rename fstat as _thread_sys_fstat if being built into libc_r.
1998-06-09 08:35:42 +00:00
jb
d209219348
Implement thread support for libc_r. Make the lseek syscall directly
...
to avoid recursive locking.
1998-06-09 08:34:35 +00:00
jb
05385aab22
Implement compile time debug mode for thread locks.
1998-06-09 08:32:23 +00:00
jb
439aa43648
Add support for thread lock debug. No impact of the malloc code.
1998-06-09 08:30:32 +00:00
jb
fe07ac9fc2
Implement compile time debug support for spinlocks.
...
Simplify the atomic lock prototype, removing the lock value.
Delete the unlock prototypes that are not required.
1998-06-09 08:28:49 +00:00
jb
ffa7278469
Delete the atomic unlock function since it is no longer required.
...
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).
1998-06-09 08:25:41 +00:00
jb
6433b79084
Atomic lock asm code for the alpha version of libc_r.
1998-06-09 08:21:55 +00:00
brian
e56ba1efb9
Don't call PunchFWHole() ifdef NO_FW_PUNCH
...
Pointed out by: "Steve Sims" <SimsS@IBM.Net>
1998-06-06 21:52:37 +00:00
steve
e6bc8c123a
Fix this so that it compiles in the !__STDC__ case.
...
Also be consistent about usage of #if ...
Pointed out by: bde
1998-06-06 18:52:43 +00:00
jb
d9ca3f69e6
Add a warning message for a thread locking against itself. This is
...
not supposed to happen, but I have seen bogus g++ code that causes
it.
1998-06-06 07:27:06 +00:00
jb
fa1af3c55b
Simplify the handling of thread specific data. Only track if a key
...
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.
1998-06-06 07:24:24 +00:00
jb
0e04174c22
Re-design the thread specific key structure.
1998-06-06 07:20:23 +00:00
jb
14d31aca92
I got the last commit back to front.
1998-06-06 07:02:27 +00:00
jkoshy
0d7d76d982
Spelling corrections.
...
PR: 6868
Submitted by: Josh Gilliam <josh@quick.net>
1998-06-06 05:50:53 +00:00
jkoshy
6df674abae
Spelling nits.
...
Pointed out by: Sue Blake <sue@welearn.com.au>
1998-06-06 04:56:13 +00:00
jb
231ebf2d6f
Fix the signal behaviour for internal states which set the thread
...
state to running despite the SA_RESTART flag which is really just for
syscalls.
1998-06-05 23:31:55 +00:00
ache
2682c4a8c8
Fix handling more than 1 char with non-C locale
...
Misc. cleanup
PR: 6825
Submitted by: Sergey Gershtein <sg@mplik.ru>
1998-06-05 09:49:51 +00:00
jkoshy
9f8f6862d0
Mention that tftpd(8) also uses syslog(3).
1998-06-05 09:20:19 +00:00
ache
bebe324aff
Add missing uu_lock_txfr() prototype
1998-06-05 08:21:33 +00:00
steve
260fa64a35
Fix a bunch of spelling errors.
...
PR: 6856
Submitted by: Josh Gilliam <josh@quick.net>
1998-06-04 21:06:07 +00:00
jb
3503326bdd
No longer need the architecture specific include from libc now that
...
NetBSD syscalls are defined in sys.mk if they are being used.
1998-06-03 08:55:20 +00:00
jb
19fb1c4d76
If using NetBSD syscalls the rtprio syscall doesn't exist, so just
...
don't try to use it to set special priorities.
1998-06-03 08:12:00 +00:00
jkoshy
903a43c624
Correct wrong claim about `telldir()' cookie lifetimes.
...
PR: 4043
Submitted by: Joe Orthoefer <j_orthoefer@tia.net>
1998-06-03 06:54:24 +00:00
msmith
09e640d1b3
Add a trivial mechanism for returning a useful default value if one is
...
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>
1998-06-01 20:58:03 +00:00
amurai
daec942153
Trim a domain part for wtmp as same as showed by "netstat -r".
...
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>
1998-06-01 08:47:04 +00:00
jb
40735bd785
I shouldn't do things early in the morning.
...
I shouldn't do things early in the morning.
[...]
I shouldn't do things early in the morning.
1998-06-01 02:14:34 +00:00
jb
1a599891ae
send and recv are wrappered in libc, so they shouldn't appear here.
1998-06-01 02:12:15 +00:00
jb
205e447fcb
Remove some syscalls that should have been renamed (libc_r doesn't need
...
to wrapper them) and add a couple that should have been there.
1998-05-31 23:53:50 +00:00