Advertisement
Guest User

Untitled

a guest
Nov 26th, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1.  
  2. static cell AMX_NATIVE_CALL n_CalculatePath( AMX* amx, cell* params )
  3. {
  4. if(params[1] < 0 || params[1] > (MAX_NODES-1) || params[2] < 0 || params[2] > (MAX_NODES-1))
  5. return 0;
  6. Lock q (mutex_q);
  7. int tries = 0;
  8. while (q.acquire (1) == false && ++tries < 10)
  9. {
  10. }
  11. if(q.locked)
  12. {
  13. QueueVector.push_back(QuedData(params[1],params[2],params[3],amx));
  14. q.release ();
  15. return 1;
  16. }
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement