Commit Graph

2740 Commits

Author SHA1 Message Date
jdolecek
6e7eeb5d94 we now support POSIX 1003.1b semaphores, add _POSIX_SEMAPHORES feature
define
2003-01-20 22:11:15 +00:00
christos
326105323e regen 2003-01-20 20:25:04 +00:00
christos
f82c14c1fc regen 2003-01-20 20:06:25 +00:00
christos
566542c308 add support for p1003.1b semaphores. From FreeBSD 2003-01-20 20:05:26 +00:00
skrll
023fed95bf Move _POSIX_THREADS to the right place and define a few other symbolic
constants for the features we gained with the merge of the nathanw_sa
branch.

Ok'd by thorpej.

Closes my PR 19930.
2003-01-19 19:41:44 +00:00
thorpej
a03cb2b851 Regen to get correct RCS ID. 2003-01-18 23:28:15 +00:00
christos
4212ab36e8 get rid of the != 0 in the non-gcc aware case. 2003-01-18 18:05:56 +00:00
thorpej
6f2d376f48 Bump kernel version to 1.6M -- nathanw_sa branch merge. (M for
multi-lwp processes? :-)
2003-01-18 10:09:03 +00:00
thorpej
022e5e7902 Regen: Merge the nathanw_sa branch. 2003-01-18 10:08:00 +00:00
thorpej
b78f59b443 Merge the nathanw_sa branch. 2003-01-18 08:51:40 +00:00
itojun
2ef691da9b pull queue.h in to make userland compilation happy 2003-01-17 10:07:23 +00:00
itojun
40606ab8f2 switch from kame-based m_aux mbuf auxiliary data, to openbsd m_tag
implementation.  it will simplify porting across *bsd (such as kame/altq),
and make us more synchronized.  from Joel Wilsson
2003-01-17 08:11:49 +00:00
matt
f00ee1f0a1 Include <sys/ioctl_compat.h> when COMPAT_IBCS2 2003-01-16 18:23:36 +00:00
kleink
912ab720a8 Move SIG_HOLD from <sys/signalvar.h> to <sys/signal.h>, since POSIX-2001
wants that name to be exposed.
2003-01-15 22:48:21 +00:00
christos
d33a7d6abc add apple_bootzeroblock 2003-01-11 19:14:18 +00:00
christos
a7ca1a461f protect against multiple inclusion. 2003-01-11 18:54:19 +00:00
wiz
1035faff1d writable, not writeable. 2003-01-06 20:30:28 +00:00
thorpej
42b7b023b2 Bump rev to 1.6L ... new autoconfiguration message printing routines. 2003-01-03 02:47:30 +00:00
thorpej
f631b51555 Add aprint_error(), which is like aprint_normal(), but also records
the number of times it is called.  This allows subsystems to report
the number of errors that occurred during a quiet/silent subsystem
startup.  aprint_get_error_count() reports this count and resets it
to 0.

Also add printf_nolog(), which is like printf(), but prevents the
output from hitting the system log.
2002-12-31 23:45:36 +00:00
thorpej
3770328cab Add the following message printing routines, designed for printing
autoconfiguration messages:

aprint_normal: Send to console unless AB_QUIET.  Always goes to the log.
aprint_naive: Send to console only if AB_QUIET.  Never goes to the log.
aprint_verbose: Send to console only if AB_VERBOSE.  Always goes to the log.
aprint_debug: Send to console and log only if AB_DEBUG.

API inspired by the same routines in BSD/OS.

Will be used to address kern/5155.
2002-12-31 17:48:03 +00:00
thorpej
438dc24855 Partially expose some of the kernel printf internals in the new
<sys/kprintf.h> header file.  This allows subsystems that need
printf semantics other than what are provided by the standard
kernel printf routines to implement exactly what they want.
2002-12-31 16:53:26 +00:00
explorer
0c77fcf312 add ENVSYS_INDICATOR and ENVSYS_INTEGER types 2002-12-31 05:27:29 +00:00
kristerw
e4081b820a It is not valid C++ to have a semicolon after
extern "C" {}
so remove it from __END_DECLS.
2002-12-29 19:21:34 +00:00
manu
41bfbd28fe On Darwin, mach_init is the system bootstrap process. It is responsible
for forking the traditional UNIX init(8) and it does the Mach port naming
service. We need mach_init for the naming service, but unfortunately, it
will only act as such if its PID is 1. We introduce a sysctl
(emul.darwin.init_pid) to fool a given process into thinking its PID is 1.
That way we can get mach_init into behaving as the name server.

Typical use:
/sbin/sysctl -w emul.darwin.init_pid=$$ ; exec /emul/darwin/sbin/mach_init
2002-12-24 12:15:45 +00:00
gmcgarry
f8f2c11fe0 Re-add yield(). Only used by compat code at the moment. 2002-12-21 23:52:05 +00:00
manu
4a06119a9d Pass the system call table to trace_enter() and ktrsys() so that it is
possible to use alternate system call tables. This is usefull for
displaying correctly the arguments in Mach binaries traces.

If NULL is given, then the regular systam call table for the process is used.
2002-12-21 16:23:56 +00:00
manu
ebf321d707 Comment what e_fault in struct emul does 2002-12-21 16:22:10 +00:00
atatat
da6a21704a Spelling police. "DETATCH" is not the right speling. 2002-12-20 20:57:26 +00:00
gmcgarry
a5424a9df1 Remove yield() until the scheduler supports the sched_yield(2) system
call.
2002-12-20 05:43:09 +00:00
thorpej
4c82425f5e Regen: reserved syscall slots for sigwaitinfo(2), sigtimedwait(2),
and sigqueue(2).
2002-12-19 23:53:42 +00:00
kleink
ac7290d7c2 Add a sysconf(3) knob for {ATEXIT_MAX}. 2002-12-19 23:31:54 +00:00
jdolecek
d18332248c replace magic number '500' in pid allocation code with a macro PID_SKIP,
defined in <sys/proc.h> (along PID_MAX, NO_PID)
2002-12-12 20:41:45 +00:00
christos
ebad7fe0c2 always prototype mach message support. 2002-12-12 17:40:55 +00:00
abs
603a2bdd3d Allow NOFILE to be overridden in kernel configs, similar to MAXUPRC 2002-12-11 23:22:03 +00:00
jdolecek
5fd22809a5 Add kern.forkfsleep sysctl - set/get time (in miliseconds) for which
process would be forced to sleep in fork() if it hits either global
or user maxproc limit. Default is zero (no forced sleep).
Maximum is 20 seconds.
2002-12-11 19:14:34 +00:00
atatat
7ede0eeb03 Provide a ioctl called FIOGETBMAP (there are some who call
it...FIBMAP) that translates a logical block number to a physical
block number from the underlying device.  Via VOP_BMAP().
2002-12-11 18:25:03 +00:00
jdolecek
5ea539a0c5 reserve sysctl number for kern.lwp, which is used on nathanw_sa branch 2002-12-11 17:32:53 +00:00
scw
5238505cfe KERN_MAXID needs to be one more than the last sysctl. Spotted by simonb. 2002-12-11 13:12:48 +00:00
scw
39a5a9dc76 Add two sysctls: kern.labelsector and kern.labeloffset.
These are of use to userland code which previously depended on the
hard-coded values of LABELSECTOR and LABELOFFSET to figure out the
location of the disklabel for a particular platform.

With the introduction of umbrella ports such as evbarm, evbmips, etc,
the location of the disklabel may vary between kernels for the same
MACHINE. This sysctl will allow userland programs to remain independent
of the particular flavour of MACHINE in such cases.
2002-12-11 12:59:29 +00:00
scw
36109bbc9c Avoid strict-alias warnings. 2002-12-11 12:13:11 +00:00
thorpej
e8cc3884de Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is. 2002-12-10 17:14:02 +00:00
manu
6492e2171f Added support for dumping mach messages in ktrace/kdump. While we are
there, KNFify a few functions.
2002-12-09 21:29:20 +00:00
christos
b5b005c247 s/FNOSYMLINK/O_NOFOLLOW/ and allow it in open(2). For compatibility with other
BSD's
2002-12-06 22:43:35 +00:00
fvdl
6b1bf68d9b Add STAILQ_*. Really the same as SIMPLEQ, but this syncs the API with FreeBSD. 2002-12-06 22:23:34 +00:00
simonb
f8cc054e04 Fix typo in a.out link set macros (s/ifdef/ifndef/). 2002-12-05 05:47:24 +00:00
matt
f7ce29b0d5 Only declare ttydefchars if _KERNEL is defined. 2002-12-02 05:11:02 +00:00
matt
e164bfcb71 Reorder things so that multiple inclusion protection so optional
definitions are outside the protection checks.
2002-12-01 22:57:17 +00:00
matt
3ec683c955 Move declartion of SIGPROP to outside of multiple inclusion protection.
If _KERNEL is defined and SIGPROP is not defined, define sigprop as an
extern.
2002-12-01 21:32:05 +00:00
matt
67ed9c3b4f Add multiple inclusion protection. 2002-12-01 21:25:10 +00:00
matt
74a001a61b If TTYDEFCHARS is not defined, define ttydefchars as an extern so the
variable is defined, if not instantiated.
2002-12-01 21:24:28 +00:00
manu
39b522c107 back out the previous change, which is useless. Darwin loads the libraries
that are required by the binary, not the libraries required by the libraries
required by the binary.

