本文整理汇总了C++中LogFlowThisFuncLeave函数的典型用法代码示例。如果您正苦于以下问题:C++ LogFlowThisFuncLeave函数的具体用法?C++ LogFlowThisFuncLeave怎么用?C++ LogFlowThisFuncLeave使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LogFlowThisFuncLeave函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LogFlowThisFuncEnter
/**
* Uninitializes the Session object.
*
* @note Locks this object for writing.
*/
void Session::uninit()
{
LogFlowThisFuncEnter();
/* Enclose the state transition Ready->InUninit->NotReady */
AutoUninitSpan autoUninitSpan(this);
if (autoUninitSpan.uninitDone())
{
LogFlowThisFunc(("Already uninitialized.\n"));
LogFlowThisFuncLeave();
return;
}
/* close() needs write lock */
AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
if (mState != SessionState_Unlocked)
{
Assert(mState == SessionState_Locked ||
mState == SessionState_Spawning);
HRESULT rc = unlockMachine(true /* aFinalRelease */, false /* aFromServer */);
AssertComRC(rc);
}
LogFlowThisFuncLeave();
}
示例2: switch
void DnDURIObject::closeInternal(void)
{
switch (m_Type)
{
case File:
{
if (u.m_hFile)
{
int rc2 = RTFileClose(u.m_hFile);
AssertRC(rc2);
u.m_hFile = NULL;
}
break;
}
case Directory:
break;
default:
break;
}
LogFlowThisFuncLeave();
}
示例3: LogFlowThisFuncEnter
void MediumAttachment::FinalRelease()
{
LogFlowThisFuncEnter();
uninit();
BaseFinalRelease();
LogFlowThisFuncLeave();
}
示例4: LogFlowThisFuncEnter
void GuestDnDSource::FinalRelease(void)
{
LogFlowThisFuncEnter();
uninit();
BaseFinalRelease();
LogFlowThisFuncLeave();
}
示例5: LogFlowThisFuncEnter
void GuestFsObjInfo::FinalRelease(void)
{
LogFlowThisFuncEnter();
uninit();
BaseFinalRelease();
LogFlowThisFuncLeave();
}
示例6: autoInitSpan
/**
* Initializes the Session object.
*/
HRESULT Session::init()
{
/* Enclose the state transition NotReady->InInit->Ready */
AutoInitSpan autoInitSpan(this);
AssertReturn(autoInitSpan.isOk(), E_FAIL);
LogFlowThisFuncEnter();
mState = SessionState_Unlocked;
mType = SessionType_Null;
#if defined(RT_OS_WINDOWS)
mIPCSem = NULL;
mIPCThreadSem = NULL;
#elif defined(RT_OS_OS2)
mIPCThread = NIL_RTTHREAD;
mIPCThreadSem = NIL_RTSEMEVENT;
#elif defined(VBOX_WITH_SYS_V_IPC_SESSION_WATCHER)
mIPCSem = -1;
#else
# error "Port me!"
#endif
/* Confirm a successful initialization when it's the case */
autoInitSpan.setSucceeded();
LogFlowThisFuncLeave();
return S_OK;
}
示例7: LogFlowThisFuncEnter
void GuestDirectory::FinalRelease(void)
{
LogFlowThisFuncEnter();
uninit();
BaseFinalRelease();
LogFlowThisFuncLeave();
}
示例8: LogFlowThisFuncEnter
/**
* @note XPCOM: when this method is not called on the main XPCOM thread, it
* simply blocks the thread until mCompletedSem is signalled. If the
* thread has its own event queue (hmm, what for?) that it must run, then
* calling this method will definitely freeze event processing.
*/
STDMETHODIMP Progress::WaitForOperationCompletion(ULONG aOperation, LONG aTimeout)
{
LogFlowThisFuncEnter();
LogFlowThisFunc(("aOperation=%d, aTimeout=%d\n", aOperation, aTimeout));
AutoCaller autoCaller(this);
if (FAILED(autoCaller.rc())) return autoCaller.rc();
AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
CheckComArgExpr(aOperation, aOperation < m_cOperations);
/* if we're already completed or if the given operation is already done,
* then take a shortcut */
if ( !mCompleted
&& aOperation >= m_ulCurrentOperation)
{
int vrc = VINF_SUCCESS;
bool fForever = aTimeout < 0;
int64_t timeLeft = aTimeout;
int64_t lastTime = RTTimeMilliTS();
while ( !mCompleted && aOperation >= m_ulCurrentOperation
&& (fForever || timeLeft > 0))
{
mWaitersCount ++;
alock.release();
vrc = RTSemEventMultiWait(mCompletedSem,
fForever ? RT_INDEFINITE_WAIT : (unsigned) timeLeft);
alock.acquire();
mWaitersCount--;
/* the last waiter resets the semaphore */
if (mWaitersCount == 0)
RTSemEventMultiReset(mCompletedSem);
if (RT_FAILURE(vrc) && vrc != VERR_TIMEOUT)
break;
if (!fForever)
{
int64_t now = RTTimeMilliTS();
timeLeft -= now - lastTime;
lastTime = now;
}
}
if (RT_FAILURE(vrc) && vrc != VERR_TIMEOUT)
return setError(E_FAIL,
tr("Failed to wait for the operation completion (%Rrc)"),
vrc);
}
LogFlowThisFuncLeave();
return S_OK;
}
示例9: LogFlowThisFunc
/**
* Uninitializes the instance.
* Called from FinalRelease().
*/
void GuestDirectory::uninit(void)
{
LogFlowThisFunc(("\n"));
/* Enclose the state transition Ready->InUninit->NotReady. */
AutoUninitSpan autoUninitSpan(this);
if (autoUninitSpan.uninitDone())
return;
LogFlowThisFuncLeave();
}
示例10: autoUninitSpan
/**
* Uninitializes the instance.
* Called from FinalRelease().
*/
void GuestFile::uninit(void)
{
/* Enclose the state transition Ready->InUninit->NotReady. */
AutoUninitSpan autoUninitSpan(this);
if (autoUninitSpan.uninitDone())
return;
LogFlowThisFuncEnter();
baseUninit();
LogFlowThisFuncLeave();
}
示例11: LogFlowThisFuncEnter
STDMETHODIMP ProgressProxy::WaitForCompletion(LONG aTimeout)
{
HRESULT hrc;
LogFlowThisFuncEnter();
LogFlowThisFunc(("aTimeout=%d\n", aTimeout));
/* No need to wait on the proxied object for these since we'll get the
normal completion notifications. */
hrc = Progress::WaitForCompletion(aTimeout);
LogFlowThisFuncLeave();
return hrc;
}
示例12: autoUninitSpan
/**
* Uninitializes the instance.
* Called from FinalRelease().
*/
void GuestFile::uninit(void)
{
/* Enclose the state transition Ready->InUninit->NotReady. */
AutoUninitSpan autoUninitSpan(this);
if (autoUninitSpan.uninitDone())
return;
LogFlowThisFuncEnter();
#ifdef VBOX_WITH_GUEST_CONTROL
baseUninit();
#endif
LogFlowThisFuncLeave();
}
示例13: LogFlowThisFuncEnter
STDMETHODIMP Session::Uninitialize()
{
LogFlowThisFuncEnter();
AutoCaller autoCaller(this);
HRESULT rc = S_OK;
if (autoCaller.state() == Ready)
{
/* close() needs write lock */
AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
LogFlowThisFunc(("mState=%s, mType=%d\n", Global::stringifySessionState(mState), mType));
if (mState == SessionState_Unlocking)
{
LogFlowThisFunc(("Already being unlocked.\n"));
return S_OK;
}
AssertMsgReturn( mState == SessionState_Locked
|| mState == SessionState_Spawning,
("Session is in wrong state (%ld), expected locked (%ld) or spawning (%ld)\n",
mState, SessionState_Locked, SessionState_Spawning),
VBOX_E_INVALID_VM_STATE);
/* close ourselves */
rc = unlockMachine(false /* aFinalRelease */, true /* aFromServer */);
}
else if (autoCaller.state() == InUninit)
{
/*
* We might have already entered Session::uninit() at this point,
* return silently
*/
LogFlowThisFunc(("Already uninitialized.\n"));
}
else
{
LogWarningThisFunc(("UNEXPECTED uninitialization!\n"));
rc = autoCaller.rc();
}
LogFlowThisFunc(("rc=%08X\n", rc));
LogFlowThisFuncLeave();
return rc;
}