tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: when can we tsleep() ?



> this is related to kern/39725. We have cpu_intr_p() which tells us
> if we're in interrupt context or not. But there's other cases where
> it's not safe to call tsleep (e.g. from soft interrupt context, maybe
> others). If there a function or check that can tell us if it's safe
> to use tsleep() or not ?

I'm also interested in this topic.  Another point is when to allocate
resources, and when not.

It's surprising that even the classic spl*() behaviour was not
throughly understood among developers and / or code has been
inconsistent.  For example, see Thor's spl*() fixes around mbuf pool.
(I'm not saying that I understand all the implications in spl* world.
:)

Masao


Home | Main Index | Thread Index | Old Index