swi.9 (eb55f31bebbb9d7a1657a47b2d43aab480b37103) swi.9 (52116a1cb9d765e8cb035c136713c70b7342aa0d)
1.\" Copyright (c) 2000-2001 John H. Baldwin <jhb@FreeBSD.org>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 22 unchanged lines hidden (view full) ---

31.Nm swi_add ,
32.Nm swi_remove ,
33.Nm swi_sched
34.Nd register and schedule software interrupt handlers
35.Sh SYNOPSIS
36.In sys/param.h
37.In sys/bus.h
38.In sys/interrupt.h
1.\" Copyright (c) 2000-2001 John H. Baldwin <jhb@FreeBSD.org>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 22 unchanged lines hidden (view full) ---

31.Nm swi_add ,
32.Nm swi_remove ,
33.Nm swi_sched
34.Nd register and schedule software interrupt handlers
35.Sh SYNOPSIS
36.In sys/param.h
37.In sys/bus.h
38.In sys/interrupt.h
39.Vt "extern struct ithd *tty_ithd" ;
40.Vt "extern struct ithd *clk_ithd" ;
41.Vt "extern void *net_ih" ;
42.Vt "extern void *softclock_ih" ;
39.Vt "extern struct intr_event *tty_intr_event" ;
40.Vt "extern struct intr_event *clk_intr_event" ;
43.Vt "extern void *vm_ih" ;
44.Ft int
45.Fo swi_add
46.Fa "struct intr_event **eventp"
47.Fa "const char *name"
48.Fa "driver_intr_t handler"
49.Fa "void *arg"
50.Fa "int pri"

--- 96 unchanged lines hidden (view full) ---

147when scheduling a software interrupt handler can be used to implement the
148functionality performed by
149.Fn setdelayed
150in earlier versions of
151.Fx .
152.El
153.Pp
154The
41.Vt "extern void *vm_ih" ;
42.Ft int
43.Fo swi_add
44.Fa "struct intr_event **eventp"
45.Fa "const char *name"
46.Fa "driver_intr_t handler"
47.Fa "void *arg"
48.Fa "int pri"

--- 96 unchanged lines hidden (view full) ---

145when scheduling a software interrupt handler can be used to implement the
146functionality performed by
147.Fn setdelayed
148in earlier versions of
149.Fx .
150.El
151.Pp
152The
155.Va tty_ithd
153.Va tty_intr_event
156and
154and
157.Va clk_ithd
158variables contain pointers to the software interrupt threads for the tty and
155.Va clk_intr_event
156variables contain pointers to the software interrupt handlers for the tty and
159clock software interrupts, respectively.
157clock software interrupts, respectively.
160.Va tty_ithd
158.Va tty_intr_event
161is used to hang tty software interrupt handlers off of the same thread.
159is used to hang tty software interrupt handlers off of the same thread.
162.Va clk_ithd
160.Va clk_intr_event
163is used to hang delayed handlers off of the clock software interrupt thread so
164that the functionality of
165.Fn setdelayed
166can be obtained in conjunction with
167.Dv SWI_DELAY .
168The
161is used to hang delayed handlers off of the clock software interrupt thread so
162that the functionality of
163.Fn setdelayed
164can be obtained in conjunction with
165.Dv SWI_DELAY .
166The
169.Va net_ih ,
170.Va softclock_ih ,
171and
172.Va vm_ih
167.Va vm_ih
173handler cookies are used to schedule software interrupt threads to run for the
174networking stack, clock interrupt, and VM subsystem respectively.
168handler cookie is used to schedule software interrupt threads to run for the
169VM subsystem.
175.Sh RETURN VALUES
176The
177.Fn swi_add
178and
179.Fn swi_remove
180functions return zero on success and non-zero on failure.
181.Sh ERRORS
182The

--- 73 unchanged lines hidden ---
170.Sh RETURN VALUES
171The
172.Fn swi_add
173and
174.Fn swi_remove
175functions return zero on success and non-zero on failure.
176.Sh ERRORS
177The

--- 73 unchanged lines hidden ---