当前位置: 首页>>代码示例>>C++>>正文


C++ BaseHandle::pop方法代码示例

本文整理汇总了C++中BaseHandle::pop方法的典型用法代码示例。如果您正苦于以下问题:C++ BaseHandle::pop方法的具体用法?C++ BaseHandle::pop怎么用?C++ BaseHandle::pop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BaseHandle的用法示例。


在下文中一共展示了BaseHandle::pop方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: popStackHandles

extern "C" void popStackHandles(char* nextFrame) {
  DeltaProcess* active = DeltaProcess::active();
  if (active->thread_id() != os::current_thread_id()) {
    active = Processes::find_from_thread_id(os::current_thread_id());
  }
  BaseHandle* current = active->firstHandle();
  while (current && (char*) current < nextFrame) {
    current->pop();
    current = active->firstHandle();
  }
}
开发者ID:bossiernesto,项目名称:Strongtalk,代码行数:11,代码来源:process.cpp

示例2: handleCallBack

extern "C" volatile void* handleCallBack(int index, int params) {
    DeltaProcess* proc = NULL;

    if (Universe::callBack_receiver()->is_nil()) {
        warning("callBack receiver is not set");
    }

    int low  = get_unsigned_bitfield(params,  0, 16);
    int high = get_unsigned_bitfield(params, 16, 16);

    if (DeltaProcess::active()->thread_id() != os::current_thread_id()) {
        // We'are now back in a asynchronous DLL call so give up the control
        // Fix this:
        //   remove warning when it has been tested
        proc = Processes::find_from_thread_id(os::current_thread_id());
        assert(proc, "process must be present");
        DLLs::exit_async_call(&proc);
    }

    DeltaProcess::active()->setIsCallback(true);

    oop res = Delta::call(Universe::callBack_receiver(),
                          Universe::callBack_selector(),
                          as_smiOop(index),
                          as_smiOop(high),
                          as_smiOop(low));

    assert(DeltaProcess::active()->thread_id() == os::current_thread_id(), "check for process torch");

    void* result;

    // convert return result

    if (have_nlr_through_C) {
        // Continues the NLR after at the next Delta frame
        BaseHandle* handle = DeltaProcess::active()->firstHandle();
        if (handle && ((char*) handle < (char*)DeltaProcess::active()->last_Delta_fp()))
            handle->pop();

        ErrorHandler::continue_nlr_in_delta();
    }

    if (res->is_smi()) {
        result = (void*) smiOop(res)->value();
    } else if (res->is_proxy()) {
        result = (void*) proxyOop(res)->get_pointer();
    } else {
        warning("Wrong return type for call back, returning NULL");
        result = NULL;
    }

    // Return value has to be converted before we transfer control to another
    // thread.

    if (proc) {
        // We'are now back in a asynchronous DLL call so give up the control
        proc->resetStepping();
        proc->transfer_and_continue();
    }

    // Call Delta level error routine
    return result;
}
开发者ID:jirkadanek,项目名称:Strongtalk,代码行数:63,代码来源:callBack.cpp


注:本文中的BaseHandle::pop方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。