Re: ahci power management
Johannes Hofmann wrote:
> In which context are sysctl callbacks run? How would I avoid races
> when modifying flags or accessing registers (to disable the PRCE intr
> for example)?
In the context of the calling thread, with the mp lock held.
> Maybe setting flags with with atomic operations and do the real work
> in the per port thread?
You could send a message to the port thread which in turn does all the work, without changing anything from within the sysctl.
cheers
simon
討論串 (同標題文章)
完整討論串 (本文為第 2 之 8 篇):