Commit 5b4d4573 authored by Berenger Bramas's avatar Berenger Bramas
Browse files

Try to make intel compiler happy

parent 1333361a
Pipeline #101816 failed with stages
in 11 minutes and 43 seconds
......@@ -66,8 +66,9 @@ public:
void lock(const long int inKey){
Locker* k = keys[inKey%keys.size()].get();
if(k->ownerId.load() != omp_get_thread_num()){
int localBusy = Busy;// Intel complains if we pass a const as last param
int expected = Available;
while(!std::atomic_compare_exchange_strong(&k->lock, &expected, Busy)){
while(!std::atomic_compare_exchange_strong(&k->lock, &expected, localBusy)){
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