Hopefully, binaries should load again on i386.
2002-11-29 15:49:09 +00:00
manu
b36d0c1bf6 Maitain a chainedlist of already loaded Mach-O objects, to avoid loading
the same file multiple times because of recursive loading (ie: libx require
liby and libz and liby require libz, so libz would be loaded twice)

This is probably suboptimal, but it enable /bin/sh to load on the PowerPC,
so it's a good interim solution until we figure precisely how things should
work.

I'm not sure whether this makes the excessive recursive check useless or not.
2002-11-29 11:31:11 +00:00
wiz
53447847a8 Fix typo in comment. 2002-11-27 13:47:15 +00:00
tron
b60d9eb23c For some mysterious reason we have to actually install "siginfo.h" to be
able to use it.
2002-11-27 13:30:06 +00:00
junyoung
f8c198033a Program header types 0x60000000 ~ 0x6fffffff are reserved for
OS-specific semantics.
2002-11-27 13:15:50 +00:00
lukem
0635de35a3 Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more. 2002-11-26 23:30:07 +00:00
christos
410171110f change fields of struct selinfo from si_ to sel_ so that the don't conflict
with siginfo members.
2002-11-26 19:08:06 +00:00
christos
0cce063c0c deal with siginfo changes, but don't enable SA_SIGINFO outside the kernel
yet, since we are not ready.
2002-11-26 19:07:14 +00:00
christos
50f8466034 This is not used yet. 2002-11-26 19:06:38 +00:00
manu
589ff87f68 Rewrite the excessive recursive loading protection by actually counting the
recursions instead of the total function calls. We limit to 6 recursion,
which is what Darwin does.
2002-11-24 21:59:43 +00:00
thorpej
3d64e26035 Add an EVCNT_ATTACH_STATIC() macro which gathers static evcnts
into a link set, which are added to the list of event counters
at boot time.
2002-11-24 17:33:43 +00:00
manu
f528c56f39 Check for excessive recursive Mach-O loading 2002-11-21 22:30:32 +00:00
manu
af59b63bbd We now have the exact stack initial stack layout of Darwin:
macho_hdr, argc, *argv, NULL, *envp, NULL, progname, NULL,
*progname, **argv, **envp

Where progname is a pointer to the program name as given in the first
argument to execve(), and macho_hdr a pointer to the Mach-O header at
the beginning of the executable file.
2002-11-21 19:53:40 +00:00
christos
0b0eb68538 fix typos in cpu macros. 2002-11-19 19:54:36 +00:00
junyoung
f2edc229d3 - No need to include sys/param.h and sys/types.h here.
- KNF.
2002-11-19 09:53:16 +00:00
chs
ab17ec89d1 add support for __MACHINE_STACK_GROWS_UP platforms. from fredette@ 2002-11-17 22:53:46 +00:00
manu
dc4f3b6625 Introduction of IRIX sysctl broke binary compatibility because I changed the
offset of the Linux entry. Fix this.
2002-11-17 19:54:59 +00:00
uebayasi
c041971257 Fix compilation errors introduced by recent trace_enter()/ktrsyscall() changes.
Provided by FUKAUMI Naoki <naoki at fukaumi dot org> in kern/19070.
2002-11-16 07:40:38 +00:00
wrstuden
80e7381d17 Make O_NOCTTY have the same number of leading zeros as all the other
macros in this file. Makes figuring out what bits are in use easier.
2002-11-14 04:03:35 +00:00
kleink
60e088b1a4 Oops, ENOSR: resource -> resources here, too. 2002-11-12 13:52:28 +00:00
skrll
b207990164 Add the missing errno symbols that are defined in IEEE Std 1003.1-2001.
The language message files need updating.

Change reviewed and OK'd by Klaus Klein.
2002-11-12 08:20:02 +00:00
fvdl
d0e6437e6d Back out previous, it caused compile errors in kern_fork.c. ISSET
and friends should either be made first-class citizens and moved
to an include file (systm.h perhaps), or nuked completely, but
not be redefined in a lot of files.
2002-11-10 14:01:57 +00:00
jdolecek
0a0804119d move definitions of custom SET()/ISSET()/CLR() macros from
sys/systrace.h to kern/kern_systrace.c
2002-11-10 10:01:03 +00:00
thorpej
dccc71f1fe Fix signed/unsigned comparison warnings. 2002-11-10 03:28:59 +00:00
manu
99bc517790 Added sysctl to change all IRIX kernel values reported by uname and systeminfo:
OS name, hw name, kernel version, and so forth.
2002-11-09 09:03:56 +00:00
manu
9a4dfe85fa Added two sysctl-able flags: proc.curproc.stopfork and proc.curproc.stopexec
that can be used to block a process after fork(2) or exec(2) calls. The
new process is created in the SSTOP state and is never scheduled for running.

This feature is designed so that it is esay to attach the process using gdb
before it has done anything.

It works also with sproc, kthread_create, clone...
2002-11-07 00:22:28 +00:00
thorpej
80f8dbe30a Add a new VM map, lkm_map, which machine-dependent code can provide
in the event that it needs to use a special VM range (x86_64 falls
into this category).  We fall back onto kernel_map if machine-dependent
code doesn't create a special map.
2002-11-05 01:24:35 +00:00
perry
4f27ab21b8 /*CONTCOND*/ while (0)'ed macros 2002-11-02 07:30:55 +00:00
yamt
80fb7e0013 M_ZERO for inline'ed MALLOC. 2002-11-02 06:24:34 +00:00
thorpej
4b17905e0f Add support for "link sets", which are arrays of pointers to objects
gathered together in named sections by the linker.
2002-11-01 22:58:44 +00:00
mrg
514174fe75 disk_unbusy() change -> NetBSD 1.6K. 2002-11-01 12:49:47 +00:00
mrg
603098b9b5 implement separate read/write disk statistics:
- disk_unbusy() gets a new parameter to tell the IO direction.
	- struct disk_sysctl gets 4 new members for read/write bytes/transfers.
	when processing hw.diskstats, add the read&write bytes/transfers for
	the old combined stats to attempt to keep backwards compatibility.

unfortunately, due to multiple bugs, this will cause new kernels and old
vmstat/iostat/systat programs to fail.  however, the next time this is
change it will not fail again.

this is just the kernel portion.
2002-11-01 11:31:50 +00:00
manu
9b4f3b0464 Introduce an array of supported CPU types by a given arch for Mach-O 2002-10-29 22:22:30 +00:00
blymn
29b7b4241f Added support for fingerprinted executables aka verified exec 2002-10-29 12:31:20 +00:00
jdolecek
c82ab2eb79 now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
2002-10-26 13:50:17 +00:00
jdolecek
d17511b4ea bump version to 1.6J - kqueue branch merge 2002-10-23 09:22:35 +00:00
jdolecek
07c713d5c2 install kqueue sys/event.h 2002-10-23 09:21:24 +00:00
jdolecek
25f6d9c389 regen: kqueue branch merge, addition of kqueue(2), kevent(2) 2002-10-23 09:18:16 +00:00
jdolecek
25cfe9dabd regen: kqueue branch merge, addition of VOP_KQFILTER() 2002-10-23 09:16:46 +00:00
jdolecek
e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
gmcgarry
3dae1c4857 vclean() isn't part of the interface so make it local.
Sort prototypes by the interface they belong to.
2002-10-23 06:45:49 +00:00
christos
c0c3ab8507 s/{ }/{ 0 }/g 2002-10-23 01:06:54 +00:00
chs
f17273fd1e add another QUEUEDEBUG check: in TAILQ_REMOVE(), if the element we're
removing has no next element, verify that the queue head agrees that
the current element is the last one.  (this is how I found the recent
ppc pmap bugs).
2002-10-22 04:50:38 +00:00
isaki
49e7158ab9 x68k needs config_cfdriver_lookup() to initialize its console.
XXX ad-hoc way?
2002-10-20 02:26:59 +00:00
provos
5782765e61 When augmenting the nodes in RB_ROTATE_{RIGHT,LEFT} make sure that the
children nodes have reached their final state before augmenting the
parent.  This fixes an obscure inconsistency of the space in the
vm_map tree that gcc 3.2 triggers when compiling isp.o on alpha. (this
only led to some leaked space). from art@openbsd.org
2002-10-19 18:55:00 +00:00
gmcgarry
e109c04d2d vn_stat() can now take a struct vnode * for consistency. Hide away
the opaque file descriptor operations.
2002-10-14 04:18:56 +00:00
kent
1ced03ad42 Add AudioNvideo, AudioNcenter, AudioNdepth, and AudioNlfe
to sync with OpenBSD.
2002-10-12 07:39:00 +00:00
provos
61e8c76047 support for privilege elevation.
with privilege elevation no suid or sgid binaries are necessary any
longer.  Applications can be executed completely unprivileged. Systrace
raises the privileges for a single system call depending on the
configured policy.

