Skip to content
Snippets Groups Projects
Commit 292eb88b authored by Torsten Merz's avatar Torsten Merz
Browse files

changed locking mechanism of nrt task dispatcher

parent 35d1afe0
No related branches found
No related tags found
No related merge requests found
......@@ -238,7 +238,10 @@ usleep(10000);
//printf("aaaaaa->%d",__sync_fetch_and_add(&(shm->taskStateSysVar[i].exit),0));
numberOfSMIIterations=__sync_fetch_and_add(&(shm->numberOfSMIIterations),0);
while (numberOfSMIIterations==__sync_fetch_and_add(&(shm->numberOfSMIIterations),0) && shm->run!=0)
while (
__sync_fetch_and_add(&(shm->taskStateSysVar[i].exit),0)==ATOMIC_UNLOCKED
&&
numberOfSMIIterations+2>__sync_fetch_and_add(&(shm->numberOfSMIIterations),0) && shm->run!=0)
{
usleep(STD_SLEEP);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment