Commit Graph

500 Commits

Author SHA1 Message Date
yamt
74ccc189c4 wsevent_copyout_events50: fix a bogus panic. 2009-02-18 13:20:02 +00:00
snj
3c510e6b43 s/portugese/portuguese/, spotted by Ari Constancio in PR misc/40202. 2009-02-18 04:17:44 +00:00
apb
0cc72e51ac Use "defopt MODULAR" in sys/conf/files, and #include "opt_modular.h"
in all kernel sources that use the MODULAR option.
Proposed in tech-kern on 18 Jan 2009.
2009-02-13 22:41:00 +00:00
uwe
c795b4c2a9 G/c duplicate definition of WSCONS_EVENT_ASCII. 2009-02-08 22:58:56 +00:00
drochner
cf45120117 Avoid deadlock in tty code if a terminal emulation responds to
type/status/etc inquiries. (PR kern/37915)
This is clearly a design problem in tty, but we need a cheap fix now.
The problem is that ttyinput() tries to pull a spinlock which
is already held on calls to t_oproc.
The workaround is based on the fact that within wscons code, the
wsdisplay_emulinput() function is only called directly from
wsdisplaystart(). So we can be sure that the tty lock is held,
and use an inofficial entry point in ttc.c which avoids the locking.
These ate certainly more assumptions than needed by the fix
proposed in the PR, but it doesn't affect (and slow down) other
tty drivers.
2009-01-22 20:40:20 +00:00
yamt
cf5a92c11e always use the new version of wscons_event for in-kernel. 2009-01-16 15:14:11 +00:00
yamt
350f838fcf wsevent_init: always initialize version. pointed out by christos. 2009-01-16 14:38:09 +00:00
yamt
0915dface4 - reduce the number of #ifdefs.
- build compat glues if MODULAR.
2009-01-15 04:22:11 +00:00
christos
4c7a98373d Allocate the max size needed so that we don't need to realloc in setversion.
Problem pointed out by yamt.
2009-01-14 15:34:36 +00:00
christos
8945a0f495 provide wscons_event compatibility with 5.0. 2009-01-13 18:05:55 +00:00
he
761f38db5c In wsdisplay_kbdholdscreen(), just return if sc->sc_focus is NULL.
There is apparently no guarantee sc->sc_focus will be non-NULL,
as proved by a crash I experienced earlier today (admittedly on 4.0.1).
2008-11-07 19:33:13 +00:00
cegger
ee1dc8ea5f use device_lookup_private to get softc
use device_lookup to get device_t
2008-06-12 23:04:37 +00:00
cegger
7028bd34e9 use device_lookup_private to get sc
ok cube
2008-06-11 16:17:01 +00:00
ghen
41f841e610 Add support for the Colemak keyboard layout variant, see http://colemak.com 2008-05-21 07:39:24 +00:00
martin
592397db3f Move to standard TNF 2 clause license 2008-05-04 12:59:38 +00:00
cegger
d9b775927c hpqlb(4): driver for HP Quick Launch buttons - found on HP Pavilion Notebooks 2008-05-01 20:18:18 +00:00
ad
1498ad220e Make various bits of debug code compile again. 2008-04-30 14:07:13 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
cegger
4bd4cc6d3d aprint_verbose -> aprint_verbose_dev 2008-04-27 05:15:45 +00:00
ad
6d70f903e6 Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.
2008-04-24 15:35:27 +00:00
cegger
3069a1f144 use aprint_*_dev and device_xname 2008-04-05 15:50:49 +00:00
cube
d94699ecbb Split device_t and softc for wskbd(4), wsmouse(4) and that creepy wsmux(4). 2008-03-25 00:49:19 +00:00
drochner
3678498d59 -add a function to vga_post which can be called from DDB to get a
usable VGA console ("call ddb_vgapost")
-allow to switch from/to screens occupied by an X server if the graphics
 device is console and in polling mode (ie DDB)
This together allows to get a DDB session on a VGA console if the
system crashed while X11 was running.
As long as the protocol to tell X servers about virtual screen switches
is as primitive as it is, it is unsafe to restart an X session afterwards.
So this is basically for crash analysis.
2008-03-12 23:26:18 +00:00
rmind
c6186face4 Welcome to 4.99.55:
- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call.  It will
  indicate which event (POLL_IN, POLL_OUT, etc) happen.  If unknown,
  zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
