diff options
author | markm <markm@FreeBSD.org> | 2001-03-03 14:13:53 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2001-03-03 14:13:53 +0000 |
commit | 272222aea811214d605af86c9e46e5fd365dcf78 (patch) | |
tree | 34279bf67f07beb111092db67dd6677829de604c /share/man/man9 | |
parent | 0de716225854882caefa74da728558e702649999 (diff) | |
download | FreeBSD-src-272222aea811214d605af86c9e46e5fd365dcf78.zip FreeBSD-src-272222aea811214d605af86c9e46e5fd365dcf78.tar.gz |
Add a whole lot of extra info. Lots was gained from reading code
or comments, and some is as a result of simply documenting the
entropy harvester.
This still needs work: could a newbus guru pleazse follow up
and fix.extend my (no doubt) obvious mistakes!
Diffstat (limited to 'share/man/man9')
-rw-r--r-- | share/man/man9/BUS_SETUP_INTR.9 | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/share/man/man9/BUS_SETUP_INTR.9 b/share/man/man9/BUS_SETUP_INTR.9 index d902fa0..fa9ddf6 100644 --- a/share/man/man9/BUS_SETUP_INTR.9 +++ b/share/man/man9/BUS_SETUP_INTR.9 @@ -29,12 +29,21 @@ .Os FreeBSD .Sh NAME .Nm BUS_SETUP_INTR -.Nd create and attach to an interrupt handler +.Nm bus_setup_intr +.Nm BUS_TEARDOWN_INTR +.Nm bus_teardown_intr +.Nd create and attach to an interrupt handler, and teardown the attachment .Sh SYNOPSIS .Fd #include <sys/param.h> .Fd #include <sys/bus.h> .Ft int .Fn BUS_SETUP_INTR "device_t dev" "device_t child" "struct resource *irq" "int flags" "driver_intr_t *intr" "void *arg" "void **cookiep" +.Ft int +.Fn bus_setup_intr "device_t dev" "struct resource *r" "int flags" "driver_intr_t handler" "void *arg" "void **cookiep" +.Ft int +.Fn BUS_TEARDOWN_INTR "device_t dev" "device_t child" "struct resource *irq" "void **cookiep" +.Ft int +.Fn bus_teardown_intr "device_t dev" "struct resource *r" "void *cookiep" .Sh DESCRIPTION .Pp The method @@ -43,6 +52,33 @@ will create and attach an interrupt handler to an interrupt previously allocated by the resource manager's .Xr BUS_ALLOC_RESOURCE 9 method. +The +.Fa flags +are found in +.Pa sys/bus.h , +and give the broad category of interrupt. +The +.Fa flags +also tell the interrupt handlers the about certain +device driver characteristics. +.Dv INTR_FAST +means the handler is for a timing-critical function. +Extra care is take to speed up these handlers. +Use of this implies +.Dv INTR_EXCL . +.Dv INTR_EXCL +marks the handler as being +an exclusive handler for this interrupt. +.Dv INTR_MPSAFE +tells the scheduler that the interrupt handler +is well behaved in a preemptive environment +(``SMP safe''), +and does not need +to be protected by the ``Giant Lock'' mutex. +.Dv INTR_ENTROPY +marks the interrupt as being a good source of entropy - +this may be used by the entropy device +.Pa /dev/random . The handler .Fa intr will be called with the value @@ -58,7 +94,7 @@ in order to tear down the correct interrupt handler. Zero is returned on success, otherwise an appropriate error is returned. .Sh SEE ALSO -.Xr BUS_TEARDOWN_INTR 9 , +.Xr random 4 , .Xr device 9 , .Xr driver 9 .Sh AUTHORS |