LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 753|回复: 1

我的系统的升级到了2.6.9的内核,为什么还是无法用EPOLL?

[复制链接]
发表于 2004-12-16 11:40:40 | 显示全部楼层 |阅读模式
我的系统的升级到了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。
发表于 2005-7-19 11:42:04 | 显示全部楼层
我的2.6内核epoll.h有,但是库找不到,编译出现链接错误
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表