summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/test/lock
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Updating implementation of OMPT as specified in OpenMP 5.0 Preview 2 ↵Jonas Hahnfeld2017-11-031-0/+42
| | | | | | | | (TR6)" This reverts commit r317339 which discarded some recent commits. llvm-svn: 317346
* Updating implementation of OMPT as specified in OpenMP 5.0 Preview 2 (TR6)Joachim Protze2017-11-031-42/+0
| | | | | | | | | | | The TR6 document is expected to be publically released around November 15. This patch does not implement OMPT for libomptarget. Patch by Simon Convent and Joachim Protze Differential Revision: https://reviews.llvm.org/D39182 llvm-svn: 317339
* [OpenMP] Fix race condition in omp_init_lockJonathan Peyton2017-11-011-0/+42
| | | | | | | | | | | | | | | | | | | | | This is a partial fix for bug 34050. This prevents callers of omp_set_lock (which does not hold __kmp_global_lock) from ever seeing an uninitialized version of __kmp_i_lock_table.table. It does not solve a use-after-free race condition if omp_set_lock obtains a pointer to __kmp_i_lock_table.table before it is updated and then attempts to dereference afterwards. That race is far less likely and can be handled in a separate patch. The unit test usually segfaults on the current trunk revision. It passes with the patch. Patch by Adam Azarchs Differential Revision: https://reviews.llvm.org/D39439 llvm-svn: 317115
* Fix bugs in TAS and futex lockJonathan Peyton2016-06-281-0/+2
| | | | | | | | | * Incorrect lock value written in __kmp_test_futex_lock * Incorrect lock value check in tas/futex lock with USE_LOCK_PROFILE on Patch by Hansang Bae llvm-svn: 274053
* Remove redundant %libomp-compile step from test/lock/omp_lock.cJonathan Peyton2016-06-231-1/+1
| | | | llvm-svn: 273576
* Apply the KMP_USE_FUTEX feature macro everywhereJonathan Peyton2016-06-221-0/+1
| | | | llvm-svn: 273438
* Remove trailing whitespace from testsJonathan Peyton2016-05-174-7/+7
| | | | llvm-svn: 269841
* Exponential back off logic for test-and-set lockJonathan Peyton2016-04-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This change adds back off logic in the test and set lock for better contended lock performance. It uses a simple truncated binary exponential back off function. The default back off parameters are tuned for x86. The main back off logic has a two loop structure where each is controlled by a user-level parameter: max_backoff - limits the outer loop number of iterations. This parameter should be a power of 2. min_ticks - the inner spin wait loop number of "ticks" which is system dependent and should be tuned for your system if you so choose. The "ticks" on x86 correspond to the time stamp counter, but on other architectures ticks is a timestamp derived from gettimeofday(). The user can modify these via the environment variable: KMP_SPIN_BACKOFF_PARAMS=max_backoff[,min_ticks] Currently, since the default user lock is a queuing lock, one would have to also specify KMP_LOCK_KIND=tas to use the test-and-set locks. Differential Revision: http://reviews.llvm.org/D19020 llvm-svn: 266329
* OpenMP Initial testsuite change to purely llvm-lit based testingJonathan Peyton2015-09-214-0/+182
This change introduces a check-libomp target which is based upon llvm's lit test infrastructure. Each test (generated from the University of Houston's OpenMP testsuite) is compiled and then run. For each test, an exit status of 0 indicates success and non-zero indicates failure. This way, FileCheck is not needed. I've added a bit of logic to generate symlinks (libiomp5 and libgomp) in the build tree so that gcc can be tested as well. When building out-of- tree builds, the user will have to provide llvm-lit either by specifying -DLIBOMP_LLVM_LIT_EXECUTABLE or having llvm-lit in their PATH. Differential Revision: http://reviews.llvm.org/D11821 llvm-svn: 248211
OpenPOWER on IntegriCloud