컴맹의 CS study
pthread sched_yield 본문
when i want to make sure that one thing runs before another, like following
pid = fork()
if (pid) {
// parent: yield to child so it can go
sched_yield();
printf("parent\n");
} else {
printf("child\n");
}
reference
'miscellaneous' 카테고리의 다른 글
filesystem type 확인 및 mount (0) | 2021.02.11 |
---|---|
Vim folding (0) | 2020.07.06 |
Cmake 사용 (0) | 2020.06.08 |
nvidia driver / cuda driver install (0) | 2020.06.05 |
윈도우/ubuntu 듀얼부팅시 grub이 작동하지 않을때 (0) | 2020.06.05 |
Comments