DragonFly submit List (threaded) for 2009-09
DragonFly BSD
DragonFly submit List (threaded) for 2009-09
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: ahci power management


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Fri, 11 Sep 2009 16:38:59 +0200

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




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