[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

race condition



Dear mentors,

After implementing the score (using SGID), I have a race condition in my game.

The comparisson is between the just scored point with the last point
in the top-10.

readscore_file2memory();
If(pt>top[9])
{
  printf("Congrats... and stuff\n");
  reorderscore_memory();
  savescore_memory2file();
}

What would be the standard way to lock the scorefile?

No need for too much details. Just to point the general most accepted solution.

Thanks!

Beco.



-- 
Dr Beco
A.I. researcher

"Sometimes the heart sees what is invisible to the eye." (H. Jackson Brown Jr.)


Reply to: