Commit Graph

2740 Commits

Author SHA1 Message Date
thorpej
df25ffa39a Bump to 1.6R -- mbuf and pool changes. 2003-04-09 19:28:06 +00:00
thorpej
f775de9f61 * Use a pool_cache constructor to record the physical address of mbufs
in the mbuf header.
* Use the new cached paddr feature of the pool_cache API to record
  the physical address of mbuf clusters.  (We cannot use a ctor for
  clusters, since clusters have no constructed form; they are merely
  buffers).

Bus_dma back-ends may use the cached physical addresses to save having to
extract the physical address from virtual.

* Provide space in m_ext recording the vm_page *'s for an SOSEND_LOAN_CHUNK-
  sized non-cluster external buffer.  Use this in the sosend_loan code to
  save having to extract the physical address from virtual and then look
  up the vm_page *'s.

* Provide an indication that an external buffer is mapped read-only at
  the MMU.  Set this flag for the external buffer in the sosend_loan
  case, since loaned pages are always mapped read-only.  Bus_dma back-ends
  may use this information to save cache flushing, since a cache flush of
  a read-only mapping is redundant on some architectures (the cache would
  have already been flushed when making the mapping read-only).

Part 2 in a series of simple patches contributed by Wasabi Systems
to improve network performance.
2003-04-09 18:38:01 +00:00
thorpej
a0aee79a1d Add the ability for pool caches to cache the physical address of
objects.  Clients of the pool_cache API must consistently use
the "paddr" variants or not, otherwise behavior is undefined.

Enable this on Alpha, ARM, MIPS, and x86.  Other platforms must
define POOL_VTOPHYS() in the appropriate manner in order to enable
the feature.

Part 1 of a series of simple patches contributed by Wasabi Systems
to improve network performance.
2003-04-09 18:22:13 +00:00
yamt
e5655297db remove B_NEEDCOMMIT as it's no longer used. 2003-04-09 12:55:50 +00:00
gmcgarry
edf5b18a39 Garbage-collect vfs_lock()/vfs_unlock().
Xref vfssubr(9).
2003-04-06 07:04:42 +00:00
gmcgarry
2d6cf912cf Xref vfssubr(9) 2003-04-06 07:02:08 +00:00
fvdl
65f01ff495 Add prototype for bounds_check_with_mediasize 2003-04-03 22:18:46 +00:00
fvdl
42614ed3f3 Add support for UFS2. UFS2 is an enhanced FFS, adding support for
64 bit block pointers, extended attribute storage, and a few
other things.

This commit does not yet include the code to manipulate the extended
storage (for e.g. ACLs), this will be done later.

Originally written by Kirk McKusick and Network Associates Laboratories for
FreeBSD.
2003-04-02 10:39:19 +00:00
perry
a6e07c4e35 grow #! line length -- patch from cgd, fixes PR kern/20112 from Todd Vierling 2003-04-02 00:58:56 +00:00
provos
cb0252af40 avoid a panic due to recent changes in kern_fork.c; prepare for lwp by
keeping messages independent of the process itself
2003-03-30 00:40:05 +00:00
jdolecek
7f97807187 for NO_PGID, use ((pid_t)-1) rather than (-(pid_t)1) 2003-03-22 14:35:38 +00:00
thorpej
5abaeacf22 * Bump m_flags from "short" to "int", and shuffle the m_hdr accordingly.
As discussed on tech-net.
* Define a range of bits in the new wider m_flags which are reserved for
  M_EXT mbufs.  Define M_EXT_CLUSTER to indicate the ext is a cluster, and
  re-define M_CLUSTER as M_EXT_CLUSTER for source-level compatibility.