Idea from discussions with Perry Metzger, Dug Song and Marcus Watts.
Approved by christos and thorpej.
2002-10-11 21:54:55 +00:00
thorpej
9ee29cd5eb Deal with the fact that __GNUC__ is not defined when preprocessing
assembler (Grr).
2002-10-10 17:02:23 +00:00
thorpej
e4c85a8424 Add __unused, __packed, __aligned(), and __section() macros. Inspired
by FreeBSD.
2002-10-10 01:41:59 +00:00
thorpej
bee5ae7f7d Garbage-collect the __DO_NOT_DO_WEAK__ stuff. 2002-10-10 00:52:47 +00:00
thorpej
194d7347bc Implement config_attach_pseudo(), which creates an instance of
a pseudo-device which behaves like a normal device in the device
tree, including the capability to have children.
2002-10-09 02:59:55 +00:00
provos
a8909a2b8b new message to track uid/gid changes 2002-10-08 14:46:24 +00:00
thorpej
9f704b38bd Move forward decls earlier in the file. Expose bufq_state for the
benefit of kmem grovelers.
2002-10-06 17:05:56 +00:00
chs
993948e989 count executable image pages as executable for vm-usage purposes.
also, always do the VTEXT vs. v_writecount mutual exclusion
(which we previously skipped if the text or data segment was empty).
2002-10-05 22:34:02 +00:00
bjh21
7fc0ee4e27 Update URLs again (serves me right for committing an old change
without checking it).  Back to sco.com, but with a different path.
2002-10-05 14:09:15 +00:00
bjh21
2ece90236c Update URLs for ELF spec (sco.com -> caldera.com). 2002-10-05 13:29:29 +00:00
tsutsui
05aa22b988 Include <sys/lock.h> for struct lock. 2002-10-05 08:00:52 +00:00
elric
bc5dda7779 Add a type for CGD. 2002-10-04 18:26:31 +00:00
thorpej
d90d300b7b Overhaul the way cfattach structures are looked up. The cfdata entry
now carries the name of the attachment (e.g. "tlp_pci" or "audio"),
and cfattach structures are registered at boot time on a per-driver
basis.  The cfdriver and cfattach pointers are cached in the device
structure when attached.
2002-10-04 01:50:53 +00:00
thorpej
2792eea11f Assume caller will add trailing ; to CFDRIVER_DECL and CFATTACH_DECL. 2002-10-02 16:49:31 +00:00
thorpej
2b99f7cc34 Add a generic config finalization hook, to be called once all real
devices have been discovered.  All finalizer routines are iteratively
invoked until all of them report that they have done no work.

Use this hook to fix a latent bug in RAIDframe autoconfiguration of
RAID sets exposed by the rework of SCSI device discovery.
2002-10-01 18:11:57 +00:00
thorpej
b987253ef1 Fix thinko in CFATTACH_DECL(). 2002-09-30 20:42:29 +00:00
thorpej
8c44b67b6c Add macros to declare cfdriver and cfattach structures. This will allow
us to shield things that declare these structures from changes to the
structure (to a certain extent, anyway).
2002-09-30 18:46:44 +00:00
thorpej
1a6b241b1d Add a config_init() function to initialize the config data structures.
Normally this is called by configure(), but some ports (amiga, atari,
x68k) need to do this early because of how they find the console.
2002-09-30 17:36:31 +00:00
wiz
b1c7ac0e6d "definitions" has lots of 'i's, but that's not reason to leave one out. 2002-09-29 23:23:56 +00:00
dbj
43395bd5a8 Add support for the Apple UFS variation on ffs
This is the bulk of PR #17345

The general approach is to use a run time deteriminable value
for DIRBLKSIZ.  Additional allowances are included for using
MAXSYMLINKLEN with FS_42INODEFMT and a shift in the cylinder group
cluster summary count array.  Support is added for managing
the Apple UFS volume label.
2002-09-28 20:11:05 +00:00
dbj
8ccb247d47 add MBR_PTYPE_APPLEUFS of 0xa8
part of PR #17345
2002-09-28 00:56:25 +00:00
dbj
a323eac318 add FS_APPLEUFS
part of PR #17345
2002-09-28 00:47:24 +00:00
dbj
7d4caebaf6 add DTYPE_JFS2 and FS_JFS2 for IBM Journaled File System
this is to match FreeBSD's disklabel.h revision 1.73
FreeBSD change was requested by Hiten Pandya <hiten@uk.FreeBSD.org>
2002-09-28 00:30:24 +00:00
thorpej
bf97c13c6c Declare all cfattach structures const. 2002-09-27 20:41:46 +00:00
thorpej
6c88de3b53 Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.
2002-09-27 03:17:40 +00:00
thorpej
d1ad2ac4f2 Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver.  The cfdriver is then looked
up in a list which is built at run-time.
2002-09-27 02:24:06 +00:00
thorpej
19eeb8d563 Bump version to 1.6I -- device parent spec change. 2002-09-26 04:12:27 +00:00
thorpej
fc0fe0347d Overhaul the way parent attachments are specified; instead of using
a vector of indices into the cfdata table to specify potential parents,
record the interface attributes that devices have and add a new "parent
spec" structure which lists the iattr, as well as optionally listing
specific parent device instances.

See:

    http://mail-index.netbsd.org/tech-kern/2002/09/25/0014.html

...for a detailed description.

While here, const poison some things, as suggested by Matt Thomas.
2002-09-26 04:07:35 +00:00
augustss
0c65ba2386 Don't install map.h now that it's gone. 2002-09-25 22:47:34 +00:00
thorpej
ca5fd3bd46 Garbage-collect the old rmap code. 2002-09-25 22:27:38 +00:00
thorpej
ac1b37ae05 Add support for multiple cfdata tables to the internals of the
autoconfiguration machinery, derived from PR #2112.

More work is left to do, including revamping how matches against
a candidate parent are done.
2002-09-23 23:16:06 +00:00
gmcgarry
6a6ea308fd Separate the scheduler from the context switching code.
This is done by adding an extra argument to mi_switch() and
cpu_switch() which specifies the new process.  If NULL is passed,
then the new function chooseproc() is invoked to wait for a new
process to appear on the run queue.

Also provides an opportunity for optimisations if "switching to self".

Also added are C versions of the setrunqueue() and remrunqueue()
low-level primitives if __HAVE_MD_RUNQUEUE is not defined by MD code.

All these changes are contingent upon the __HAVE_CHOOSEPROC flag being
defined by MD code to indicate that cpu_switch() supports the changes.
2002-09-22 05:36:48 +00:00
manu
80ee637534 - Introduce a e_fault field in struct proc to provide emulation specific
memory fault handler. IRIX uses irix_vm_fault, and all other emulation
use NULL, which means to use uvm_fault.

- While we are there, explicitely set to NULL the uninitialized fields in
struct emul: e_fault and e_sysctl on most ports

- e_fault is used by the trap handler, for now only on mips. In order to avoid
intrusive modifications in UVM, the function pointed by e_fault does not
has exactly the same protoype as uvm_fault:
int uvm_fault __P((struct vm_map *, vaddr_t, vm_fault_t, vm_prot_t));
int e_fault __P((struct proc *, vaddr_t, vm_fault_t, vm_prot_t));

