안녕하세요~
처음 글을 남기게 되네요.
다름이 아니라 제목처럼 멀티코어쓰래드 프로그램을 작성하려 하는데요
각 쓰래드별로 cpu 코어 id를 확인하고 싶은데
어떻게 해야 하는지 궁금합니다.
답변부탁드려요~
getcpu를 쓰시면 됩니다~ 써본적은 없어서리 -_- man page 참조하세영~
man getcpu
GETCPU(2) Linux Programmer's Manual GETCPU(2)
NAME getcpu - determine CPU and NUMA node on which the calling thread is running
SYNOPSIS #include
int getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache); .........
한번 도전해보겠습니당!
getcpu
getcpu를 쓰시면 됩니다~ 써본적은 없어서리 -_- man page 참조하세영~
man getcpu
GETCPU(2) Linux Programmer's Manual GETCPU(2)
NAME
getcpu - determine CPU and NUMA node on which the calling thread is running
SYNOPSIS
#include
int getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache);
.........
댓글 감사합니당^^
한번 도전해보겠습니당!