* Define a new M_EXTCOPYFLAGS to be used when manipulating M_EXT state.
2003-03-22 02:21:57 +00:00
dsl
bd99e3429d Use 'void *' instead of 'caddr_t' in prototypes of VOP_IOCTL, VOP_FCNTL
and VOP_ADVLOCK, delete casts from callers (and some to copyin/out).
2003-03-21 23:11:19 +00:00
dsl
60418b39b7 Change 'data' argument to fo_ioctl and fo_fcntl from 'caddr_t' to 'void *'.
Avoids a lot of casting and removes the need for some line breaks.
Removed a load of (caddr_t) casts from calls to copyin/copyout as well.
(approved by christos - he has a plan to remove caddr_t...)
2003-03-21 21:13:50 +00:00
dsl
eb1dfe29d9 Bump version to 1.6Q - for struct proc and struct pgrp change 2003-03-19 11:57:04 +00:00
dsl
9be8ac5294 Alternative pid/proc allocater, removes all searches associated with pid
lookup and allocation, and any dependency on NPROC or MAXUSERS.
NO_PID changed to -1 (and renamed NO_PGID) to remove artificial limit
on PID_MAX.
As discussed on tech-kern.
2003-03-19 11:36:32 +00:00
thorpej
fcae1f0ee0 Consistently call (*ext_free)() at splvm(). 2003-03-19 00:23:26 +00:00
christos
46bb05bc86 regen 2003-03-18 18:09:48 +00:00
jdolecek
46eb0d5bf0 make it possible for UNION fs to be loaded via LKM - instead of
having some #ifdef UNION code in vfs_vnops.c, introduce variable
'vn_union_readdir_hook' which is set to address of appropriate
vn_readdir() hook by union filesystem when it's loaded & mounted
2003-03-17 09:11:29 +00:00
jdolecek
0e2c1bbb82 apparently variable 'buf' in vn_readdir() shadows some global symbol,
remove from prototype
2003-03-17 09:06:40 +00:00
jdolecek
babb6ed282 drop some variable names from physio() prototype - e.g. 'minphys' shadows
global minphys()
2003-03-17 09:05:30 +00:00
dsl
1c38f38f99 Add pgid_in_session() for validating TIOCSPGRP requests
(approved by christos)
2003-03-12 22:16:31 +00:00
lukem
6f7e79fef4 install sys/tree.h
organise INCS= lines to make it easier to add includes in the future
2003-03-10 07:55:14 +00:00
thorpej
9e7bb2595e Based on the feedback on wasabisystems.com!bsd-api-discuss (sure wish
people would read that list in a more timely fashion!), change the new
64-bit memory reporting sysctl nodes to report bytes.  This should not
be a problem, since it's only a week old, and no applications use the
new nodes yet.
2003-03-06 20:32:59 +00:00
matt
6074e25e08 Add support for mmap(2) to be able to return memory aligned on a 2^n
boundary.
2003-03-06 00:41:51 +00:00
dsl
ef96ef8655 Add definitions for do_setres{u,g}id() to common up various system calls that
set the uid and gid values.
2003-03-05 18:39:17 +00:00
mycroft
adddd74e0e DANGER WILL ROBINSON!
We cannot store LWP pointers permanently in lock structures, for two reasons:
1) They are somewhat ephemeral.  Dangling pointers are bad.
2) A different LWP may issue the unlock, and in this case, we were not actually
   doing the unlock at all.  This was causing processes to exit without undoing
   fcntl(2) locks.  Furthermore, the locks are process-specific to begin with,
   so the test was just plain wrong.

Instead, we go back to storing a proc pointer for POSIX locks.  In addition, we
add an extra pointer to the LWP, which is used in deadlock detection.  After
the lock is granted, this pointer is 0ed and there is no reference to the LWP.

Now evolution can inc my mail again.
2003-03-05 18:28:22 +00:00
thorpej
b63ad6f9e2 Shuffle the order in the file that some mbuf flags are listed. Flag
values have not changed.
2003-03-02 22:35:32 +00:00
atatat
40f3045957 Add p_svuid and p_svgid to kinfo_proc2. Populate them in the kernel
and in libkvm.  Then teach ps how to show them to you.

