- } else { // that's a release. Check if someone was waiting for the lock
- if (xbt_dynar_length(requests)>0) {
- INFO1("CS release. Grant to queued requests (queue size: %lu)",xbt_dynar_length(requests));
- char *req;
- xbt_dynar_pop(requests,&req);
- MSG_task_send(MSG_task_create("grant",0,1000,NULL),req);
- todo--;
- } else { // nobody wants it
- INFO0("CS release. resource now idle");
- CS_used=0;
- todo--;
+ } else { // that's a release. Check if someone was waiting for the lock
+ if (xbt_dynar_length(requests) > 0) {
+ XBT_INFO("CS release. Grant to queued requests (queue size: %lu)",
+ xbt_dynar_length(requests));
+ char *req;
+ xbt_dynar_pop(requests, &req);
+ MSG_task_send(MSG_task_create("grant", 0, 1000, NULL), req);
+ todo--;
+ } else { // nobody wants it
+ XBT_INFO("CS release. resource now idle");
+ CS_used = 0;
+ todo--;