- In IRIX share groups, all the VM space is shared, except one page.
This bounds us to have different VM spaces and synchronize modifications
to the VM space accross share group members. We need an IRIX specific hook
to the page fault handler in order to propagate VM space modifications
caused by page faults.
2002-09-21 21:14:54 +00:00
christos
39f324a802 Add MNT_GETARGS that retrieves fs specific arguments. Also add an empty
#define for vsf_showexport()
2002-09-21 18:06:08 +00:00
ragge
05cab9534e Remove clist.h. Clist blocks has never existed in NetBSD. 2002-09-19 10:49:43 +00:00
lha
4fa2032edc uppercase the lkm kernel-userspace dev macros and prefix them with LKM_
make modload print the bdev and cdev major when its a dev lkm
2002-09-18 22:59:36 +00:00
chs
128b037bfc remove all vesitages of dk_establish(). 2002-09-18 01:46:23 +00:00
gehenna
ddd7a9f3e6 fix pasto. 2002-09-13 14:51:25 +00:00
christos
9c59710333 Move humanize_number(9) to the ifdef _KERNEL section, because it conflicts
with humanize_number(3). In reality, the kernel version should be changed
to more closely match the userland version so that there are no prototype
conflicts.
2002-09-13 14:16:48 +00:00
gehenna
a1d78935eb overload block/character into u_long field.
kern/18234: slightly modified
2002-09-13 13:08:53 +00:00
gehenna
eb1cdba2fd Bump version for the merge of gehenna-devsw. 2002-09-06 13:58:36 +00:00
gehenna
77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
jdolecek
32fad21d27 regen: claim syscall slots for kqueue(2) and kevent(2) 2002-09-04 07:46:25 +00:00
gehenna
848d04ae8d G. not F. 2002-08-31 17:08:49 +00:00
hannken
d6d89cb6c6 Protect struct bufq_state from userland. 2002-08-30 19:21:14 +00:00
hannken
815491c0b3 Remove the old device buffer queue interface.
Approved by: Jason R. Thorpe <thorpej@wasabisystems.com>
2002-08-30 15:43:36 +00:00
gmcgarry
a5c84b7617 Bump version for rasctl syscall. 2002-08-28 07:28:53 +00:00
gmcgarry
14e30716d8 Regenerate: rasctl 2002-08-28 07:18:50 +00:00
gmcgarry
5bcbbd40bf MI kernel support for user-level Restartable Atomic Sequences (RAS). 2002-08-28 07:16:33 +00:00
christos
9f2867a05c - pass struct proc to copyargs
- rename aux vector entries AT_{R,E}{U,G}ID from AT_SYUN_{R,}P{U,G}ID
- update new aux vector size.
2002-08-26 21:09:02 +00:00
augustss
731d1eccf2 Get rid of sysctl for setting BCM2033 firmware path. It doesn't work
for ports that don't include files.usb, and it's also not done quite
the way it should.
2002-08-26 13:09:39 +00:00
thorpej
c92f7f0abb Force CBSIZE to act like an "int" by casting the sizeof() used
within the expression.
2002-08-26 01:16:43 +00:00
thorpej
4bec56201d Fix signed/unsigned comparison warnings from GCC 3.3. 2002-08-25 22:51:05 +00:00
thorpej
c57c6b52cb Make uiomove()'s count argument a size_t rather than an int. 2002-08-25 22:28:40 +00:00
thorpej
139cdc3125 Make nbuf, nswbuf, and bufpages unsigned. Make all operations on these
variables unsigned, and update places where their values are printed.
2002-08-25 20:21:33 +00:00
thorpej
f02cb5ee27 Make hashinit() use unsigned quantities throughout. 2002-08-25 20:01:12 +00:00
augustss
cdbff56c90 Add sysctl support for hw.dev.ubtbcmfw (so I can set the firmware
path for my BCM2033).
2002-08-24 17:27:01 +00:00
itojun
1f508ca545 expose a way to see if random number source is enabled, some wants it
for avoiding extra function call for rnd_add_uint32 and such.
2002-08-20 22:30:53 +00:00
jdolecek
d23ad48af9 use 'pid_t' for pipe_pgid, rather that 'gid_t'
this fixes the code in pipeselwakeup() to properly send signal to process group

Problem found by Anders Magnusson, using gcc 3.2 with pdp-10 target.
2002-08-16 10:32:12 +00:00
soren
18d976ffcd Remove bogus comment. 2002-08-14 18:31:36 +00:00
thorpej
aa74d42772 Expose <machine/pmc.h> to userland. 2002-08-08 16:23:19 +00:00
soren
dbfd055e10 Expose the IPC_[RWM] symbols to userspace.
Fixes PR misc/14515 by Hendrik Scholz.
2002-08-07 23:39:24 +00:00
briggs
e046e751c9 Bump to 1.6F for PMCs (thanks for the reminder, Jason) 2002-08-07 15:29:57 +00:00
briggs
0b956d0b8b Implement pmc(9) -- An interface to hardware performance monitoring
counters.  These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface.  Initially, the Intel XScale
counters are the only ones supported.
2002-08-07 05:14:47 +00:00
briggs
5b1917a886 Regen for pmc_get_info, pmc_control. 2002-08-07 04:54:29 +00:00
pooka
2bc5807797 Add FORK_CLEANFILES flag to fork1(), which makes the new process start out
with a clean descriptor set (ie. not copied or shared from parent).

for rfork()
2002-08-06 13:58:08 +00:00
itojun
4f0c9c76b6 sync up with latest openbsd systrace.
- avoid race conditions by having seqno in ioctl
- better uid/gid tracking
- "replace" policy to replace args
- less diffs, as many of local changes were fed back to openbsd already

due to the 1st item, it was impossible for us to provide backward-compatibility
(new kernel + old bin/systrace won't work).  upgrade both.
2002-07-30 16:29:28 +00:00
soren
178d83d503 Die, qaddr_t, die! - mnt_data in struct mount is already effectively
a void *, so stop pretending otherwise.
2002-07-30 07:40:07 +00:00
soren
099793e880 Updates from OpenBSD:
date: 2002/06/11 18:59:22;  author: provos;  state: Exp;  lines: +48 -42
SPLAY_{INSERT,REMOVE} have return values now that can be used for error
checking
date: 2002/06/11 22:09:52;  author: provos;  state: Exp;  lines: +6 -5
have rb_remove return the right value, too.
2002-07-30 06:12:13 +00:00
manu
08a69f7d15 Make killproc really public, and while we are there, constify. 2002-07-28 22:18:51 +00:00
jdolecek
f340b79eaf bump to 1.6E - struct proc size change on LP64 platforms 2002-07-25 21:13:40 +00:00
jdolecek
02eb342b57 Make sure that the pointer to old parent process for ptraced children
gets reset properly when the old parent exits before the child. A flag
is set in old parent process when the child is reparented in ptrace(2).
If it's set when process is exiting, all running processes have their
'old parent process' pointer checked and reset if appropriate. Also
change to use 'struct proc *' pointer directly, rather than pid_t.
This fixes security/14444 by David Sainty.

Reviewed by Christos Zoulas.
2002-07-25 20:04:02 +00:00
hannken
7de36862a8 Rename bufq_init() to bufq_alloc().
Add bufq_free() to remove a buffer queue.
Avoid MALLOC while holding a spinlock.

From Chuck Silvers.
2002-07-21 15:32:17 +00:00
thorpej
67b2a0cf06 * Add copyin_proc() and copyout_proc(), which are like copyin() and
copyout(), except they can operate on any process, not just curproc.
* Use this in uiomove() to allow UIO_USERSPACE to non-curproc.
2002-07-20 03:58:24 +00:00
thorpej
3912e469dd Rename cdev_systrace_init() to cdev_clonemisc_init(), so it can
be properly used by any misc. cloning device.  While here, correct
a comment to indicate that "open" is the only entry point and that
everything else is handled with fileops.
2002-07-19 16:38:14 +00:00
hannken
10ff5e6607 Implement a new device buffer queue interface.
One basic struct, a function to setup a queue with a specific strategy and
three macros to put buf's into the queue, get and remove the next buf or
get the next buf without removal.

The BUFQ_XXX interface will be removed in the future.
The B_ORDERED flag is not longer supported.

Approved by: Jason R. Thorpe <thorpej@wasabisystems.com>
2002-07-16 18:03:17 +00:00
thorpej
64a96a4664 Rename DTYPE_SYSTRACE to DTYPE_MISC. DTYPE_MISC can now be used by
any misc. pseudo-device which requires cloning semantics.
2002-07-16 16:40:55 +00:00
scw
185627f408 Add MIDs for SH5. 2002-07-11 13:10:16 +00:00
pooka
15d9246bb2 Add FORK_NOWAIT flag, which sets init as the parent of the forked
process. Useful for FreeBSD rfork() emulation.

ok'd by Christos
2002-07-11 10:37:26 +00:00
wiz
654db6f5fc Fix two typos in comments. From OpenBSD. 2002-07-10 21:56:42 +00:00
perseant
eaa565b571 Changed size of struct inode; bump version to 1.6D. 2002-07-06 01:31:32 +00:00
abs
f20c5099f6 Introduce MALLOC_NOINLINE, which mirrors the effect of DIAGNOSTIC
and similar in making MALLOC/FREE not inline. Saves 11k on acorn26
FOURMEG config.
2002-07-05 13:05:14 +00:00
gmcgarry
88d8a7dd2f Protect local variables in MALLOC/FREE to avoid shadowing
arguments.  Problem reported by David Laight: david@l8s.co.uk.
2002-07-05 06:54:45 +00:00
thorpej
a08a4aecac Regenerate: Added __sigaction_sigtramp at #340. 2002-07-04 23:34:28 +00:00
thorpej
011d4d5f44 Add kernel support for having userland provide the signal trampoline:
* struct sigacts gets a new sigact_sigdesc structure, which has the
  sigaction and the trampoline/version.  Version 0 means "legacy kernel
  provided trampoline".  Other versions are coordinated with machine-
  dependent code in libc.
* sigaction1() grows two more arguments -- the trampoline pointer and
  the trampoline version.
* A new __sigaction_sigtramp() system call is provided to register a
  trampoline along with a signal handler.
* The handler is no longer passed to sensig() functions.  Instead,
  sendsig() looks up the handler by peeking in the sigacts for the
  process getting the signal (since it has to look in there for the
  trampoline anyway).
* Native sendsig() functions now select the appropriate trampoline and
  its arguments based on the trampoline version in the sigacts.

Changes to libc to use the new facility will be checked in later.  Kernel
version not bumped; we will ride the 1.6C bump made recently.
2002-07-04 23:32:02 +00:00
thorpej
2807c6789c Rename SB_UPDATE_TAIL() to SB_EMPTY_FIXUP(), per suggestion from
Jonathan Stone.
2002-07-03 21:39:40 +00:00
thorpej
668640a43d Rename sbappend_stream() to sbappendstream(), per suggestion from
Jonathan Stone.
2002-07-03 21:36:57 +00:00
thorpej
6b3c143231 Bump the OS version to 1.6C: socket buffer structure changed. 2002-07-03 19:11:41 +00:00
thorpej
0585ce1489 Make insertion of data into socket buffers O(C):
* Keep pointers to the first and last mbufs of the last record in the
  socket buffer.
* Use the sb_lastrecord pointer in the sbappend*() family of functions
  to avoid traversing the packet chain to find the last record.
* Add a new sbappend_stream() function for stream protocols which
  guarantee that there will never be more than one record in the
  socket buffer.  This function uses the sb_mbtail pointer to perform
  the data insertion.  Make TCP use sbappend_stream().

On a profiling run, this makes sbappend of a TCP transmission using
a 1M socket buffer go from 50% of the time to .02% of the time.

Thanks to Bill Sommerfeld and YAMAMOTO Takashi for their debugging
assistance!
2002-07-03 19:06:47 +00:00
yamt
d96bff0e27 add KSTACK_CHECK_MAGIC. discussed on tech-kern. 2002-07-02 20:27:44 +00:00
itojun
0a9d2ad2d7 provide KERN_URND, which extracts sizeof(int) random number from the kernel
(similar to /dev/urandom, for use within chroot jail).
2002-07-02 17:06:17 +00:00
thorpej
10c252ba47 Changes to allow the IPv4 and IPv6 layers to align headers themseves,
as necessary:
* Implement a new mbuf utility routine, m_copyup(), is is like
  m_pullup(), except that it always prepends and copies, rather
  than only doing so if the desired length is larger than m->m_len.
  m_copyup() also allows an offset into the destination mbuf, which
  allows space for packet headers, in the forwarding case.
* Add *_HDR_ALIGNED_P() macros for IP, IPv6, ICMP, and IGMP.  These
  macros expand to 1 if __NO_STRICT_ALIGNMENT is defined, so that
  architectures which do not have strict alignment constraints don't
  pay for the test or visit the new align-if-needed path.
* Use the new macros to check if a header needs to be aligned, or to
  assert that it already is, as appropriate.

Note: This code is still somewhat experimental.  However, the new
code path won't be visited if individual device drivers continue
to guarantee that packets are delivered to layer 3 already properly
aligned (which are rules that are already in use).
2002-06-30 22:40:32 +00:00
bjh21
c1ba727b47 Version times() so that programs compiled before the recent change to make
sysconf(_SC_CLK_TCK) return hz will work.

In detail:
__times13() returns values scaled by hz.
times() returns values scaled by 100.
<sys/times.h> renames times() to __times13().

_SC_CLK_TCK has changed from 3 to 39.
sysconf(3) returns 100.
sysconf(39) returns hz.
CLK_TCK is defined as sysconf(39).
2002-06-30 09:45:39 +00:00
yamt
5154ea5e5b constify diskerr(). 2002-06-28 16:37:20 +00:00
itojun
de84d710a4 minor KNF 2002-06-22 05:37:01 +00:00
thorpej
eafe65f83a No need to have two complete copies of the header in the same file. 2002-06-18 16:53:49 +00:00
thorpej
02ce7a5707 cdev_systrace_init() only gets an "open" entry point. 2002-06-18 05:30:40 +00:00
thorpej
2d892281ef Need DTYPE_SYSTRACE (XXX for now, until we get real cloning devices). 2002-06-18 01:54:05 +00:00
thorpej
5cbb1e82f1 * Don't bother protecting the body of the source file with #ifdef SYSTRACE.
It's not even built if the option isn't present.
* Use cdev_decl() to generate prototypes for the devsw functions.
* Minor whitespace cleanup.
* Nuke the SYSTR_CLONE ioctl from orbit; instead, just clone it in
  systraceopen(), like we do with svr4_net.
2002-06-18 01:24:15 +00:00
christos
b86e6ac858 Systrace support. 2002-06-17 16:23:58 +00:00
itojun
9e1c373ba9 make it possible to handle/mount FDISK-partitioned disk.
extended FDISK partitions are not supported yet.
openbsd code was used as reference.
2002-06-17 15:07:06 +00:00
perseant
983455d349 Bump version to 1.6B: changed ITIMES. 2002-06-16 00:14:13 +00:00
ragge
631436bfb0 Add official machine numbers for PDP10 and PDP11. 2002-06-14 09:05:21 +00:00
tron
4f9ae48b8f Include "sys/types.h" here to fix compilation problems in 3rd party
applications.
2002-06-10 10:31:48 +00:00
isaki
53175db820 Add x68k stuff. 2002-06-02 10:44:30 +00:00
lukem
06de426449 SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field).  whilst it's O(n),
  this mirrors the functionality of SLIST_REMOVE() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
  this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups
