Indentation fix
This commit is contained in:
parent
d052239a7a
commit
7fd5b86990
1 changed files with 14 additions and 14 deletions
|
@ -102,7 +102,7 @@ struct loc_Thread {
|
||||||
* any state:
|
* any state:
|
||||||
* nwrite >= 0
|
* nwrite >= 0
|
||||||
* nread >= 0
|
* nread >= 0
|
||||||
|
*
|
||||||
* if unlocked:
|
* if unlocked:
|
||||||
* can_read set
|
* can_read set
|
||||||
* can_write set
|
* can_write set
|
||||||
|
@ -293,15 +293,15 @@ static BOOL WINAPI
|
||||||
loc_Exit_Handler(DWORD fdwCtrlType)
|
loc_Exit_Handler(DWORD fdwCtrlType)
|
||||||
{
|
{
|
||||||
switch (fdwCtrlType) {
|
switch (fdwCtrlType) {
|
||||||
case CTRL_C_EVENT:
|
case CTRL_C_EVENT:
|
||||||
case CTRL_CLOSE_EVENT:
|
case CTRL_CLOSE_EVENT:
|
||||||
case CTRL_BREAK_EVENT:
|
case CTRL_BREAK_EVENT:
|
||||||
case CTRL_LOGOFF_EVENT:
|
case CTRL_LOGOFF_EVENT:
|
||||||
case CTRL_SHUTDOWN_EVENT:
|
case CTRL_SHUTDOWN_EVENT:
|
||||||
empth_request_shutdown();
|
empth_request_shutdown();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -457,7 +457,7 @@ empth_create(void (*entry)(void *), int size, int flags,
|
||||||
empth_yield();
|
empth_yield();
|
||||||
return pThread;
|
return pThread;
|
||||||
|
|
||||||
bad:
|
bad:
|
||||||
if (pThread) {
|
if (pThread) {
|
||||||
loc_FreeThreadInfo(pThread);
|
loc_FreeThreadInfo(pThread);
|
||||||
}
|
}
|
||||||
|
@ -663,7 +663,7 @@ empth_rwlock_create(char *name)
|
||||||
|
|
||||||
if ((rwlock->can_read = CreateEvent(NULL, TRUE, TRUE, NULL)) == NULL) {
|
if ((rwlock->can_read = CreateEvent(NULL, TRUE, TRUE, NULL)) == NULL) {
|
||||||
logerror("rwlock_create: failed to create reader event %s at %s:%d",
|
logerror("rwlock_create: failed to create reader event %s at %s:%d",
|
||||||
name, __FILE__, __LINE__);
|
name, __FILE__, __LINE__);
|
||||||
free(rwlock->name);
|
free(rwlock->name);
|
||||||
free(rwlock);
|
free(rwlock);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -671,7 +671,7 @@ empth_rwlock_create(char *name)
|
||||||
|
|
||||||
if ((rwlock->can_write = CreateEvent(NULL, FALSE, TRUE, NULL)) == NULL) {
|
if ((rwlock->can_write = CreateEvent(NULL, FALSE, TRUE, NULL)) == NULL) {
|
||||||
logerror("rwlock_create: failed to create writer event %s at %s:%d",
|
logerror("rwlock_create: failed to create writer event %s at %s:%d",
|
||||||
name, __FILE__, __LINE__);
|
name, __FILE__, __LINE__);
|
||||||
free(rwlock->name);
|
free(rwlock->name);
|
||||||
CloseHandle(rwlock->can_read);
|
CloseHandle(rwlock->can_read);
|
||||||
free(rwlock);
|
free(rwlock);
|
||||||
|
@ -717,7 +717,7 @@ empth_rwlock_unlock(empth_rwlock_t *rwlock)
|
||||||
{
|
{
|
||||||
if (CANT_HAPPEN(!rwlock->nread && !rwlock->nwrite))
|
if (CANT_HAPPEN(!rwlock->nread && !rwlock->nwrite))
|
||||||
return;
|
return;
|
||||||
if (rwlock->nread) { /* holding read lock */
|
if (rwlock->nread) { /* holding read lock */
|
||||||
rwlock->nread--;
|
rwlock->nread--;
|
||||||
if (rwlock->nread == 0)
|
if (rwlock->nread == 0)
|
||||||
SetEvent(rwlock->can_write);
|
SetEvent(rwlock->can_write);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue