Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Barrera SENSE-REVERSING */
- void Sensebarrier(int *local_sense) /* local al hilo */
- {
- *local_sense = !(*local_sense);
- LOCK(pidlock_sr);
- counter++;
- if (counter == PROC_MAX) {
- counter = 0;
- UNLOCK(pidlock_sr);
- release = *local_sense;
- }
- else {
- UNLOCK(pidlock_sr);
- while (*local_sense != release);
- }
- }
Add Comment
Please, Sign In to add comment