[질문] 쓰레드 구현 방법
글쓴이: 익명 사용자 / 작성시간: 금, 2002/09/06 - 1:14오후
안녕하세요
쓰레드 라이브러리를 만들어 볼려고 합니다.
(stack) context switch 같은 함수는 만들어 놨는데 문제가 있네요
커널 모드에서는 클럭 인터럽트가 발생해서 100HZ 마다 처리하다가 스케쥴
링을 하는것으로 아는데
pthread 처럼 유저 쓰레드를 구현 하려면 소프트웨어 적으로 signal 이 발
생 되야 할거 같거든요?
alarm 같은건.. 1초에 한번 발생 하는 거지요?? 그건 힘들거 같은데..
어떻게 만들죠?
Forums:
Re: [질문] 쓰레드 구현 방법
getitimer, setitimer - get or set value of an interval timer
#include
int getitimer(int which, struct itimerval *value);
int setitimer(int which, const struct itimerval *value,
struct itimerval *ovalue);
struct itimerval {
struct timeval it_interval; /* next value */
struct timeval it_value; /* current value */
};
struct timeval {
long tv_sec; /* seconds */
long tv_usec; /* microseconds */
};
마이크로 세크까지 되겠죠?
댓글 달기