Commit Graph

23 Commits

Author SHA1 Message Date
jhb
dc2e474f79 Change the suser() API to take advantage of td_ucred as well as do a
general cleanup of the API.  The entire API now consists of two functions
similar to the pre-KSE API.  The suser() function takes a thread pointer
as its only argument.  The td_ucred member of this thread must be valid
so the only valid thread pointers are curthread and a few kernel threads
such as thread0.  The suser_cred() function takes a pointer to a struct
ucred as its first argument and an integer flag as its second argument.
The flag is currently only used for the PRISON_ROOT flag.

Discussed on:	smp@
2002-04-01 21:31:13 +00:00
jhb
6d47f88e6c Use suser() instead of checking cr_uid against 0 directly. 2002-03-26 18:01:38 +00:00
peter
8fc732f958 Fix warnings. The driver would be more useful with a DRIVER_MODULE()
entry so that it actually can do something.
2002-02-27 23:47:45 +00:00
bde
4323174252 #include "opt_compat.h" so that the support for old ioctls can actually
be compiled.  Old tty ioctls are still used (possibly ifdef'ed) in at
least the following programs in the src tree:
  atc des ee fontedit gdb gdbserver lock ntp perl5 tcsh telnet top vttest

rp.c:
Unremoved used variables so that the support for old ioctls actually
compiles.

Not tested at runtime by:	bde
2002-02-15 08:28:34 +00:00
msmith
7ff97afb06 Staticise the con_bios and digi_devclass variables, since they aren't needed
by anything else.
2002-01-08 10:24:34 +00:00
arr
34eecfd781 - Fix a bunch of malloc calls where the M_FLAG is incorrectly used; it
should be M_WAITOK.

Spotted by: des
2001-12-07 17:59:15 +00:00
phk
a027fe1776 devsw_add() and cdevsw_remove() are no longer needed. 2001-11-04 15:52:44 +00:00
brian
74ff6b8f7e Send a .4 second BREAK rather than a .25 second break so that
we're at least consistent with what tcsendbreak(3) is documented
to do.

MFC after: 2 weeks

Note, the MFC will be to sys/dev/dgb/dgm.c on the RELENG_4 branch
2001-09-23 20:03:40 +00:00
julian
5596676e6c KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
brian
f1ae94cd5c Allow individual ports to use alternate pin settings (swap dsr & cd)
via the new DIGIIO_SETALTPIN ioctl, and allow the port's ALTPIN setting
to be queried via DIGIIO_GETALTPIN.

The initial state and lock devices are normally used to set and/or
lock ALTPIN settings although the device itself may also be used.

ALTPIN settings are applied per-device and apply to both the callin
and callout device at the same time.
2001-06-20 14:52:08 +00:00
brian
9d7cdee0ca Use linker_reference_module() instead of hard-coding the digi_*
module path.
2001-06-18 15:10:20 +00:00
brian
9e23c5414a Credit John Prince and Eric Hernes for their work. 2001-06-18 15:02:33 +00:00
brian
7fdccd5e4c MALLOC -> malloc, FREE -> free 2001-05-22 18:10:57 +00:00
brian
71a548c10f #include <digi/*.h> -> #include <dev/digi/*.h>
Suggested by: bde
2001-05-19 17:06:48 +00:00
brian
197d190ffb Fairwell digiio.h (moved to src/sys/sys) 2001-05-19 09:40:10 +00:00
brian
ef009d9e42 digiio.h has moved to /usr/include/sys 2001-05-19 09:28:59 +00:00
brian
853c35eea7 digiModel_t -> enum digi_model
Remove a forgotton and unused structure.
2001-05-17 01:42:18 +00:00
brian
b824fbe47c Remove all the mutex stuff - suggested by jhb
Tidy up includes, credit Slawa Olhovchenkov, John Prince and Eric Hernes
for their efforts and add a couple of missing parenthesis around return
expressions.
2001-05-08 07:55:33 +00:00
brian
11b8508fbe sys/mutex.h requires sys/lock.h for LINT
Re-spotted by: phk
2001-05-07 23:52:08 +00:00
brian
b4e77391c3 Change COM_LOCK/COM_UNLOCK to a regular mutex - still conditional on
SMP being defined.
2001-05-07 11:13:11 +00:00
brian
a1f1a879b5 Make LINT compile again.
Spotted by:	phk
2001-05-06 21:03:37 +00:00
brian
db1670b796 Only define DEBUG if it's undefined. This should eventually go, but
can stay for now in case of problems.
2001-05-02 01:47:34 +00:00
brian
d56c2badd6 Add a ``digi'' driver.
This driver supports PCI Xr-based and ISA Xem Digiboard cards.
dgm will go away soon if there are no problems reported.  For now,
configuring dgm into your kernel warns that you should be using
digi.  This driver is probably close to supporting Xi, Xe and Xeve
cards, but I wouldn't expect them to work properly (hardware
donations welcome).

The digi_* pseudo-drivers are not drivers themselves but contain
the BIOS and FEP/OS binaries for various digiboard cards and are
auto-loaded and auto-unloaded by the digi driver at initialisation
time.  They *may* be configured into the kernel, but waste a lot
of space if they are.  They're intended to be left as modules.

The digictl program is (mainly) used to re-initialise cards that
have external port modules attached such as the PC/Xem.
2001-05-02 01:08:09 +00:00