Changeset View
Changeset View
Standalone View
Standalone View
compiler-rt/lib/tsan/rtl/tsan_rtl.h
Show First 20 Lines • Show All 807 Lines • ▼ Show 20 Lines | |||||
// AcquireGlobal synchronizes the current thread with all other threads. | // AcquireGlobal synchronizes the current thread with all other threads. | ||||
// In terms of happens-before relation, it draws a HB edge from all threads | // In terms of happens-before relation, it draws a HB edge from all threads | ||||
// (where they happen to execute right now) to the current thread. We use it to | // (where they happen to execute right now) to the current thread. We use it to | ||||
// handle Go finalizers. Namely, finalizer goroutine executes AcquireGlobal | // handle Go finalizers. Namely, finalizer goroutine executes AcquireGlobal | ||||
// right before executing finalizers. This provides a coarse, but simple | // right before executing finalizers. This provides a coarse, but simple | ||||
// approximation of the actual required synchronization. | // approximation of the actual required synchronization. | ||||
void AcquireGlobal(ThreadState *thr, uptr pc); | void AcquireGlobal(ThreadState *thr, uptr pc); | ||||
void Release(ThreadState *thr, uptr pc, uptr addr); | void Release(ThreadState *thr, uptr pc, uptr addr); | ||||
void ReleaseStoreAcquire(ThreadState *thr, uptr pc, uptr addr); | |||||
void ReleaseStore(ThreadState *thr, uptr pc, uptr addr); | void ReleaseStore(ThreadState *thr, uptr pc, uptr addr); | ||||
void AfterSleep(ThreadState *thr, uptr pc); | void AfterSleep(ThreadState *thr, uptr pc); | ||||
void AcquireImpl(ThreadState *thr, uptr pc, SyncClock *c); | void AcquireImpl(ThreadState *thr, uptr pc, SyncClock *c); | ||||
void ReleaseImpl(ThreadState *thr, uptr pc, SyncClock *c); | void ReleaseImpl(ThreadState *thr, uptr pc, SyncClock *c); | ||||
void ReleaseStoreAcquireImpl(ThreadState *thr, uptr pc, SyncClock *c); | |||||
void ReleaseStoreImpl(ThreadState *thr, uptr pc, SyncClock *c); | void ReleaseStoreImpl(ThreadState *thr, uptr pc, SyncClock *c); | ||||
void AcquireReleaseImpl(ThreadState *thr, uptr pc, SyncClock *c); | void AcquireReleaseImpl(ThreadState *thr, uptr pc, SyncClock *c); | ||||
// The hacky call uses custom calling convention and an assembly thunk. | // The hacky call uses custom calling convention and an assembly thunk. | ||||
// It is considerably faster that a normal call for the caller | // It is considerably faster that a normal call for the caller | ||||
// if it is not executed (it is intended for slow paths from hot functions). | // if it is not executed (it is intended for slow paths from hot functions). | ||||
// The trick is that the call preserves all registers and the compiler | // The trick is that the call preserves all registers and the compiler | ||||
// does not treat it as a call. | // does not treat it as a call. | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |