Commit Graph

15 Commits

Author SHA1 Message Date
Daniel Eischen
d201fe46e3 Remove _THREAD_SAFE and make libc thread-safe by default by
adding (weak definitions to) stubs for some of the pthread
functions.  If the threads library is linked in, the real
pthread functions will pulled in.

Use the following convention for system calls wrapped by the
threads library:
	__sys_foo - actual system call
	_foo - weak definition to __sys_foo
	foo - weak definition to __sys_foo

Change all libc uses of system calls wrapped by the threads
library from foo to _foo.  In order to define the prototypes
for _foo(), we introduce namespace.h and un-namespace.h
(suggested by bde).  All files that need to reference these
system calls, should include namespace.h before any standard
includes, then include un-namespace.h after the standard
includes and before any local includes.  <db.h> is an exception
and shouldn't be included in between namespace.h and
un-namespace.h  namespace.h will define foo to _foo, and
un-namespace.h will undefine foo.

Try to eliminate some of the recursive calls to MT-safe
functions in libc/stdio in preparation for adding a mutex
to FILE.  We have recursive mutexes, but would like to avoid
using them if possible.

Remove uneeded includes of <errno.h> from a few files.

Add $FreeBSD$ to a few files in order to pass commitprep.

Approved by:	-arch
2001-01-24 13:01:12 +00:00
Peter Wemm
f4e6d58dca vfsload maps into kldload only now, no more fork/exec of modload(8). 1999-04-19 14:28:45 +00:00
Peter Wemm
86854f0360 A feeble attempt at kld compatability. The mount_* programs assume that
they cannot mount a filesystem that they cannot see in getvfsbyname().
Part 1 of this is a hack, make vfsisloadable() always return true - the
ultimate decider of whether it's loadable or not is kldload() or mount().
Part 2 of this is to have vfsload() call kldload(2) and return success if
it works.  This means that we will use a viable kld module in preference
to an LKM!
Ultimately, the thing to do is remove the hacks to do a vfsload in all the
mount_* commands and let the kernel do it by itself in mount(2).
1998-11-03 15:02:29 +00:00
Bruce Evans
2aeb5561dd Moved most of the (source-level) compatibility hacks for the vfsconf
interface from sys/mount.h to libc/getvfsent.c  The new interface is
now the default.
1998-01-20 10:36:24 +00:00
Bruce Evans
1e69872de7 Started getting rid of the compatibility cruft for the Lite1 mount()
and the pre-Lite2 vfsconf interfaces.

For getvfsent.c, just define _OLD_VFSCONF.  This will give the
current default macro hacks in <sys/mount.h> when the default is
reversed.  This is an intermediate step.
1998-01-17 16:32:14 +00:00
Bruce Evans
0df382bd0f Changed vfc_typenum back to vfc_index. The old vfsconf struct is now
visible again, and the new vfsconf struct didn't match reality.
1997-03-03 05:53:54 +00:00
Adam David
590f415db7 lite2 remame: vfc_index --> vfc_typenum 1997-02-12 01:34:38 +00:00
Joerg Wunsch
55e0d3b7cf Fix an off-by-one error in getvfsent().
Detected by: phkmalloc :)
1996-10-26 21:53:21 +00:00
Garrett Wollman
6335830372 Fix for vfsload(3):
- Don't allow non-root users to specify LKMDIR.
- Don't allow any users to specify TMPDIR.
- Call /sbin/modload using execl() rather than execlp().
1996-05-17 15:35:13 +00:00
Jeffrey Hsu
782ff9b2f0 From Lite2: rename fs to vfs. 1996-03-11 03:06:45 +00:00
Rodney W. Grimes
6c06b4e2aa Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
Garrett Wollman
07ef895025 Fix so that people who don't have LKMs compiled in their kernels don't
get hosed: vfsisloadable() always returns false if /dev/lkm cannot be
opened for writing.
1994-09-25 00:48:27 +00:00
Garrett Wollman
d5ebbcdf85 Pass -q and -u flags to modload so that it shuts up and doesn't leave
modules lying around.
1994-09-22 22:36:57 +00:00
Garrett Wollman
5ba34297b9 Fix stupid memory-allocation error. 1994-09-22 02:17:26 +00:00
Garrett Wollman
8e2331ca34 Added VFS functions: getvfsvbyname, getvfsbytype, getvfsent, setvfsent,
endvfsent, vfsisloadable, vfsload.
Someday these will even be documented.
1994-09-22 01:07:37 +00:00