목록포직스 (POSIX)/쓰레드 프로그램 예제 (Thread Program Example) (2)
Automotive Software
#include #include #include /* user defined macro */ #define COUNT_INIT_VALUE 0x00 #define COUNT_DUMMY_VALUE 0xA0 pthread_once_t InitOnce = PTHREAD_ONCE_INIT; /* it needs to be initialized as PTHREAD_ONCE_INIT */ int ClientCount = COUNT_DUMMY_VALUE; void init_ClientCount( void ) { printf("ClientCount(), Before : ClientCount = %d\n", ((COUNT_DUMMY_VALUE == ClientCount)? COUNT_DUMMY_VALUE : ClientC..
#include #include #include /* user defined macro */ #define COUNT_INIT_VALUE 0x00 #define COUNT_DUMMY_VALUE 0xA0 pthread_once_t InitOnce = PTHREAD_ONCE_INIT; /* it needs to be initialized as PTHREAD_ONCE_INIT */ int ClientCount = COUNT_DUMMY_VALUE; void init_ClientCount( void ) { printf("ClientCount(), Before : ClientCount = %d\n", ((COUNT_DUMMY_VALUE == ClientCount)? COUNT_DUMMY_VALUE : ClientC..