2008-03-01 14:16:49 +00:00
dyoung
f580a3a869 Use PMF_FN_ARGS, PMF_FN_PROTO. 2008-02-29 06:13:39 +00:00
dyoung
9ab63bea7b Do not return EBUSY if this is the console. 2008-02-28 16:54:48 +00:00
dyoung
c7d0c816a2 Return EBUSY and do not detach if we are the console.
Cosmetic: use device_t and accessors.  Temporarily use PMF_FN_PROTO,
PMF_FN_ARGS.
2008-02-22 22:29:16 +00:00
drochner
0c3c5106cb -Don't detach/attach the X server in the pmf suspend/resume functions
which are called somewhere in the middle of system suspend. Since the
 X server accesses hardware directly it is outside our control whether
 the devices it accesses are already/still suspended or not, so the only
 way is to detach it before any device suspends and re-attach after
 everything is awake again.
-For that, export a function ("wsdisplay_handlex" for now) which is
 to be called from central suspend/resume code.
-The right way to handle the (normally impossible) case that the X
 server is not detached on suspend is to return an error which should
 abort the suspend process. pmf doesn't yet handle errors of device
 suspend handlers, so as a temporary measure try to suspend anyway,
 to get at least a text console.
-Improve error handling of X server attach/detach and maintain a flag
 which tracks whether the X server is really active.
2008-02-20 22:33:18 +00:00
drochner
85b70008e0 make the mutex securing a flag which controls screen switched adaptive
for sanity -- it is not yet in a code path which is called from
keyboard interrupt handlers
2008-02-13 19:01:35 +00:00
drochner
84c211c56c On suspend/resume, just detach/attach the X server (or whatever might
be using the "syncops" protocol) rather than doing a full switch
to virtual screen 1. The latter doesn't have the expected result if
the X server is running on screen 1, and is too much policy for inside
the kernel anyway.
Introduce a mutex+condvar to synchronize these operations, to replace
the spltty()/tsleep(). (for now only used by the new functions,
should be extended to the normal vt switching code)
2008-01-14 21:38:50 +00:00
drochner
8644062c1c restructure things a bit so that proclist_mutex is held between the
p_find() and the psignal() which is its purpose after all
2008-01-14 21:17:00 +00:00
joerg
1c47f4bb86 Switch to console on suspend and shutdown, switch back to where the
system was before on resume. This is the second attempt and got more
complicated due to the async nature of VT_ACTIVE. After the initial
switch, check that we ended up on the first screen and if not, wait for
the switch to happen.
2007-12-13 15:14:48 +00:00
joerg
5141501598 Stop the key pressed timeout on suspend to avoid virtually hanging keys,
e.g. when calling sysctl -w machdep.sleep_state=3 manually.
2007-12-13 14:49:42 +00:00
jmcneill
b36c96248a Wups, pmf_class_input_deregister is private; use pmf_device_deregister
instead
2007-12-10 01:13:38 +00:00
jmcneill
cda2869251 Deregister input class handler on detach. 2007-12-10 01:11:49 +00:00
jmcneill
4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
pooka
4e38160d4d Do not "return 1" from kqfilter for errors. That value is passed
directly to the userland caller and results in a mysterious EPERM.
Instead, return EINVAL or something else sensible depending on the
case.
2007-12-05 17:19:46 +00:00
jmcneill
4fbe23fdd0 aprintify 2007-12-01 04:50:50 +00:00
ad
dc26833bb6 - Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
2007-11-19 18:51:36 +00:00
dogcow
96d14f0973 If you're going to use device_t, may as well include sys/device.h; unb0rks
the build for sparc{,64}.
2007-10-19 08:57:50 +00:00
joerg
6c51962b6c Calling device_private once is enough. Reported by macallan@ 2007-10-18 21:08:18 +00:00
joerg
d238692c3e Initialise the callbacks for tty.t_rstrt_ch in ttymalloc
as all drivers but Sun/SPARC's kd.c use the same arguments.
Separate callout_reset into callout_schedule and the initial
callout_setfunc using that.
2007-10-18 18:54:56 +00:00
joerg
e4a56b252c Use aprint API for output and convert to device_t/softc separation. 2007-10-18 18:09:52 +00:00
joerg
002c91440c Always declare wskbd_repeat to fix build without wsdisplay. 2007-10-18 14:51:25 +00:00
joerg
54575b3cd5 Use callout_setfunc/callout_schedule and don't cast function pointers. 2007-10-17 22:13:56 +00:00
joerg
55e50c10e7 Use callout_setfunc/callout_schedule instead of callout_reset.
Use mstohz for the calculations.
2007-10-16 21:06:09 +00:00
macallan
6a9b8ff83c add type for Fujitsu AG-10e 2007-08-27 02:01:23 +00:00
macallan
75a9d6c832 add scrollback support 2007-08-06 03:11:32 +00:00
macallan
bf32d3c292 set the scrollmode flag when entering/leaving scroll mode, send scroll reset
when leaving
2007-08-06 03:07:52 +00:00
rumble
64dd04152b Set the 'ri' pointer before use. 2007-07-28 22:35:56 +00:00