mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Sjoerd's thread changes (including down_sema typo fix).
Note: waitflag not supported on NT.
This commit is contained in:
parent
5b1d9bad32
commit
cf1474b73a
8 changed files with 47 additions and 18 deletions
|
@ -223,7 +223,10 @@ void free_sema(type_sema aSemaphore)
|
|||
CloseHandle((HANDLE) aSemaphore);
|
||||
}
|
||||
|
||||
void down_sema(type_sema aSemaphore)
|
||||
/*
|
||||
XXX must do something about waitflag
|
||||
*/
|
||||
int down_sema(type_sema aSemaphore, int waitflag)
|
||||
{
|
||||
DWORD waitResult;
|
||||
|
||||
|
@ -232,6 +235,7 @@ void down_sema(type_sema aSemaphore)
|
|||
waitResult = WaitForSingleObject( (HANDLE) aSemaphore, INFINITE);
|
||||
|
||||
dprintf(("%ld: down_sema(%lx) return: %l\n", get_thread_ident(),(long) aSemaphore, waitResult));
|
||||
return 0;
|
||||
}
|
||||
|
||||
void up_sema(type_sema aSemaphore)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue