コード例 #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.cpp プロジェクト: NeoAnomaly/xray
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);
}