From 97f43200866f80f1924e9c627a2d424e3b60507c Mon Sep 17 00:00:00 2001 From: Jonathan Peyton Date: Thu, 4 Jan 2018 23:05:26 +0000 Subject: Fix some comments and formatting in kmp_dispatch.cpp llvm-svn: 321831 --- openmp/runtime/src/kmp_dispatch.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'openmp/runtime/src/kmp_dispatch.cpp') diff --git a/openmp/runtime/src/kmp_dispatch.cpp b/openmp/runtime/src/kmp_dispatch.cpp index 9e698829b86..a821ec192f3 100644 --- a/openmp/runtime/src/kmp_dispatch.cpp +++ b/openmp/runtime/src/kmp_dispatch.cpp @@ -234,8 +234,12 @@ __forceinline kmp_int32 compare_and_swap(volatile kmp_int64 *p, /* Spin wait loop that first does pause, then yield. Waits until function returns non-zero when called with *spinner and check. Does NOT put threads to sleep. -#if USE_ITT_BUILD Arguments: + UT is unsigned 4- or 8-byte type + spinner - memory location to check value + checker - value which spinner is >, <, ==, etc. + pred - predicate function to perform binary comparison of some sort +#if USE_ITT_BUILD obj -- is higher-level synchronization object to report to ittnotify. It is used to report locks consistently. For example, if lock is acquired immediately, its address is reported to ittnotify via @@ -243,15 +247,12 @@ __forceinline kmp_int32 compare_and_swap(volatile kmp_int64 *p, and lock routine calls to KMP_WAIT_YIELD(), the later should report the same address, not an address of low-level spinner. #endif // USE_ITT_BUILD + TODO: make inline function (move to header file for icl) */ template -// ToDo: make inline function (move to header file for icl) -static UT // unsigned 4- or 8-byte type - __kmp_wait_yield( - volatile UT *spinner, UT checker, - kmp_uint32 (*pred)(UT, UT) USE_ITT_BUILD_ARG( - void *obj) // Higher-level synchronization object, or NULL. - ) { +static UT __kmp_wait_yield(volatile UT *spinner, UT checker, + kmp_uint32 (*pred)(UT, UT) + USE_ITT_BUILD_ARG(void *obj)) { // note: we may not belong to a team at this point volatile UT *spin = spinner; UT check = checker; -- cgit v1.2.3