공부/Embedded
-
[Embedded C] Thread공부/Embedded 2024. 4. 1. 17:20
Process 구성 .text : 코드 영역 .data : 초기화된 전역변수 .bss : 초기화 하지 않은 전역변수 .heap : 동적할당 변수들 .stack : 지역 변수들 POSIX thread POSIX API : Portable Operating System InterFace for Unix의 약자로 IEEE에서 지정한 운영체제간 호환성을 유지하기 위한 표준 POSIX thread : pthread.h 위치 : /usr/include/pthread.h thread 사용 시, pthread 라이브러리를 같이 링킹 해야한다. - gcc -o ./test ./test.c -lpthread #include #include #include void *test1(){ while(1) { printf("t1\..