reformat for PEP-7 style conformance

This commit is contained in:
Andrew MacIntyre 2002-12-04 12:29:37 +00:00
parent 6904959921
commit c4c127b850
1 changed files with 128 additions and 117 deletions

View File

@ -64,7 +64,8 @@ PyThread_get_thread_ident(void)
static void
do_PyThread_exit_thread(int no_cleanup)
{
dprintf(("%ld: PyThread_exit_thread called\n", PyThread_get_thread_ident()));
dprintf(("%ld: PyThread_exit_thread called\n",
PyThread_get_thread_ident()));
if (!initialized)
if (no_cleanup)
_exit(0);
@ -163,7 +164,8 @@ PyThread_free_lock(PyThread_type_lock aLock)
type_os2_lock lock = (type_os2_lock)aLock;
#endif
dprintf(("%ld: PyThread_free_lock(%p) called\n", PyThread_get_thread_ident(),aLock));
dprintf(("%ld: PyThread_free_lock(%p) called\n",
PyThread_get_thread_ident(),aLock));
#if defined(PYCC_GCC)
if (aLock) {
@ -192,24 +194,28 @@ PyThread_acquire_lock(PyThread_type_lock aLock, int waitflag)
type_os2_lock lock = (type_os2_lock)aLock;
#endif
dprintf(("%ld: PyThread_acquire_lock(%p, %d) called\n", PyThread_get_thread_ident(),
aLock, waitflag));
dprintf(("%ld: PyThread_acquire_lock(%p, %d) called\n",
PyThread_get_thread_ident(),
aLock,
waitflag));
#if defined(PYCC_GCC)
/* always successful if the lock doesn't exist */
if (aLock && _fmutex_request((_fmutex *)aLock, waitflag ? 0 : _FMR_NOWAIT))
if (aLock &&
_fmutex_request((_fmutex *)aLock, waitflag ? 0 : _FMR_NOWAIT))
return 0;
#else
while (!done) {
/* if the lock is currently set, we have to wait for the state to change */
/* if the lock is currently set, we have to wait for
* the state to change
*/
if (lock->is_set) {
if (!waitflag)
return 0;
DosWaitEventSem(lock->changed, SEM_INDEFINITE_WAIT);
}
/*
* enter a critical section and try to get the semaphore. If
/* enter a critical section and try to get the semaphore. If
* it is still locked, we will try again.
*/
if (DosEnterCritSec())
@ -234,7 +240,9 @@ void PyThread_release_lock(PyThread_type_lock aLock)
type_os2_lock lock = (type_os2_lock)aLock;
#endif
dprintf(("%ld: PyThread_release_lock(%p) called\n", PyThread_get_thread_ident(),aLock));
dprintf(("%ld: PyThread_release_lock(%p) called\n",
PyThread_get_thread_ident(),
aLock));
#if defined(PYCC_GCC)
if (aLock)
@ -242,14 +250,17 @@ void PyThread_release_lock(PyThread_type_lock aLock)
#else
if (!lock->is_set) {
dprintf(("%ld: Could not PyThread_release_lock(%p) error: %l\n",
PyThread_get_thread_ident(), aLock, GetLastError()));
PyThread_get_thread_ident(),
aLock,
GetLastError()));
return;
}
if (DosEnterCritSec()) {
dprintf(("%ld: Could not PyThread_release_lock(%p) error: %l\n",
PyThread_get_thread_ident(), aLock, GetLastError()));
PyThread_get_thread_ident(),
aLock,
GetLastError()));
return;
}