ubuntsu 9.10 でコンパイルを通すため若干変更。(gettid() だからしょうがないか)
@@ -304,11 +304,20 @@ | ||
304 | 304 | 優先度設定したりアイドルスレッド起こしても |
305 | 305 | おもしろくないので、そのへんは今後の研究課題。 */ |
306 | 306 | |
307 | +#if 0 | |
307 | 308 | #include <linux/unistd.h> |
308 | 309 | _syscall0(pid_t,gettid) |
310 | +#define thread_get_tid() gettid() | |
311 | +#endif /* 0 */ | |
309 | 312 | |
313 | +#if 0 | |
314 | +#include <sys/types.h> | |
310 | 315 | #define thread_get_tid() gettid() |
316 | +#endif /* 0 */ | |
311 | 317 | |
318 | +#include <sys/syscall.h> | |
319 | +#define thread_get_tid() (pid_t)syscall(SYS_gettid) | |
320 | + | |
312 | 321 | static |
313 | 322 | int thread_set_affinity(pid_t tid, int i) |
314 | 323 | { |