|
|
我的系统的升级到了2.6.9的内核,为什么还是无法用EPOLL呢?
EPOLL在2.6内核就已经加入到内核树里了
Fedora Core2里也可以正常使用,为什么我从slackware10升级到2.6.9,程序没有变动,但是编译的时候发现无法使用EPOLL,而且也无法使用NPTL。。
在/lib下根本没有 tls这个目录
请知道的人告诉我,要怎么做才能在我的程序使用EPOLL和NPTL?
我把内核升级到2.6就是为了使用这两个东西。
谢谢!!
root@elssann:/home/elssann/test# /lib/libc.so.6
GNU C Library stable release version 2.3.2, by Roland McGrath et al.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.3.3.
Compiled on a Linux 2.4.26 system on 2004-05-24.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
linuxthreads-0.10 by Xavier Leroy
BIND-8.2.3-T5B
libthread_db work sponsored by Alpha Processor Inc
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Report bugs using the `glibcbug' script to <bugs@gnu.org>.
root@elssann:/home/elssann/test#
root@elssann:/home/elssann/server# gcc -g hash.c pollevent.c queue.c testserver.c thread.c epoll.c mempool.c precomp.c signal.c -o epoll -lp
thread
epoll.c: In function `epoll_create':
epoll.c:22: error: `__NR_epoll_create' undeclared (first use in this function)
epoll.c:22: error: (Each undeclared identifier is reported only once
epoll.c:22: error: for each function it appears in.)
epoll.c: In function `epoll_ctl':
epoll.c:24: error: `__NR_epoll_ctl' undeclared (first use in this function)
epoll.c: In function `epoll_wait':
epoll.c:26: error: `__NR_epoll_wait' undeclared (first use in this function)
root@elssann:/home/elssann/server#
在Fedora core2下默认就可以编译,/libc下有个tls目录,就是NPTL。 |
|