본문 바로가기
멀티코어 프로그래밍/Pthread

Pthread 프로그래밍(1) - "Hello World"

by 기리의 개발로그 2022. 5. 3.

Pthread 프로그래밍(1)

eThread를 이용하여 "Hello World"를 출력

  • pthread.h 헤더 파일을 include 해주어야 한다.

  • thread 변수 t1을 통해 스레드를 생성한 후 함수를 실행하여 "Hello World"를 출력한다.


  • 컴파일 시 "-pthread"를 추가해주어야 한다,
  • 실행 결과, 정상적으로 출력되었음을 알 수 있다.
반응형

'멀티코어 프로그래밍 > Pthread' 카테고리의 다른 글

Pthread 아규먼트(2)  (2) 2022.05.09
Pthread 아규먼트(1)  (13) 2022.05.06
Pthread 프로그래밍(2)  (4) 2022.05.04
Pthread  (9) 2022.05.02
Pthread Attributes  (0) 2015.07.18

댓글