Cleanup
This commit is contained in:
parent
b6f8acbaec
commit
2452769a80
|
@ -95,9 +95,9 @@ struct slock
|
||||||
#ifdef USE_WIN32_THREADS
|
#ifdef USE_WIN32_THREADS
|
||||||
/* The syntax we'll use is mind-bending unless we use a struct. Plus, we might want to store more info later */
|
/* The syntax we'll use is mind-bending unless we use a struct. Plus, we might want to store more info later */
|
||||||
/* This will be used as a linked list immplementing a queue of waiting threads */
|
/* This will be used as a linked list immplementing a queue of waiting threads */
|
||||||
struct QueueEntry
|
struct queue_entry
|
||||||
{
|
{
|
||||||
struct QueueEntry *next;
|
struct queue_entry *next;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ struct scond
|
||||||
HANDLE event;
|
HANDLE event;
|
||||||
|
|
||||||
/* the head of the queue; NULL if queue is empty */
|
/* the head of the queue; NULL if queue is empty */
|
||||||
struct QueueEntry *head;
|
struct queue_entry *head;
|
||||||
|
|
||||||
/* equivalent to the queue length */
|
/* equivalent to the queue length */
|
||||||
int waiters;
|
int waiters;
|
||||||
|
@ -515,8 +515,8 @@ void scond_free(scond_t *cond)
|
||||||
#ifdef USE_WIN32_THREADS
|
#ifdef USE_WIN32_THREADS
|
||||||
static bool _scond_wait_win32(scond_t *cond, slock_t *lock, DWORD dwMilliseconds)
|
static bool _scond_wait_win32(scond_t *cond, slock_t *lock, DWORD dwMilliseconds)
|
||||||
{
|
{
|
||||||
struct QueueEntry myentry;
|
struct queue_entry myentry;
|
||||||
struct QueueEntry **ptr;
|
struct queue_entry **ptr;
|
||||||
|
|
||||||
#if _WIN32_WINNT >= 0x0500 || defined(_XBOX)
|
#if _WIN32_WINNT >= 0x0500 || defined(_XBOX)
|
||||||
static LARGE_INTEGER performanceCounterFrequency;
|
static LARGE_INTEGER performanceCounterFrequency;
|
||||||
|
@ -662,7 +662,7 @@ static bool _scond_wait_win32(scond_t *cond, slock_t *lock, DWORD dwMilliseconds
|
||||||
{
|
{
|
||||||
/* It's not our turn and we're out of time. Give up.
|
/* It's not our turn and we're out of time. Give up.
|
||||||
* Remove ourself from the queue and bail. */
|
* Remove ourself from the queue and bail. */
|
||||||
struct QueueEntry* curr = cond->head;
|
struct queue_entry *curr = cond->head;
|
||||||
|
|
||||||
while (curr->next != &myentry)
|
while (curr->next != &myentry)
|
||||||
curr = curr->next;
|
curr = curr->next;
|
||||||
|
|
Loading…
Reference in New Issue