Also, teach ps how to show the names for all the uids, the rest of the
group numbers, and the "group access list".
2003-03-01 05:41:55 +00:00
matt
bc859d628d Remove VMCMD_TOPDOWN since it's no longer. Redo my last rework. Move
VM_DEFAULT_ADDRESS from elf*_makecmds to elf*_load_file.  In load_file,
actually determine ahead of time how much space will be needed and pass
that to VM_DEFAULT_ADDRESS.  Now we have a relatistic starting address
so we can do the loading of psections normally with no extra topdown
code in load_psection.  Also, if there is a gap in betweeen psections
zero map an inaccessible region between (just like ld.elf_so does) to
avoid inadvertant mmaps in the gap.
2003-02-27 01:58:56 +00:00
thorpej
922f0e9b78 Add hw.physpages and hw.userpages, which return the physmem and usermem
values as a u_quad (page count).  Necessary for reporting memory on systems
with >=4G.  Per disussion on wasabisystems.com!bsd-api-discuss.
2003-02-27 01:39:56 +00:00
matt
9c3775aadf Make elf32 load_file work properly with TOPDOWN by mapping psections in
reverse order.  Remove TOPDOWN support from VMCMDs since elf32 does the
right stuff now.  With these changes, VAX can now use TOPDOWN.
2003-02-26 21:18:22 +00:00
drochner
72d6120d24 deactivate MBUFTRACE related KASSERT()s in the !MBUFTRACE case 2003-02-26 14:36:43 +00:00
matt
954ff2117e Define null m_claim macro so #ifdef MBUFTRACE m_claim #endif can just be
m_claim.
2003-02-26 07:49:02 +00:00
matt
65e5548a17 Add MBUFTRACE kernel option.
Do a little mbuf rework while here.  Change all uses of MGET*(*, M_WAIT, *)
to m_get*(M_WAIT, *).  These are not performance critical and making them
call m_get saves considerable space.  Add m_clget analogue of MCLGET and
make corresponding change for M_WAIT uses.
Modify netinet, gem, fxp, tulip, nfs to support MBUFTRACE.
Begin to change netstat to use sysctl.
2003-02-26 06:31:08 +00:00
perseant
6f5626d112 Make fs-specific fcntl macros take three arguments (approved wrstuden).
Let LFS use fcntl for cleaner functions.
2003-02-25 23:12:06 +00:00
jdolecek
b06fa82f3e make iftovt_tab[] const 2003-02-25 23:01:39 +00:00
thorpej
3ea6b8be93 Add missing splbio() protecting of bufpool access. Add a clarifying
comment to <sys/buf.h> reminding everyone of the need for splbio().
2003-02-25 21:25:40 +00:00
thorpej
eb14e86676 Add a new BUF_INIT() macro which initializes b_dep and b_interlock, and
use it.  This fixes a few places where either b_dep or b_interlock were
not properly initialized.
2003-02-25 20:35:31 +00:00
tron
b554323473 From FreeBSD: Fix an off-by-bit error in the AGP_MODE_[GS]ET_RATE() macros.
This fixes PR kern/20480 by Quentin Garnier.
2003-02-24 21:59:52 +00:00
jdolecek
70c11e3518 one #include <sys/lock.h> is enough; keep the #ifdef _KERNEL one 2003-02-24 11:18:03 +00:00
jdolecek
d82babe73c include <sys/lock.h> to get struct simplelock 2003-02-24 10:18:38 +00:00
pk
025e435477 Protect the event queue with a simple mutex; this only partially addresses
MP-safety issues in the event handling system.
2003-02-23 22:05:35 +00:00
martin
53dbc17caf Include <sys/lock.h> for the struct simplelock recently added here. 2003-02-23 16:38:01 +00:00
pk
2931081a79 Make updating a file's reference and use count MP-safe. 2003-02-23 14:37:32 +00:00
simonb
2724e6c512 Add an __unused attribute to the variable in the __link_set_make_entry()
macro.
2003-02-23 04:50:18 +00:00
atatat
df0a9badc6 Introduce "top down" memory management for mmap()ed allocations. This
means that the dynamic linker gets mapped in at the top of available
user virtual memory (typically just below the stack), shared libraries
get mapped downwards from that point, and calls to mmap() that don't
specify a preferred address will get mapped in below those.

