Peter Wemm [Thu, 30 Apr 1998 17:31:22 +0000 (17:31 +0000)]
partially revert rev 1.2 spammage. This file is broken as shipped and
depends on the typo in the #ifdef in order to work.. Since the line has
been touched, leave a note there so that nobody else tries to "fix" it
again.
Peter Wemm [Thu, 30 Apr 1998 16:48:20 +0000 (16:48 +0000)]
Change euid while reading the user's .login_cap file in case the homedir
is on a NFS partion without root read access. Also, flip euid again for
the duration of the chdir() to the homedir for the same reason.
PR: 5145
Submitted by: Joel.Faedi@esial.u-nancy.fr
Also tested by: A Joseph Koshy <koshy@india.hp.com>
John Birrell [Thu, 30 Apr 1998 10:02:44 +0000 (10:02 +0000)]
Oops, backout the previous change having confused my underscores.
__thread_create is a syscall that uses the default asm. It is
_thread_create that contains specific asm code, but that lives in
libpthread.
John Birrell [Thu, 30 Apr 1998 09:38:03 +0000 (09:38 +0000)]
Make errno finally and permanently thread-aware so that it is no longer
necessary to compile with _THREAD_SAFE defined. This means that people
will get thread-aware code whether they like it or not. This change
is required to allow a process to link against libpthread and libc
to use kernel threads (and prevent each thread from clobbering another
thread's errno just be doing a syscall).
This is bound to break some ports, but it is strictly allowed by ANSI C,
so anything that breaks as a result was already broken anyway 8-).
"Sorry".
John Birrell [Thu, 30 Apr 1998 09:32:48 +0000 (09:32 +0000)]
Make cerror thread aware by calling __error() to get a pointer to the
thread-specific error variable. This change make libc use the same cerror
code that libc_r has been using.
John Birrell [Thu, 30 Apr 1998 09:30:50 +0000 (09:30 +0000)]
The syscall that creates a kernel thread is coming, but it doesn't use the
default syscall asm, so add it to NOASM. The other syscalls that manipulate
kernel threads use the default asm code, so they just get built
automatically.
John Birrell [Thu, 30 Apr 1998 09:13:48 +0000 (09:13 +0000)]
Build __error.c into libc, but not libc_r. The weak symbol in the
file works with libpthread, but when built into libc_r which has a non-weak
symbol of the same name, the linker behaves unpredicatably and sometimes
links the wrong symbol. The linker behaviour is a byproduct of what
the program calls from object to object so it is like winning a lottery
if the program actually works. The odds are quite good - 95:1, I think.
We need a sure thing, though, so weak symbols can't be used instead
of renaming things.
John Birrell [Thu, 30 Apr 1998 09:04:10 +0000 (09:04 +0000)]
Change the name of this source file so that libc_r builds it instead
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.
John Dyson [Thu, 30 Apr 1998 05:28:53 +0000 (05:28 +0000)]
Fix an error that I made with an optimization. In the case
of softupdates, we need to do vtruncbuf the old way. Luoqi
caught, found the bug and submitted this fix.
Submitted by: Luoqi Chen <luoqi@chen.ml.org>
Andreas Klemm [Wed, 29 Apr 1998 17:09:41 +0000 (17:09 +0000)]
Fixes incorrect company and product names in uha(4) manpage and
LINT config file. Should be merged to -STABLE as well.
PR: closes 6447
Submitted by: Steven Plite splite@purdue.edu
John Birrell [Wed, 29 Apr 1998 09:59:34 +0000 (09:59 +0000)]
Change signal model to match POSIX (i.e. one set of signal handlers
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.
John Birrell [Wed, 29 Apr 1998 09:10:58 +0000 (09:10 +0000)]
Replace the threaded locking with spinlock calls for both threaded
and non-threaded programs. This makes malloc thread safe for linking
with libpthread and kernel threads.
John Birrell [Wed, 29 Apr 1998 09:02:16 +0000 (09:02 +0000)]
Stubs are required in libc so that it can be used with libpthread
(and kernel threads), but weak symbols and non-weak symbols of the
same name built into libc_r result in unpredictable linking.
John Dyson [Wed, 29 Apr 1998 04:28:22 +0000 (04:28 +0000)]
Tighten up management of memory and swap space during map allocation,
deallocation cycles. This should provide a measurable improvement
on swap and memory allocation on loaded systems. It is unlikely a
complete solution. Also, provide more map info with procfs.
Chuck Cranor spurred on this improvement.
John Dyson [Tue, 28 Apr 1998 05:54:47 +0000 (05:54 +0000)]
Fix a pseudo-swap leak problem. This mitigates "leaks" due to
freeing partial objects, not freeing entire objects didn't
free any of it. Simple fix to the map code.
Reviewed by: dg
Bruce Evans [Tue, 28 Apr 1998 05:31:41 +0000 (05:31 +0000)]
Fixed syntax error for `make checkdpadd'. libfl.a should never be
used. ${LIBFL} is set to a weird value in an attempt to inhibit
its use, but only breaks properly in some contexts.
Fixed the usual style bugs for DPADD and LDADD (disorder, and += for the
initial assignment).
Bruce Evans [Mon, 27 Apr 1998 16:21:33 +0000 (16:21 +0000)]
Don't build dependencies unless NOCLEAN is set. This speeds up
`make world' by about 14% here (down to 4490 seconds real on a
K6/233). Temporarily skip this optimization when building with
-j, since there are still many broken makefiles.
Fixed NOCLEANDIR option. Cleaning of `.depend' was broken.
Put -nostdinc in CFLAGS, not in CC, and don't override the default
CC. This fixes enforcing use of ${WORLDTMP}/usr/include.
Bruce Evans [Mon, 27 Apr 1998 15:08:07 +0000 (15:08 +0000)]
Don't include ../Makefile.inc here. bsd.man.mk is always included
in another .mk file which has already included ../Makefile.inc, so
including ../Makefike.inc again mainly messed up `+=' definitions.
David Greenman [Mon, 27 Apr 1998 10:51:26 +0000 (10:51 +0000)]
Fixed a bug where if MAXUSRARGS amount of args were passed in, the argv[]
array would end up without the NULL pointer termination, causing the glob
code to glob whatever garbage happend to follow on the stack.
Bruce Evans [Sun, 26 Apr 1998 16:31:14 +0000 (16:31 +0000)]
Fixed `make -j9' by putting generated headers in ${SRCS}. Removed bogus
dependencies of generated .c files on generated headers (these made
`make -JN' work provided `depend' was made first). Sorted sources lists.
When all transformation rules to or from a suffix disappeared, make tries
to free the suffix. I think, it is a very strange idea. (Or, maybe, it is a
POSIX requirement?) And it is done incorrectly. Apparently, it even don't
update the list of known suffixes (but it is an other bug).
Jean-Simon Pendry's paper on amd refers to the use of "ypcat -k"
against the "master map" to get the list of mount point/amd map
correspondences, and using that list as command-line arguments to start
amd.
When I tried to do this with the existing /etc/rc* scripts, I found that
I couldn't do this by modifying only /etc/rc.conf: that file gets
sourced very early by /etc/rc, well before any networking functionality
is present, let alone NIS. Further, I wasn't able to figure out a way
to use various levels & types of quoting to defer evaluation of the
string to a point subsequent to NIS initialization.
As a result, I resorted to hacking /etc/rc.network -- but I did it in a
way that ought to be reasonably general, and avoid breakage for anyone
else.
PR: 6387
Reviewed by: phk
Submitted by: David Wolfskill <dhw@whistle.com>
`sigprocmask()' man page references `sigmask()' in synopsis.
Note odd `sigmask()' line in synopsis. `sigsetops(3)' is better suited
for `sigprocmask' and is already referenced from the manual page.
(`sigmask()' is useful for the older (& deprecated) `sigsetmask()' API).
PR: 6395
Reviewed by: phk
Submitted by: Joseph Koshy <koshy@india.hp.com>
Andreas Klemm [Sat, 25 Apr 1998 14:32:22 +0000 (14:32 +0000)]
make includes has to execute "make beforeinstall" in src/lib/libcalendar
as well, otherwise "make depend" during "make buildworld" fails in
usr.bin/ncal