Commit Graph

21 Commits

Author SHA1 Message Date
yamt ec5a93183a merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate.
  the latter is more natural to specify an address space.
  (and less likely to be abused for random purposes.)
- fix a swdmover race.
2006-03-01 12:38:10 +00:00
yamt d91bf59ce6 dmoverioopen: add a missing simple_lock_init(). 2006-01-17 12:10:51 +00:00
perry 93124077ae Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:27:29 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
christos be3704c73f pass the flag to fdclone. 2005-02-12 23:14:03 +00:00
he d1b8269758 Correct a typo: it's fnullop_kqfilter and not fnullop_kqueue. 2004-12-05 22:42:27 +00:00
christos 31c81b28f5 Cloning cleanup:
1. make fileops const
2. add 2 new negative errno's to `officially' support the cloning hack:
    - EDUPFD (used to overload ENODEV)
    - EMOVEFD (used to overload ENXIO)
3. Created an fdclone() function to encapsulate the operations needed for
   EMOVEFD, and made all cloners use it.
4. Centralize the local noop/badop fileops functions to:
   fnullop_fcntl, fnullop_poll, fnullop_kqfilter, fbadop_stat
2004-11-30 04:25:43 +00:00
thorpej 29671d6616 Fix the fcntl entry points; cmd is a command, not the flags themselves.
Pointed out by Christos (he wrote the broken code originally, and I copied
it to another file later :-)
2004-11-28 07:44:05 +00:00
jdolecek a034152027 move dupfd from struct proc to struct lwp - it's per-LWP, not per-process; we
use curlwp where the lwp is not directly available, i.e. in device open
routines

briefly discussed on tech-kern
2003-09-13 08:32:10 +00:00
thorpej 5f35784b8a Add immediate value support for dmoverio transactions. 2003-07-19 02:00:18 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
scw 58c736d46f In dmio_read(), make sure to set DMIO_STATE_READ_WAIT in ds->ds_flags
before going to sleep.
2003-05-30 11:37:47 +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
thorpej 1cba452d86 Fix signed/unsigned comparison warnings. 2002-11-07 08:02:09 +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
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
thorpej 4c1506f740 *Actually return* EINVAL when the output stream UIO's I/O is larger
than SSIZE_MAX.
2002-08-04 01:52:00 +00:00
thorpej add44d0f41 Fix a signed/unsigned botch that broke an error recovery path.
(I could have sworn I fixed this bug over a week ago...)
2002-08-02 06:35:59 +00:00
thorpej ff8c9fb45c Grr, fix typo in RCS ID tag. 2002-08-02 00:31:35 +00:00
thorpej 5d06c0e812 dmover(9) -- an interface to hardware-assisted data movers. This allows
clients to use a hardware-assisted data mover to clear a region of memory,
fill a region of memory with a specific value, copy a region of memory,
and perform simple boolean operations such as XOR on multiple regions
of memory.

Included here is a software back-end which can serve as an example of
how to write a back-end (and also provides a fall-back in case hardware
for a given function is not available), as well as a dmoverio(4) pseudo-
device which provides access to dmover(9) to userland via a message
passing interface.

dmover(9) is still a work-in-progress -- a few minor changes to the
interface are expected.
2002-08-02 00:30:37 +00:00