Search

'임계영역'에 해당되는 글 1건

  1. 2016.11.07 임계영역 설정 Ctirical Section

임계영역 설정 Ctirical Section

Programming/C,CPP,CS 2016. 11. 7. 11:07 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

임계영역 설정 Ctirical Section








CreateMutex
Critical Section Objects
DeleteCriticalSection
EnterCriticalSection
InitializeCriticalSectionAndSpinCount
LeaveCriticalSection
Synchronization Functions
TryEnterCriticalSection






void WINAPI InitializeCriticalSection( LPCRITICAL_SECTION lpCriticalSection );

void WINAPI DeleteCriticalSection( LPCRITICAL_SECTION lpCriticalSection );

void WINAPI EnterCriticalSection( LPCRITICAL_SECTION lpCriticalSection );

void WINAPI LeaveCriticalSection( LPCRITICAL_SECTION lpCriticalSection );

BOOL WINAPI TryEnterCriticalSection( LPCRITICAL_SECTION lpCriticalSection );








1. 임계영역 변수선언

CRITICAL_SECTION cs;


2. 초기화

InitializeCriticalSection( &cs );


3. 사용


임계영역 진입

EnterCriticalSection( &cs );


임계영역 탈출

LeaveCriticalSection( &cs );


4. 삭제

DeleteCriticalSection( &cs );