2.6.5 & AMD64 epoll weirdness

From: Mihai RUSU
Date: Mon Apr 05 2004 - 06:59:34 EST


Hi

I have this little test program:
#include <sys/epoll.h>

int main(void)
{
int efd;
struct epoll_event event;
struct epoll_event events[10];

efd = epoll_create(100);
event.data.fd = 0;
epoll_ctl(efd, EPOLLIN, 0, &event);
epoll_wait(efd, events, 10, -1);
}

This program runs fine on x86/32bit with 2.6.5 kernel. But on AMD64 it
does this (strace qoute):

epoll_create(0x64) = 3
epoll_ctl(0x3, 0x1, 0, 0x7fbffff860) = -1 ENOSYS (Function not implemented)
epoll_wait(0x3, 0x7fbffff7e0, 0xa, 0xffffffff) = -1 ENOSYS (Function not implemented)

This is rather weird because I would expect to have epoll_create() fail
too (in fact I use this check at runtime, I try epoll_create and if it
works I presume epoll is functional; I needed this check because glibc
might have dummy epoll functions which always fail although the program
compiles fine with it). So do I really need to check all epoll syscalls
before presuming that epoll works on the current system ? (I would like to
have epoll_create failing in the case it doesnt supports AMD64).

Thanks!

--
Mihai RUSU Email: dizzy@xxxxxxxxx
GPG : http://dizzy.roedu.net/dizzy-gpg.txt WWW: http://dizzy.roedu.net
"Linux is obsolete" -- AST
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/