예제 #1
0
파일: safe.cpp 프로젝트: Karlan88/xray
// we call WNE to allow tasks that own the resource the blue is waiting on system
//    task time, in case they are blocked on an ST remote call (or a memory allocation
//    for that matter).
static void idle()
{
    if(at_st())
    {
        EventRecord sEvent;
        bool bEvent = WaitNextEvent(0U, &sEvent, 0UL, NULL);
    }
}
예제 #2
0
delivery_man::delivery_man():
    m_pPackage(NULL),
    m_pSemaphore(kInvalidID),
    m_bPackageWaiting(false)
{
    assert(at_st());

    OSStatus lStatus = MPCreateSemaphore(1UL, 0UL, &m_pSemaphore);
// TODO - throw on error here
    assert(lStatus == noErr);
}