Skip to content
Snippets Groups Projects
Commit 5b4d4573 authored by Berenger Bramas's avatar Berenger Bramas
Browse files

Try to make intel compiler happy

parent 1333361a
No related branches found
No related tags found
No related merge requests found
Pipeline #101816 failed
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment