On Tue, Dec 15, 2015 at 11:04:51PM -0700, Devin Reade wrote:
> The usbd_open_pipe_intr(9) man page discusses the usbd_callback type and
> the usbd_transfer(9) man page mentions the associated interrupt context in
> which (presumably) that callback executes.
> 
> Are there any particular restrictions that apply while running from within
> that interrupt context?

tsleep(9) may not be called.

There may be more, but I've gotten by just fine with the above, so far :)

> In particular, I'm wondering if it's safe to invoke add_true_randomness(9)
> from
> within that interrupt context.

Yes, that should be safe.
 
> In addition to the specific answer, pointers to docs/references are welcome.

The best way to learn about these things is to start writing small but
functional kernel diffs and get them reviewed.  

The "Design and Implementation of *BSD" books might help with getting
the bigger picture. The newer ones are rather FreeBSD-specific but the
older ones (for 4.xBSD) do apply to OpenBSD in lots of ways (but not
in every way). Any such book will only provide very high-level information
and you will have to read the code for details.

Reply via email to