ssize_t RequestInjectionData::fetchAndClearFlags() { ssize_t flags; for (;;) { flags = atomic_acquire_load(getConditionFlags()); const ssize_t newFlags = hhvm ? (flags & RequestInjectionData::EventHookFlag) : 0; if (__sync_bool_compare_and_swap(getConditionFlags(), flags, newFlags)) { break; } } return flags; }
void RequestInjectionData::reset() { __sync_fetch_and_and(getConditionFlags(), 0); coverage = RuntimeOption::RecordCodeCoverage; debugger = false; debuggerIntr = false; while (!interrupts.empty()) interrupts.pop(); }
void RequestInjectionData::reset() { getConditionFlags()->store(0); m_coverage = RuntimeOption::RecordCodeCoverage; m_debugger = false; m_debuggerIntr = false; updateJit(); while (!interrupts.empty()) interrupts.pop(); }
void RequestInjectionData::setInterceptFlag() { __sync_fetch_and_or(getConditionFlags(), RequestInjectionData::InterceptFlag); }
void RequestInjectionData::clearPendingExceptionFlag() { __sync_fetch_and_and(getConditionFlags(), ~RequestInjectionData::PendingExceptionFlag); }
void RequestInjectionData::setPendingExceptionFlag() { __sync_fetch_and_or(getConditionFlags(), RequestInjectionData::PendingExceptionFlag); }
void RequestInjectionData::setTimedOutFlag() { getConditionFlags()->fetch_or(RequestInjectionData::TimedOutFlag); }
void RequestInjectionData::clearEventHookFlag() { __sync_fetch_and_and(getConditionFlags(), ~RequestInjectionData::EventHookFlag); }
void RequestInjectionData::clearPendingExceptionFlag() { getConditionFlags()->fetch_and(~RequestInjectionData::PendingExceptionFlag); }
ssize_t RequestInjectionData::fetchAndClearFlags() { return __sync_fetch_and_and(getConditionFlags(), (RequestInjectionData::EventHookFlag | RequestInjectionData::InterceptFlag)); }
void RequestInjectionData::clearEventHookFlag() { getConditionFlags()->fetch_and(~RequestInjectionData::EventHookFlag); }
void RequestInjectionData::setPendingExceptionFlag() { getConditionFlags()->fetch_or(RequestInjectionData::PendingExceptionFlag); }
void RequestInjectionData::setEventHookFlag() { getConditionFlags()->fetch_or(RequestInjectionData::EventHookFlag); }
void RequestInjectionData::setSignaledFlag() { getConditionFlags()->fetch_or(RequestInjectionData::SignaledFlag); }
void RequestInjectionData::clearTimedOutFlag() { getConditionFlags()->fetch_and(~RequestInjectionData::TimedOutFlag); }
void RequestInjectionData::clearInterceptFlag() { __sync_fetch_and_and(getConditionFlags(), ~RequestInjectionData::InterceptFlag); }
void RequestInjectionData::setMemExceededFlag() { __sync_fetch_and_or(getConditionFlags(), RequestInjectionData::MemExceededFlag); }
void RequestInjectionData::setDebuggerSignalFlag() { __sync_fetch_and_or(getConditionFlags(), RequestInjectionData::DebuggerSignalFlag); }
void RequestInjectionData::setSignaledFlag() { __sync_fetch_and_or(getConditionFlags(), RequestInjectionData::SignaledFlag); }
void RequestInjectionData::setInterceptFlag() { getConditionFlags()->fetch_or(RequestInjectionData::InterceptFlag); }
void RequestInjectionData::setMemExceededFlag() { getConditionFlags()->fetch_or(RequestInjectionData::MemExceededFlag); }
void RequestInjectionData::setTimedOutFlag() { __sync_fetch_and_or(getConditionFlags(), RequestInjectionData::TimedOutFlag); }
void RequestInjectionData::clearInterceptFlag() { getConditionFlags()->fetch_and(~RequestInjectionData::InterceptFlag); }
void RequestInjectionData::setEventHookFlag() { __sync_fetch_and_or(getConditionFlags(), RequestInjectionData::EventHookFlag); }
void RequestInjectionData::setDebuggerSignalFlag() { getConditionFlags()->fetch_or(RequestInjectionData::DebuggerSignalFlag); }
ssize_t RequestInjectionData::fetchAndClearFlags() { return getConditionFlags()->fetch_and(RequestInjectionData::EventHookFlag | RequestInjectionData::InterceptFlag); }
void RequestInjectionData::clearTimedOutFlag() { __sync_fetch_and_and(getConditionFlags(), ~RequestInjectionData::TimedOutFlag); }