2002-06-01 23:50:52 +00:00
wiz
96e3e9d9ab Minimize uses of quad_t. Also, use C99 types more thoroughly.
Approved by kleink.
2002-05-28 23:36:30 +00:00
drochner
3963e95b9b turn p_fsize into a union { p_fsize, p_cdsession }; the latter member
is used to store the session offset on multi-session CDs
2002-05-27 16:36:37 +00:00
itojun
e5aa199677 framework to add af-dependent data structure to struct ifnet.
as discussed at bsd-api-discuss.  sync w/kame
2002-05-27 02:53:49 +00:00
matt
486c7ce727 Add SIOCGIFDATA and SIOCZIFDATA ioctl's to get interface data. (the Z
variant also zeroes the counters after copying them).  In ifunit, add
support for dealing all numeric ifname by treating them as an ifindex
which is used to look up the interface.
2002-05-23 21:34:39 +00:00
tv
d2f1bd9cd1 Wouldn't it be nice if there were only one thing that needed changing on a
full version bump?  (Fix comment after __NetBSD_Version__.)
2002-05-22 03:29:09 +00:00
tv
9f4e74bc62 1.6 has branched. Welcome to "NetBSD 1.6A". 2002-05-22 03:18:19 +00:00
thorpej
e839580821 Move kernel_lock manipulation info functions so that they will
show up in a profile.
2002-05-21 01:38:26 +00:00
lukem
f6995335d6 Change NEWS_BOOT_BLOCK_OFFSET from 512 to 0, since parts of bootxx do
get loaded to sector 0 (even though we have to copy the disklabel back in)
2002-05-21 00:19:17 +00:00
lukem
e9a2250850 - add news{68k,mips} definitions, from Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
- be consistent about #define<TAB>
2002-05-20 13:41:42 +00:00
lukem
b3facf5a7d reduce MACPPC_BOOT_BLOCK_MAX_SIZE from 6K to 2K, to fit what bootxx is
limited to (and a CDROM limitation as well?)
2002-05-17 18:53:34 +00:00
lukem
30c58c94be - add Apple driver map and partition map structs, obtained from
sys/arch/macppc/include/disklabel.h (with elements renamed as appropriate)
- consistenly use "uint*_t" instead of "u_int*_t"
2002-05-15 13:32:10 +00:00
lukem
966b42a3e6 bootblock.h:
- unify sparc_bbinfo (1064 bytes, with 256 block entries)
  and sun68k_bbinfo (296 byte, with 64 block entries)
  into shared_bbinfo (512 bytes, with 118 block entries),
  which will be also shared by future bbinfo-using platforms
  (including macppc)
- add datestamp to *_BBINFO_MAGIC strings, to prevent installboot vs
  bootxx version skew.
- add macppc support

*/bootxx.c:
- migrate to new shared_bbinfo structure

installboot:
- add macppc support (still needs applepartmap support and testing)
- improve and add some more warnings & errors to installboot
- implement shared_bbinfo_clearboot() and shared_bbinfo_setboot(), which
  perform the majority of the work for bbinfo-using back-ends
  (rather than replicating that across multiple back-ends).
