ex:
this->testCommandGate->runAction(OSMemberFunctionCast(IOCommandGate::Action,
this, &com_peter_driver_MyDriver::myCommandGateAction),
this->getProvider(), NULL, NULL, NULL);
the command gate action, myCommandGateAction, is executed by thread that call runAction
if A call testCommandGate's runAction, and B call testCommandGate's runAction later,
B will wait until A finishes
if A call testCommandGate's runAction, and B call testCommandGate's runAction later,
B will wait until A finishes
subclass IOEventSource:
is executed by newly created thread
checkForWork will repeatedly be called until it return false
do the task in checkForWork
use enable() to trigger checkForWork to be called
is executed by newly created thread
checkForWork will repeatedly be called until it return false
do the task in checkForWork
use enable() to trigger checkForWork to be called
沒有留言:
張貼留言