John Birrell
3411c10600
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
John Birrell
74ebed9424
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
John Birrell
27949f44dc
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
John Birrell
4bc711423a
Remove __NETBSD_SYSCALLS from CFLAGS now that it is set in sys.mk.
1998-06-09 22:59:16 +00:00
John Birrell
0b0ae157f8
Rename calls when building libc_r.
1998-06-09 22:57:34 +00:00
John Birrell
f4086bc0cb
Make this thread-safe in both libc as well as libc_r.
1998-06-09 22:56:24 +00:00
John Birrell
9e0370f742
Rename when building libc_r.
1998-06-09 22:45:39 +00:00
John Birrell
929140ffab
Add rename support for libc_r.
1998-06-09 22:43:34 +00:00
Bill Paul
55e07e869f
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
John Birrell
6fe173c87b
Implement compile time thread lock debug.
1998-06-09 08:37:35 +00:00
John Birrell
bc99dd746b
Rename fstat as _thread_sys_fstat if being built into libc_r.
1998-06-09 08:35:42 +00:00
John Birrell
3b6533a024
Implement thread support for libc_r. Make the lseek syscall directly
...
to avoid recursive locking.
1998-06-09 08:34:35 +00:00
John Birrell
86af3ff9b0
Implement compile time debug mode for thread locks.
1998-06-09 08:32:23 +00:00
John Birrell
3d853e107e
Add support for thread lock debug. No impact of the malloc code.
1998-06-09 08:30:32 +00:00
John Birrell
f374bfcd3c
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
John Birrell
7d24d0302f
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
John Birrell
3dcb4f7556
Atomic lock asm code for the alpha version of libc_r.
1998-06-09 08:21:55 +00:00
Brian Somers
b5ce85fe32
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 Price
e110cb41dd
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
John Birrell
2d8a580416
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
John Birrell
c6831395f4
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
John Birrell
c359f976b4
Re-design the thread specific key structure.
1998-06-06 07:20:23 +00:00
John Birrell
717d1611f4
I got the last commit back to front.
1998-06-06 07:02:27 +00:00
Joseph Koshy
9c727d2ca9
Spelling corrections.
...
PR: 6868
Submitted by: Josh Gilliam <josh@quick.net>
1998-06-06 05:50:53 +00:00
Joseph Koshy
aae2142e5f
Spelling nits.
...
Pointed out by: Sue Blake <sue@welearn.com.au>
1998-06-06 04:56:13 +00:00
John Birrell
756534d117
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
Andrey A. Chernov
0ea569ff6f
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
Joseph Koshy
5239c0a5dd
Mention that tftpd(8) also uses syslog(3).
1998-06-05 09:20:19 +00:00
Andrey A. Chernov
15af1c9b5d
Add missing uu_lock_txfr() prototype
1998-06-05 08:21:33 +00:00
Steve Price
32c2131395
Fix a bunch of spelling errors.
...
PR: 6856
Submitted by: Josh Gilliam <josh@quick.net>
1998-06-04 21:06:07 +00:00
John Birrell
346406cd60
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
John Birrell
ac4898ab0d
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
Joseph Koshy
70e8940332
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
Mike Smith
d4a7e4ca5d
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
Atsushi Murai
89caae2932
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
John Birrell
fca35cd32f
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
John Birrell
23c82db7a3
send and recv are wrappered in libc, so they shouldn't appear here.
1998-06-01 02:12:15 +00:00
John Birrell
8680cc3c47
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
John Birrell
382306949d
Add some missing syscall wrappers.
1998-05-31 23:48:30 +00:00
John Birrell
5d359b97bb
Remove some stale code.
...
Pointed out by: Amancio
1998-05-31 23:47:06 +00:00
John Birrell
d972680a31
Don't restart a syscall when a SIGCHLD is received by a thread waiting
...
on a child process.
1998-05-31 23:46:01 +00:00
Steve Price
c3572d2769
Allow this to include from C++ programs.
...
PR: 2382
Submitted by: Peter Jeremy <perer.jeremy@alcatel.com.au>
1998-05-31 20:12:06 +00:00
Bruce Evans
67b780b03b
Fixed double slashes in pathnames.
1998-05-31 11:32:38 +00:00
Steve Price
3f58cad638
Several sources including Unix98 say that semctl's fourth
...
parameter is optional except where:
cmd == {IPC_SET || IPC_STAT || GETALL || SETVAL || SETALL}
PR: 2448
Reviewed by: bde
Submitted by: Tim Singletary <tsingle@sunland.gsfc.nasa.gov>
Minor tweaks by: steve
1998-05-31 04:09:09 +00:00
Steve Price
5b32180784
Remove references to getvfsbytype. Also remove getvfsbyname
...
as it has its own manpage.
Discussed with: bde
1998-05-30 18:20:37 +00:00
Brian Somers
46cf264a26
Add uu_lock_txfr() to transfer ownership of a successful
...
uu_lock() to another process.
1998-05-28 23:17:09 +00:00
Peter Wemm
c4a04f5540
Turn on the rcsid storage so that it's easier to tell the difference
...
between libscrypt.a and libdescrypt.a
1998-05-28 12:52:03 +00:00
Peter Wemm
c932f88612
If building and installing libdescrypt, do it first so that the symlinks
...
point to it rather than libscrypt.
This was how it was done prior to libscrypt being added in. This should
stop more people getting burnt with the /usr/lib -> /usr/lib/aout
transition, and the same when the ELF libs come online.
1998-05-27 18:42:36 +00:00
Jordan K. Hubbard
3081c7cd68
Don't use absolute path.
...
Submitted by: jhay
1998-05-27 07:39:05 +00:00
John Birrell
01029f8f17
Make a copy of the caller's iovec array, mallocing if necessary,
...
and modify that if the writev() syscall does not completely write
all bytes in a single call.
1998-05-27 00:44:58 +00:00