summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/kmp_lock.h
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/src/kmp_lock.h')
-rw-r--r--openmp/runtime/src/kmp_lock.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/openmp/runtime/src/kmp_lock.h b/openmp/runtime/src/kmp_lock.h
index 8cd01d39812..b23af8b3c11 100644
--- a/openmp/runtime/src/kmp_lock.h
+++ b/openmp/runtime/src/kmp_lock.h
@@ -1265,6 +1265,19 @@ __kmp_get_user_lock_owner(kmp_user_lock_p, kmp_uint32);
#endif // KMP_USE_DYNAMIC_LOCK
+// data structure for using backoff within spin locks.
+typedef struct {
+ kmp_uint32 step; // current step
+ kmp_uint32 max_backoff; // upper bound of outer delay loop
+ kmp_uint32 min_tick; // size of inner delay loop in ticks (machine-dependent)
+} kmp_backoff_t;
+
+// Runtime's default backoff parameters
+extern kmp_backoff_t __kmp_spin_backoff_params;
+
+// Backoff function
+extern void __kmp_spin_backoff(kmp_backoff_t *);
+
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus
OpenPOWER on IntegriCloud