2002-05-15 09:44:54 +00:00
lukem
4369818766 Migrate alpha/pmax/vax bootblock stuff from <dev/dec/dec_boot.h> to
<sys/bootblock.h>  (leaving ultrix compat goo in the former)
2002-05-14 06:34:20 +00:00
lukem
86af66583e correct a couple of comments 2002-05-14 02:41:34 +00:00
lukem
6c34850421 add sparc64 stuff 2002-05-14 01:18:50 +00:00
matt
6e15a048de Remove declaration of total. nothing uses it. 2002-05-12 23:15:42 +00:00
matt
0cb85bc7b9 Eliminate commons. 2002-05-12 23:06:27 +00:00
kleink
cc7147e7f6 Use <sys/ansi.h> definitions for in_{addr,port}_t. 2002-05-12 22:59:50 +00:00
kleink
d05cce938c Provide private definitions for in_{addr,port}_t. 2002-05-12 22:58:48 +00:00
matt
e89ff519c5 Make domains extern. 2002-05-12 20:36:58 +00:00
matt
380e257dac acctp is not used anywhere so delete it. 2002-05-12 20:35:15 +00:00
itohy
c81ad2b05d Userland __COPYRIGHTs have \ns in them, and do not use asm(). 2002-05-11 11:57:14 +00:00
thorpej
f1f51aa2b8 Move code shared by procfs and the kernel proper out of procfs and
into the kernel proper (renaming functions from procfs_* to process_*).
2002-05-09 15:44:44 +00:00
lukem
3777b83a3f <sys/bootblock.h> is a better name than <sys/bootinfo.h> 2002-05-06 13:32:19 +00:00
lukem
e8bbb685d9 Replace <dev/sun/sun_boot.h> with <sys/bootinfo.h>, which is intended
to be more generic than ``bbinfo definitions for Sun-based systems''.
Other platforms can store bbinfo-style information here, and possibly
other platform-specific boot information that needs to be accessible
by foriegn platforms in tools such as /usr/sbin/installboot.
2002-05-06 05:27:53 +00:00
eeh
b6537138f9 Use _LP64 insteadl of __alpha__ to determine if we're generating 64-bit
binaries.
2002-05-03 00:27:45 +00:00
eeh
89e107d917 Regen. 2002-05-03 00:22:16 +00:00
thorpej
7a49fee765 Add some experimental page-loaning for writes on sockets. It is disabled
by default, and can be enabled by adding the SOSEND_LOAN option to your
kernel config.  The SOSEND_COUNTERS option can be used to provide some
instrumentation.

Use of this option, combined with an application that does large enough
writes, gets us zero-copy on the TCP and UDP transmit path.
2002-05-02 17:55:48 +00:00
thorpej
b094ff415f Change the semantics of mbuf external storage "ext_free" routines
so that they're more useful for arbitrary types of external storage:

* Add an "mbuf *" argument to (*ext_free)().  If non-NULL, (*ext_free)()
  is expected to free the mbuf itself.  This allows (*ext_free)() to use
  the mbuf for bookkeeping (e.g. deferring the work to a helper thread).
  If the "mbuf *" argument is NULL, we are assumed to be in a context
  which is safe for performing the destructor operation *now*.
* Adjust MEXTREMOVE() and MFREE() routines for above change.
* Update "ade" and "ti" drivers for new semantics.
2002-05-02 16:22:43 +00:00
christos
1261c89715 From OpenBSD, via FreeBSD: If a set{u,g}id binary is invoked with fd < 3
closed, open those fds to /dev/null.

XXX: This needs to be fixed in a better way. The kernel should not need to
know about /dev/null or special case 0, 1, 2.
2002-04-23 15:11:25 +00:00
manu
c7dcec33a1 Added IRIX /dev/usema and dev/usemaclone (void driver for now, will be
filled later)
2002-04-23 06:48:46 +00:00
ragge
bc27ff6af0 Keep the isbad() prototype here where it belongs, instead of random places. 2002-04-21 20:55:48 +00:00
manu
78583a4567 Always define SA_SIGINFO, and keep track of it in SVR4 emulation. This is
needed for IRIX signal delivery.
Approved by Christos.
2002-04-12 17:37:30 +00:00
simonb
5954457a89 Use "#define<tab>" consistantly. 2002-04-08 12:09:09 +00:00
bouyer
e5727031fb Implement mstohz() as discussed on tech-kern, and use it in SCSI drivers
to convert xs->timeout to callout() parameter.
2002-04-05 18:27:45 +00:00
fvdl
9edfbd43ca Add prototype for shmat1() 2002-04-03 11:50:51 +00:00
jdolecek
ebd670f0bc move emulation-specific sysctl hook from struct execsw to struct emul,
where it belongs
2002-04-02 20:19:59 +00:00
jdolecek
2e327b16be expose emul_search() 2002-04-02 20:18:06 +00:00
tron
5054a7de6d Back out revision 1.22:
- "ktrace/kdump/ktruss" need "enum uio_rw".
- "vmstat" needs "enum uio_seg".
- "ipf" needs "struct uio".
So there is nothing left which can be hidden.
2002-03-31 14:21:56 +00:00
bjh21
66392bd7be split /usr/include/sys/sha1.h and /usr/include/sha1.h completely.
future direction: nuke /usr/include/sys/sha1.h, it shouldn't be there as
we don't provide libkern to userland.

This mirrors the same change for md5.h made by itojun on 2000/12/11.
2002-03-31 14:12:37 +00:00
erh
994e50fc4c Move the _KERNEL down a couple lines sine ktrace/kdump/ktruss need
the enum uio_rw.
2002-03-31 07:11:35 +00:00
erh
48a7940151 Hide struct uio inside of a _KERNEL ifdef. 2002-03-30 20:28:13 +00:00
wrstuden
c1f0a33961 Make a definition of FSMAXTYPES always available, as discussed on
tech-kern. Helps validate partition types w/o needing the whole
list of partition type names.
2002-03-27 19:07:32 +00:00
fredette
749a99134b When DDB is not defined but Debugger() is anyways, define
console_debugger() to be Debugger().  This is relevant on
the sun2 and sun3, where a monitor is always available.
2002-03-26 23:17:09 +00:00
christos
36244cee28 kill PS_STRINGS, STACKGAPBASE_UNALIGNED, STACKGAPBASE 2002-03-20 18:00:07 +00:00
christos
748ed9bd8f put back NSIG=64 for userland. It is not nice to have programs report
unknown signal %u or coredump when they try to report a signal out of
range.
2002-03-20 14:30:11 +00:00
tron
a15356aae8 Don't expose the increased number of signals to the userland because the
required userland support e.g. in "libc" is not in place yet. This fixes
crashes in "ksh" but any other program which uses "sys_siglist".
2002-03-20 14:10:20 +00:00
christos
2aae331e69 add es_sysctl for emulation specific sysctls. 2002-03-20 00:26:33 +00:00
christos
c5f93c4fac new emulation specific sysctls. 2002-03-20 00:23:46 +00:00
christos
225441db6e - Define SIGRTMIN and SIGRTMAX iff _KERNEL.
- Bump the number of signals to 64, and define the default action for
  signals >= SIGRTMIN to be kill.
2002-03-19 20:50:41 +00:00
christos
22839acdb9 use the exithook mechanism to clean up semaphores. 2002-03-17 22:21:58 +00:00
christos
f7d98e2451 - merge all the hook insertion and deletion code so that we don't create
a fourth copy.
- add exithook to be executed when a process exits.
2002-03-17 22:19:20 +00:00
atatat
26500cdfcd Bump kernel version -- ERESTART has been moved and EPASSTHROUGH has
been introduced.
2002-03-17 19:43:07 +00:00
atatat
31144d9976 Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command".  ERESTART is -1, which can lead to
confusion.  ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4.  No ioctl code should now return -1 anywhere.  The
ioctl() system call is now properly restartable.
2002-03-17 19:40:26 +00:00
thorpej
53df727d27 Add a new ptrace request, PT_IO, as proposed by Artur Grabowski
on the <bsd-api-discuss@wasabisystems.com> mailing list.  PT_IO
is a more general inferior I/D space I/O mechanism.  FreeBSD and
OpenBSD have also added PT_IO.

From lha@stacken.kth.se, kern/15945.
2002-03-17 17:02:45 +00:00
simonb
72b108a114 Don't 'extern' function prototypes.
ANSIfy kernel-only prototypes.
2002-03-17 11:14:04 +00:00
martin
94881fb123 Rename ISDN devices, per discussion on tech-kern. The network devices
become ippp (ISDN ppp) and irip (ISDN raw IP). The character device now
are called: /dev/isdn (isdnd <-> kernel communication), /dev/isdnctl (dialing
and other control), /dev/isdntrc* (tracing), /dev/isdnbchan* (raw B channel
access, i.e. for user land PPP) and /dev/isdntel* (telephone devices, i.e.
for answering machines).
2002-03-16 16:55:51 +00:00
manu
da6cdf1446 Added IRIX /dev/kmem emulation pseudodevice and SVR4 net pseudodevice 2002-03-15 17:29:06 +00:00
jdolecek
368878d433 add NetBSD RCS tag 2002-03-13 20:51:37 +00:00
jdolecek
19ac0b19d7 Merge in FreeBSD rev. 1.18 - MP changes + rename of PIPE_LOCK to PIPE_LOCKFL
XXXSMP the MP hooks are unused on NetBSD for now

put NetBSD kernel-only parts into #ifdef _KERNEL
2002-03-13 20:50:00 +00:00
simonb
f81b8604f8 Move 'struct pool_cache_group' definition into <sys/pool.h> 2002-03-13 10:57:18 +00:00
enami
89433f5abd Fix indentation. 2002-03-11 01:19:17 +00:00
enami
c26a42313c Fix function decl. of _pool_reclaim() so that subr_pool.c compiles again
even if POOL_DIAGNOSTIC is defined.
2002-03-11 01:16:43 +00:00
chs
240c70fa15 add a note to discourage the use of {u_,}longlong_t in non-XDR contexts,
as discussed on tech-kern.
2002-03-09 23:57:25 +00:00
thorpej
d100f2ae43 Put back pool_prime(); the i386 mp pmap uses it. 2002-03-09 18:06:54 +00:00
thorpej
c4a2ca6a3e Remove pool_prime(). Nothing uses it, and how it should be used it not
really well-defined in the absense of PR_STATIC.
2002-03-09 01:56:27 +00:00
thorpej
e21319b482 Make mbpool and mclpool use the new drain hook facaility. Adjust
m_reclaim() to match the drain hook signature.  This allows us to
delete m_retry() and m_retryhdr(), as the pool allocator will now
perform the reclaimation step for us.

