Skip to content

Commit

Permalink
avoid race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoqiangwang committed Sep 26, 2016
1 parent 26baa13 commit a2132a1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gdd/gddAppTable.cc
Expand Up @@ -433,8 +433,10 @@ gddStatus gddApplicationTypeTable::freeDD(gdd* dd)
}

// fprintf(stderr,"Adding DD to free_list %d\n",app);
attr_table[group][app].sem.lock ();
dd->setNext(attr_table[group][app].free_list);
attr_table[group][app].free_list=dd;
attr_table[group][app].sem.unlock ();
}
else if (attr_table[group][app].type==gddApplicationTypeNormal)
{
Expand Down

0 comments on commit a2132a1

Please sign in to comment.