win32_obj_id = ::CreateSemaphore (&sec_none_nih, 0, LONG_MAX, NULL);
if (!win32_obj_id)
{
- debug_printf ("CreateSemaphore failed. %E");
- return false;
+ debug_printf ("CreateSemaphore failed. %E");
+ return false;
}
return true;
}
if (head)
{
if (InterlockedCompareExchangePointer (&head, node->next, node) != node)
- {
- list_node *cur = head;
-
- while (cur->next && node != cur->next)
- cur = cur->next;
- if (node == cur->next)
- cur->next = cur->next->next;
- }
+ {
+ list_node *cur = head;
+
+ while (cur->next && node != cur->next)
+ cur = cur->next;
+ if (node == cur->next)
+ cur->next = cur->next->next;
+ }
}
mx.unlock ();
}
list_node *cur = head;
while (cur)
{
- (cur->*callback) ();
- cur = cur->next;
+ (cur->*callback) ();
+ cur = cur->next;
}
mx.unlock ();
}
{
if (waiting_writers)
{
- if (!readers)
- cond_writers.unblock (false);
+ if (!readers)
+ cond_writers.unblock (false);
}
else if (waiting_readers)
cond_readers.unblock (true);