Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 자료구조
- 브루트포스
- bfs
- 백준
- DP
- 너비우선탐색
- 문제풀이
- cs
- 알고리즘
- Computer science
- 컴공과
- c++
- coding
- 그래프
- 코딩
- 코테
- 개발
- 정석학술정보관
- 스택
- vector
- 구현
- 오퍼레이팅시스템
- Operating System
- Stack
- 컴퓨터공학과
- 북리뷰
- 정석
- 컴공
- OS
- 오에스
Archives
- Today
- Total
목록thread (1)
Little Jay
[OS] pthread.h 실행 명령어
#include #include #include #include #include #define ITER 1000 void *thread_increment(void * arg); void *thread_decrement(void * arg); int x; sem_t s; int main() { pthread_t tid1, tid2; sem_init(&s, 0, 1); pthread_create(&tid1, NULL, thread_increment, NULL); pthread_create(&tid2, NULL, thread_decrement, NULL); pthread_join(tid1, NULL); pthread_join(tid2, NULL); if (x != 0 ) printf("boom! counter..
Univ/Study
2022. 5. 10. 15:29