.


:




:

































 

 

 

 





(semaphores), , 0, . , .

, . 1.

CreateSemaphore, OpenSemaphore ReleaseSemaphore, 1 . , .

HANDLE CreateSemaphore(LPSECURITY_ATTRIBUTES lpsa, LONG lSemInitial, LONG lSemMax, LPCTSTR lpSemName)

lSemMax, , , 1, . lSemInitial , : 0≤ lSemInitial≤ lSemMax . NULL .

1, ReleaseSemaphore .

BOOL ReleaseSemaphore(HANDLE hSemaphore, LONG cReleaseCount, LPLONG lpPreviousCount)

, lpPreviousCount, ReleaseSemaphore, , NULL.

, (cReleaseCount), 0, ReleaseSemaphore , , FALSE, . , . , , , , . Web- .

, 1, . , , . , , .





:


: 2015-09-20; !; : 474 |


:

:

- , , .
==> ...

1714 - | 1497 -


© 2015-2024 lektsii.org - -

: 0.008 .