From art@openbsd.org.
2002-03-09 01:46:32 +00:00
thorpej
24cd6c510c Bump version to 1.5ZB -- The pool(9) API/ABI changed. 2002-03-09 01:42:13 +00:00
thorpej
d54150e78a Remove PR_MALLOCOK and PR_STATIC. The former wasn't actually used,
and the latter, while there was some code tested the bit, was woefully
incomplete and also unused by anything.  Besides, PR_STATIC functionality
could be better handled by backend allocators anyhow.

From art@openbsd.org
2002-03-09 01:33:33 +00:00
thorpej
8cdc6121b7 Add an optional "drain" client callback, which can be set by the new
pool_set_drain_hook().  This hook is called in three cases:
* When a pool has hit the hard limit, just before either erroring
  out or sleeping.
* When a backend allocator fails to allocate memory.
* Just before trying to reclaim pages in pool_reclaim().

This hook requests the client to try and free some items back to
the pool.

From art@openbsd.org.
2002-03-08 21:41:59 +00:00
thorpej
7c94c68f10 Remove PR_FREEHEADER; nothing uses it anymore.
From art@openbsd.org.
2002-03-08 20:51:25 +00:00
thorpej
a180cee23b Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.
2002-03-08 20:48:27 +00:00
simonb
60b62880cc Add a extern declaration for the mountroot variable. 2002-03-04 02:24:37 +00:00
matt
6327f7590a Move MBR_PTYPE_PREP from arch/prep/stand/mkbootimage to here.
Add a MBR_FLAGS_ACTIVE too.
2002-03-02 07:04:31 +00:00
christos
a5890d9fa8 - add constants for DEV_{MEM,KMEM,NULL,ZERO} only arm is the oddball one using
3 for DEV_ZERO and should be fixed.
- cdev_decl(mm) since all the ports do the same.
- change _mm_ initialization to include ioctl entry point.
2002-02-27 01:17:58 +00:00
simonb
14ac06f0bd Add a "show event" ddb command to show the event counters. 2002-02-15 11:18:26 +00:00
christos
582f45a690 Add __MNT_CONTROL_FLAGS to __MNT_FLAGS for the sake of completeness.. 2002-02-05 21:25:48 +00:00
chuck
df904ed198 after discussion with christos, use string "hidden" rather than "ignored" 2002-02-05 19:35:03 +00:00
kleink
935d56d508 Add {POSIX_MONOTONIC_CLOCK} variables. 2002-01-31 00:32:47 +00:00
simonb
346fc0519d Implement the CLOCK_MONOTONIC clock for the posix/opengroup realtime
clock_() functions.  This simply returns the kernel mono_time variable.
As discussed on tech-kern.
2002-01-31 00:13:07 +00:00
christos
0a2c1af131 Define the strings for the flags used by mount(8) next to the flags, so
that they don't get out of sync again.
2002-01-30 21:39:51 +00:00
thorpej
07d023a3aa Define ELF32_EHDR_FLAGS_OK()/ELF64_EHDR_FLAGS_OK() and use it
as an added measure to make sure that we can execute a binary.
These default to (1) if elf_machdep.h does not override them.

