Commit 2c1d2d22 authored by Berenger Bramas's avatar Berenger Bramas
Browse files

Again try to make the intel compiler happy

parent 5b4d4573
Pipeline #101846 failed with stages
in 10 minutes and 9 seconds
......@@ -68,7 +68,11 @@ public:
if(k->ownerId.load() != omp_get_thread_num()){
int localBusy = Busy;// Intel complains if we pass a const as last param
int expected = Available;
#ifdef __INTEL_COMPILER
while(!__sync_val_compare_and_swap(&k->lock, &expected, localBusy)){
#else
while(!std::atomic_compare_exchange_strong(&k->lock, &expected, localBusy)){
#endif
usleep(1);
expected = Available;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment