diff options
| author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2018-01-04 23:05:26 +0000 |
|---|---|---|
| committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2018-01-04 23:05:26 +0000 |
| commit | 97f43200866f80f1924e9c627a2d424e3b60507c (patch) | |
| tree | 59d1a99c7b79b06f7e74a214b55ab1b83aca8d66 /openmp/runtime/src | |
| parent | f0197626d6b065139b7bacfd15c19625a6a3935b (diff) | |
| download | bcm5719-llvm-97f43200866f80f1924e9c627a2d424e3b60507c.tar.gz bcm5719-llvm-97f43200866f80f1924e9c627a2d424e3b60507c.zip | |
Fix some comments and formatting in kmp_dispatch.cpp
llvm-svn: 321831
Diffstat (limited to 'openmp/runtime/src')
| -rw-r--r-- | openmp/runtime/src/kmp_dispatch.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
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<kmp_int64>(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<kmp_int64>(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 <typename UT> -// 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; |