This means that the heap and the mmap()ed allocations will grow
towards each other, allowing one or the other to grow larger than
before.  Previously, the heap was limited to MAXDSIZ by the placement
of the dynamic linker (and the process's rlimits) and the space
available to mmap was hobbled by this reservation.

This is currently only enabled via an *option* for the i386 platform
(though other platforms are expected to follow).  Add "options
USE_TOPDOWN_VM" to your kernel config file, rerun config, and rebuild
your kernel to take advantage of this.

Note that the pmap_prefer() interface has not yet been modified to
play nicely with this, so those platforms require a bit more work
(most notably the sparc) before they can use this new memory
arrangement.

This change also introduces a VM_DEFAULT_ADDRESS() macro that picks
the appropriate default address based on the size of the allocation or
the size of the process's text segment accordingly.  Several drivers
and the SYSV SHM address assignment were changed to use this instead
of each one picking their own "default".
2003-02-20 22:16:05 +00:00
christos
8c7d0f897e - comma at the end of an enum list is illegal in ansi c
- provide a list of unit names, so that programs don't have to provide their own
2003-02-20 20:57:56 +00:00
dsl
b80a5f24c5 KNF kern_prot.c 2003-02-18 08:37:41 +00:00
perseant
b397c875ae Add code to UBCify LFS. This is still behind "#ifdef LFS_UBC" for now
(there are still some details to work out) but expect that to go
away soon.  To support these basic changes (creation of lfs_putpages,
lfs_gop_write, mods to lfs_balloc) several other changes were made, to
wit:

* Create a writer daemon kernel thread whose purpose is to handle page
  writes for the pagedaemon, but which also takes over some of the
  functions of lfs_check().  This thread is started the first time an
  LFS is mounted.

* Add a "flags" parameter to GOP_SIZE.  Current values are
  GOP_SIZE_READ, meaning that the call should return the size of the
  in-core version of the file, and GOP_SIZE_WRITE, meaning that it
  should return the on-disk size.  One of GOP_SIZE_READ or
  GOP_SIZE_WRITE must be specified.

* Instead of using malloc(...M_WAITOK) for everything, reserve enough
  resources to get by and use malloc(...M_NOWAIT), using the reserves if
  necessary.  Use the pool subsystem for structures small enough that
  this is feasible.  This also obsoletes LFS_THROTTLE.

And a few that are not strictly necessary:

* Moves the LFS inode extensions off onto a separately allocated
  structure; getting closer to LFS as an LKM.  "Welcome to 1.6O."

* Unified GOP_ALLOC between FFS and LFS.

* Update LFS copyright headers to correct values.

* Actually cast to unsigned in lfs_shellsort, like the comment says.

* Keep track of which segments were empty before the previous
  checkpoint; any segments that pass two checkpoints both dirty and
  empty can be summarily cleaned.  Do this.  Right now lfs_segclean
  still works, but this should be turned into an effectless
  compatibility syscall.
2003-02-17 23:48:08 +00:00
christos
b91742b0f8 tputchar grows a flags argument. 2003-02-17 22:19:28 +00:00
christos
40da850b07 grow a NOLOCK flag. 2003-02-17 22:19:13 +00:00
tron
09b4e30e31 Include "sys/types.h" to get the definition of "size_t". 2003-02-16 09:30:23 +00:00
jdolecek
fa2b78c32c regen:
- added __sigtimedwait(2)
- g/c sigwaitinfo(2) slot, move sigqueue(2) slot and free slot #246
2003-02-15 20:56:48 +00:00
jdolecek
c58bfd1c36 add __sigtimedwait(2) - wait for specified set of signals, with optional
timeout
the semantics of 'timeout' parameter differ to POSIX for the syscall
(not const, may be modified by kernel if interrupted from the wait) -
libc will provide appropriate wrapper

since sigwaitinfo(2) will be implemented as wrapper around sigtimedwait()
too, remove it's reserved slot and move sigqueue slot 'up', freeing
slot #246
2003-02-15 20:54:38 +00:00
dsl
aed442201d Fix support of 15 and 16 character lognames.
Warn if the logname is changed within a session - usually a missing setsid.
(approved by christos)
2003-02-15 18:10:15 +00:00
pk
9ca040e74e Make the memory allocation code MP-safe. 2003-02-14 21:51:36 +00:00
dsl
e99cdd839c Defines for modified kern_exit.c 2003-02-14 14:27:24 +00:00
dsl
db17a870e0 Split sys_wait4 so that code isn't duplicated in compat tree.
(approved by christos)
2003-02-14 10:11:56 +00:00
pk
3cba4a9f1b Make the pipe code mostly MP-safe. There are a few unaddressed race
conditions at points where it's necessary to access both the up-stream
and down-stream parts of the bi-directional pipe data structure. These
are marked `XXXSMP' in the code.

Also, since the changes are pretty invasive, there little point in keeping
all the "#ifdef FreeBSD" code around; so all of that has been stripped out.
2003-02-12 21:54:15 +00:00
christos
f2db553615 no point in do while loop protection. 2003-02-12 03:46:02 +00:00
perry
0302b43268 clockctlattach takes only an int. 2003-02-11 01:44:16 +00:00
atatat
a8481319cb Add a kern.dump_on_panic sysctl variable (and documentation, and a
kernel config option) that controls whether the kernel dumps to the
dump device on panic.  Dumps can still be forced via the ``sync''
command from ddb.  Defaults to ``on''.
2003-02-10 00:35:15 +00:00
pk
338f31f581 Make the buffer cache code MP-safe. 2003-02-05 21:38:38 +00:00
pk
09843e3b7e Pull in <sys/lock.h>. 2003-02-05 20:34:56 +00:00
pk
bb52ffdf64 Make the tty subsystem MP-safe..
..as far as mere mortals are able to, since this code illustrates the finest
points that Italian haute cuisine has to offer.
2003-02-05 15:49:02 +00:00
perry
1f4ad37fe3 "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
2003-02-05 00:02:24 +00:00
yamt
05628fc8d1 constify wait channels of ltsleep/wakeup. they are never dereferenced. 2003-02-04 13:41:48 +00:00
jdolecek
97ec641999 Introduce EVFILT_TIMER, which allows a process to establish an
arbitrary number of timers, both oneshot and periodic.

from FreeBSD, only adapted to NetBSD kernel API - mstohz() instead
of tvtohz(), and takes advantage of callout_schedule() in filt_timerexpire()
2003-02-04 09:02:04 +00:00
thorpej
1b84adbe5f New callout implementation. This is based on callwheel implementation
done by Artur Grabowski and Thomas Nordin for OpenBSD, which is more
efficient in several ways than the callwheel implementation that it is
replacing.  It has been adapted to our pre-existing callout API, and
also provides the slightly more efficient (and much more intuitive)
API (adapted to the callout_*() naming scheme) that the OpenBSD version
provides.

Among other things, this shaves a bunch of cycles off rescheduling-in-
the-future a callout which is already scheduled, which the common case
for TCP timers (notably REXMT and KEEP).

The API has been simplified a bit, as well.  The (very confusing to
a good many people) "ACTIVE" state for callouts has gone away.  There
is now only "PENDING" (scheduled to fire in the future) and "EXPIRED"
(has fired, and the function called).

Kernel version bump not done; we'll ride the 1.6N bump that happened
with the malloc(9) change.
2003-02-04 01:21:03 +00:00
thorpej
c09e8e04cb Explicitly pull in <sys/queue.h>. 2003-02-03 23:47:13 +00:00
nathanw
86c56c4ffe Prevent one timer from overrunning another with the current userret
mechanism by keeping a list (bitset) of which timers have fired and using
that list in the upcall (Does this sound familiar? SEND HELP NEED SIGINFO).

Provoke the idle LWP into running again with setrunnable(sa->sa_idle)
instead of a wakeup() call, since we know what it is.
2003-02-03 23:39:40 +00:00
atatat
9301bc18e8 Specify VMCMD_FIXED in NEW_VMCMD() for flags instead of 0. Fixes
a.out emulations on sparc.
2003-02-03 00:21:42 +00:00
kleink
c674bbc90e Change _POSIX_SEMAPHORES to 0: support ultimately depends on a kernel
configuration option.
2003-02-02 20:34:49 +00:00
matt
4b9dbb1a16 Move l_flags to after l_cpu to save 4 bytes on LP64 machines. 2003-02-02 20:34:42 +00:00
kleink
71d7654509 Add sysconf(3) knobs for recent additions. 2003-02-02 20:33:05 +00:00
christos
8c9399c70c only include mallocvar.h if _KERNEL is defined [hi thorpej] 2003-02-02 02:22:14 +00:00
christos
5e74fdb1c9 correctly protect mallocvar.h against multiple inclusion [hi thorpej] 2003-02-02 02:21:43 +00:00
simonb
318a8db5da Allow the type of daddr_t to be overriden (for example by standalone
programs that have tight space constraints).
2003-02-01 23:47:02 +00:00
erh
982065fbae Remove nswbuf since it is entirely unused. 2003-02-01 21:07:01 +00:00
thorpej
9df2a1b394 Bump version to 1.6N; extensible malloc types. 2003-02-01 06:26:30 +00:00
thorpej
b193480908 Add extensible malloc types, adapted from FreeBSD. This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.
2003-02-01 06:23:35 +00:00
kleink
0592d14111 Provide _XOPEN_SHM. 2003-01-31 11:54:48 +00:00
thorpej
515d52e9e7 Change ext_size to a size_t, and update the signature of ext_free. 2003-01-31 05:00:24 +00:00
thorpej
e5e7fae215 ANSI'ify. 2003-01-31 04:55:52 +00:00
atatat
7a8e4b4bc4 Two small changes to the ELF exec code:
(1) ELFNAME(load_file)() now takes a pointer to the entry point
offset, instead of taking a pointer to the entry point itself.  This
allows proper adjustment of the ultimate entry point at a higher level
if the object containing the entry point is moved before the exec is
finished.

(2) Introduce VMCMD_FIXED, which means the address at which a given
vmcmd describes a mapping is fixed (ie, should not be moved).  Don't
set this for entries pertaining to ld.so.

Also some minor comment/whitespace tweaks.
2003-01-30 20:03:46 +00:00
manu
34a458238c For cproc_t, use a per thread value instead of a per process value. ifdef
out l_emuldata in struct lwp until we actually use it.
2003-01-30 19:14:18 +00:00
soren
549c8ffd36 Note that the FS_ definitions are for compatibility only. 2003-01-25 23:17:38 +00:00
fvdl
a3ff3a3038 Bump daddr_t to 64 bits. Replace it with int32_t in all places where
it was used on-disk, so that on-disk formats remain the same.
Remove ufs_daddr_t and ufs_lbn_t for the time being.
2003-01-24 21:55:02 +00:00
thorpej
9ba98c598b Add a pointer to p1003.1b semaphore data. 2003-01-24 16:24:44 +00:00
thorpej
3ff1552cc5 Add "fork hooks", a'la "exec hooks" and "exit hooks" which allow
subsystems to do special processing to the parent and/or child at
fork time.
2003-01-24 01:42:52 +00:00
thorpej
157e66459d Regen; reserve slots for <mqueue.h> and <sched.h> system calls. 2003-01-24 01:28:05 +00:00
thorpej
30427190e0 Regen; allocate slot for _ksem_timedwait(). 2003-01-24 01:18:50 +00:00
thorpej
77acc6e3bc Cosmetic changes. 2003-01-23 23:52:38 +00:00
thorpej
9243a2a667 Regen; allow ktruss/kdump to properly see _ksem_*(). 2003-01-23 23:31:36 +00:00
christos
3ea86aec06 PT_DUMPCORE support. 2003-01-23 17:35:18 +00:00
yamt
41ad61ee76 make KSTACK_CHECK_* compile after sa merge. 2003-01-22 12:52:14 +00:00
christos
aa30f99ab5 - add $NetBSD$
- include <sys/cdefs.h>
- remove variable names from args
2003-01-21 14:11:31 +00:00
kleink
38233ac58c G/c orphaned declaration of `runtime'; from HAMAJIMA Katsuomi in
PR kern/19974.
2003-01-21 13:56:53 +00:00
matt
b03d17694a Do a preliminary switchover of the mach code to lwp's. It compiles now
but probably doesn't work.   That's for someone who understand this code
better.
2003-01-21 04:06:06 +00:00
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