On Sun2, ELF32_EHDR_FLAGS_OK() checks for the presense of EF_M68000,
since the 68010 cannot run binaries for the 68020-and-up.
2002-01-28 22:15:54 +00:00
simonb
bfc71f3c10 Add sysctls to read tk_{nin,nout,cancc,rawcc} (under a kern.tkstat node).
"extern" those variables in <sys/dkstat.h>, and add declarations for them
in sys/tty.c
2002-01-28 02:06:02 +00:00
simonb
ed6b438e40 Implement the hw.disknames and hw.diskstats sysctl's that have been listed
in <sys/sysctl.h> since day one but never implemented.
2002-01-27 12:41:07 +00:00
martin
b41d81ade2 Ooops, ISDN phone devices have an ioctl function, so add them to the
cdevsw. Noticed by Matthias Drochner.
(One of these days I'll setup an answering machine for testing myself ;-) )
2002-01-27 11:40:48 +00:00
lukem
8d39bcd4da correct comment 2002-01-27 07:19:25 +00:00
nathanw
0244dbad00 Reserve the SA malloc type on the trunk. 2002-01-12 00:00:39 +00:00
christos
d4e7e4c9c4 Fix a ptrace/execve race that could be used to modify the child process's
image during execve. This is a security issue because one can
do that to setuid programs... From FreeBSD.
2002-01-11 21:16:27 +00:00
thorpej
229efaff69 Add ioctls to get (DIOCGCACHE) and set (DIOCSCACHE) cache enables
on disks in a generic way.  Implement these ioctls for SCSI disks.

This is not fully fleshed-out yet, but it allows people to experiment
with disk caches more easily.
2002-01-09 04:12:11 +00:00
deberg
2cdce43be6 add SMBFS 2002-01-09 00:18:02 +00:00
deberg
7882fd04da gc unused M_NSMBDEV.
add comments reminding to mirror changes to the types list in malloc.9.
2002-01-07 01:02:19 +00:00
deberg
2935620216 add smbfs malloc types 2002-01-07 00:21:56 +00:00
dbj
d5738f5104 add support for the `D' kgdb detach command
add comment about minimum requirement for KGDB_BUFLEN
2002-01-05 22:57:38 +00:00
deberg
2268929539 cdev_netsmb_init() 2002-01-04 02:46:08 +00:00
deberg
c4b309d7aa add netsmb malloc types 2002-01-04 02:45:33 +00:00
augustss
1c06f6a40f Add support for radio cards. Written by Maxim Tsyplakov and Vladimir Popov
for OpenBSD, from where it was imported.
2002-01-01 21:51:38 +00:00
thorpej
38e94b28b8 From the comment added to the file:
* NOTE: Do not protect this header against multiple inclusion.  Doing
 * so can have subtle side-effects due to header file inclusion order
 * and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE.  Instead,
 * protect each CPP macro that we want to supply.
2001-12-20 20:07:24 +00:00
jdolecek
0f36df0693 Bump version to 1.5ZA - struct file change
Only three version bumps left to beat previous release :)
2001-12-18 22:34:37 +00:00
jdolecek
8884866a60 struct file: bump f_count and f_msgcount to u_int, to protect against
counter overflow. Fixes kern/5080 by David A. Holland.
Also move f_usecount & f_iflags to better place, and make f_type int.

Note: the maximum possible number of references to a struct file is
maxfiles + unp_rights == 2 * INT_MAX
2001-12-18 22:29:25 +00:00
fvdl
e946e67d2b Introduce M_NEWDIRBLK type. 2001-12-18 10:57:42 +00:00
thorpej
f77397d481 Use __sh__ instead of __sh3__. 2001-12-14 23:30:02 +00:00
thorpej
51535d4bf5 Add support for dumping ELF-cormat core files. 2001-12-09 23:05:56 +00:00
veego
f36a75214e Add some headers for region code support (RPC), which will be added in the
next commit of sys/dev/scsipi/cd.c.
2001-12-09 22:54:51 +00:00
manu
3cdc6f6197 Changed clocktl interface to use syscallargs structures 2001-12-09 16:10:43 +00:00
lukem
290cc55a28 - Implement
uint32_t namei_hash(const char *p, const char **ep)
  which determines the equivalent MI hash32_str() hash for p.
  If *ep != NULL, calculate the hash to the character before ep.
  If *ep == NULL, calculate the has to the first / or NUL found, and
  point *ep to that location.
- Use namei_hash() to calculate cn_hash in lookup() and relookup().
  Hash distribution goes from 35-40% to 55-70%, with similar profiled
  time spent in cache_lookup() and cache_enter() on my P3-600.
- Use namei_hash() to calculate cn_hash in nfs_readdirplusrpc(),
  insetad of homegrown code (that differed from that in lookup() !)
  namei_hash() has better spread and is faster than previous code
  (which used a non-constant multiplication).
2001-12-08 04:09:59 +00:00
thorpej
205c159f0e Make the coredump routine exec-format/emulation specific. Split
out traditional NetBSD coredump routines into core_netbsd.c and
netbsd32_core.c (for COMPAT_NETBSD32).
2001-12-08 00:35:25 +00:00
jdolecek
3d4c59a8ee Back off previous for now, Jason thinks it's not right. Will discuss
on tech-kern@
2001-12-07 07:09:29 +00:00
jdolecek
255ce12e50 replace FIF_WANTCLOSE/FIF_LARVAL with FWANTCLOSE/FLARVAL, which are set
in f_flag of struct file
for now, keep former f_iflags of struct file as _f_spare0, it will be g/c'ed
when struct file will be changed (this will happen soon)
2001-12-06 22:34:24 +00:00
lukem
c3a9ebdf37 fix comment 2001-12-06 04:02:22 +00:00
atatat
7ac1189351 Remove a redundant definition of __KERNEL_RCSID() that was redundantly
defined.
2001-12-05 21:06:51 +00:00
lukem
e35019c17b Add <sys/hash.h>, which currently implements three inline functions:
uint32_t hash32_buf(const void *buf, size_t len, uint32_t ihash)
	return 32 bit hash of buf, size len,
	seeded with initial hash of ihash (usually HASH32_BUF_INIT).
	this hash may use a different algorithm to hash32_str() and
	hash32_strn().

    uint32_t hash32_str(const void *buf, uint32_t ihash)
	return 32 bit hash of buf, which is an NUL terminated ascii string,
	seeded with initial hash of ihash (usually HASH32_STR_INIT).
	this hash may use a different algorithm to hash32_buf()
	but must use the same algorithm as hash32_strn().

    uint32_t hash32_strn(const void *buf, size_t len, uint32_t ihash)
	return 32 bit hash of buf, which is an NUL terminated ascii string
	up to a maximum of len bytes,
	seeded with initial hash of ihash (usually HASH32_STR_INIT).
	this hash may use a different algorithm to hash32_buf()
	but must use the same algorithm as hash32_str().

As discussed on tech-kern@netbsd.org.
2001-12-05 06:51:55 +00:00
enami
996ee10484 Introduce new function malloc_roundup(), suggested by Bill Sommerfeld
on tech-kern.
2001-12-05 01:29:04 +00:00
thorpej
03efee5585 * Allow machine-dependent code to specify hooks for ptrace(2)
(__HAVE_PTRACE_MACHDEP) and procfs (__HAVE_PROCFS_MACHDEP).
  These changes will allow platforms like x86 (XMM) and PowerPC
  (AltiVec) to export extended register sets in a sane manner.

* Use __HAVE_PTRACE_MACHDEP to export x86 XMM registers (standard
  FP + SSE/SSE2) using PT_{GET,SET}XMMREGS (in the machdep
  ptrace request space).
* Use __HAVE_PROCFS_MACHDEP to export x86 XMM registers via
  /proc/N/xmmregs in procfs.
2001-12-05 00:58:05 +00:00
enami
d2391ede6a Remove extern from function prototype. 2001-12-05 00:00:10 +00:00
enami
769949847d KNF and other cosmetic changes. 2001-12-04 23:56:36 +00:00
jdolecek
c152d680d8 Add M_CANFAIL malloc(9) flag. This flag changes behaviour in M_WAITOK
case when the requested memory size can't ever be granted - instead
of panic, malloc(9) would return failure (NULL).
Note kernel code should do proper bound checking, rather than
depend on M_CANFAIL. This flag is only supposed to be used in very
special cases, where common bound checking is not appropriate.

Discussed on tech-kern@, name ``M_CANFAIL'' suggested by Chuck Cranor.
2001-12-04 20:13:19 +00:00
christos
f6f0ceea17 PR/14639: Ben Harris: Stick the rcsid's in the data segment via inline
assembly, so that we don't get duplicate symbol errors when we have multiple
__KERNEL_RCSID's
2001-12-04 16:44:55 +00:00
augustss
45bdf1e78d Add IRFRAMEDISC line discipline for IrDA frames. 2001-12-03 23:29:11 +00:00
lukem
e2387142a7 convert cdev_ir_init() to use the cdev__ocrwip_init() helper macro,
like everything else with the same cdev methods does.  (hi lennart! :)
2001-12-02 12:17:12 +00:00
augustss
a8ef9684b0 Add cdev_ir_init() macro. 2001-12-02 10:36:33 +00:00
augustss
051c7d6423 Prototype for config_makeroom(), the routine that expands the cd_devs array. 2001-12-02 02:42:25 +00:00
christos
710a2e8de1 Welcome to 1.5Z [struct ucred changes] 2001-11-29 21:20:36 +00:00
christos
edd0fb6c43 use struct uucred in export_args. 2001-11-29 21:20:17 +00:00
christos
4328373c61 Introduce struct uucred which is our ``old'' ucred structure. This is
going to be used the kernel interfaces to userland, so that we don't
break the existing ABI. struct ucred has now been modified to have
u_int32_t for cr_ref and cr_ngroups.
2001-11-29 21:20:00 +00:00
lukem
91d1bbeaf3 Deprecate fnv_32_*() API. We'll replace this with a more generic hash API. 2001-11-29 18:39:08 +00:00
thorpej
57854f014a Install disklabel_acorn.h 2001-11-25 22:49:39 +00:00
thorpej
4fbe7a81e0 G/c riscbsd_partition; it's not used by anything, and is the same
as the riscix_partition anyway.
2001-11-25 19:04:48 +00:00
thorpej
1b71762f33 Move disklabel_acorn.h to <sys/disklabel_acorn.h>, much like we did
with disklabel_mbr.h.  More cleanup yet to come.
2001-11-25 16:22:47 +00:00
enami
4789a8840d Provide compat definition of __func__ for pre-C99 compiler. 2001-11-23 10:19:47 +00:00
enami
14c47b61f9 Fix possible typo in comment (s/MAXALLOCSIZE/MAXALLOCSAVE/). 2001-11-21 00:58:08 +00:00
lukem
677c5dd824 add RCSID and multiple inclusion protection 2001-11-19 05:37:49 +00:00
lukem
4b797c216a install fnv_hash.h 2001-11-19 05:31:39 +00:00
lukem
118c24bff7 In fnv_64_str(), replace u_register_t (which NetBSD doesn't have) with
Fnv32_t, since it's only going to store an 8 bit number anyway.
2001-11-19 05:29:02 +00:00
lukem
576eed5512 Add new malloc(9) flag M_ZERO - zeros memory before returning.
From Poul-Henning Kamp's equivalent enhancement in FreeBSD.
2001-11-17 03:50:27 +00:00
soren
662f877587 MAXSLP is defined to be a machine-independent scheduling parameter,
so move it into sys/param.h.
2001-11-15 18:06:11 +00:00
tv
d4c01db697 Turn off kernel rcsids by default on a.out, but let it be turned on again
with the option USE_KERNEL_RCSIDS.  (On a.out, these strings are actually
allocated memory and loaded; on ELF, they exist in a non-loaded file section.)
2001-11-13 19:52:39 +00:00
tv
8be2d6667c Dummy commit (removed one blank comment line) to make sure that all the
libc .o's for syscalls are rebuilt.
2001-11-13 14:49:56 +00:00
christos
731fd0e33d Protect printf() like functions and b{copy,zero,cmp} from being defined
in userland.
2001-11-12 23:08:13 +00:00
lukem
2be6cd9ae3 regen 2001-11-12 14:48:47 +00:00
perry
ea6b9b674d patch up some comments to avoid cpp warnings about redefines. 2001-11-11 00:00:15 +00:00
chs
6fbca7d0fc use pmap_kenter_pa() instead of pmap_enter(), this is required for
pages loaned to the kernel.  this implies that we also need to
call pmap_kremove() before uvm_km_free().

other general cleanup:  remove argument names from prototypes,
rename some variables, etc.
2001-11-06 07:30:14 +00:00
fvdl
b16adc3043 Make cn_isconsole check if cn_tab is NULL. 2001-11-05 21:38:14 +00:00
thorpej
d42a6dc5c2 Rather than using a NetBSD-specific header file <machine/int_types.h>
and non-standard inttype-like types, pull in <sys/types.h> if
_KERNEL or _STANDALONE and <inttypes.h> otherwise, and use standard
inttype types.

Discussed with and OK'd by Christos.
2001-10-31 18:05:35 +00:00
thorpej
6d2e0bcbc2 Use <machine/elf_machdep.h> to override Elf64_Word and Elf64_Sword
on the Alpha (which uses a non-standard definitions for historical
reasons), rather than #ifdef __alpha__ (which is not cross-tool safe).
2001-10-31 17:44:42 +00:00
thorpej
d973bb96f1 Include <machine/elf_machdep.h> earlier, at the beginning of the file,
after the inttypes header.
2001-10-31 17:35:06 +00:00
manu
40c8c13901 Made syscallargs.h lint-friendly, so that it can be included in libc sources
more easily.
2001-10-30 21:52:26 +00:00
thorpej
e8ee04475d - Add a new vnode flag VEXECMAP, which indicates that a vnode has
executable mappings.  Stop overloading VTEXT for this purpose (VTEXT
  also has another meaning).
- Rename vn_marktext() to vn_markexec(), and use it when executable
  mappings of a vnode are established.
- In places where we want to set VTEXT, set it in v_flag directly, rather
  than making a function call to do this (it no longer makes sense to
  use a function call, since we no longer overload VTEXT with VEXECMAP's
  meaning).

VEXECMAP suggested by Chuq Silvers.
2001-10-30 15:32:01 +00:00