ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev_epoll.c
(Generate patch)

Comparing libev/ev_epoll.c (file contents):
Revision 1.49 by root, Tue Nov 24 06:37:23 2009 UTC vs.
Revision 1.50 by root, Tue Mar 23 23:45:12 2010 UTC

1/* 1/*
2 * libev epoll fd activity backend 2 * libev epoll fd activity backend
3 * 3 *
4 * Copyright (c) 2007,2008,2009 Marc Alexander Lehmann <libev@schmorp.de> 4 * Copyright (c) 2007,2008,2009,2010 Marc Alexander Lehmann <libev@schmorp.de>
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without modifica- 7 * Redistribution and use in source and binary forms, with or without modifica-
8 * tion, are permitted provided that the following conditions are met: 8 * tion, are permitted provided that the following conditions are met:
9 * 9 *
47 * b) the fact that ADD != MOD creates a lot of extra syscalls due to a) 47 * b) the fact that ADD != MOD creates a lot of extra syscalls due to a)
48 * and seems not to have any advantage. 48 * and seems not to have any advantage.
49 * c) the inability to handle fork or file descriptors (think dup) 49 * c) the inability to handle fork or file descriptors (think dup)
50 * limits the applicability over poll, so this is not a generic 50 * limits the applicability over poll, so this is not a generic
51 * poll replacement. 51 * poll replacement.
52 * d) epoll doesn't work the same as select with many file descriptors
53 * (such as files). while not critical, no other advanced interface
54 * seems to share this (rather non-unixy) limitation.
55 * e) epoll claims to be embeddable, but in practise you never get
56 * a ready event for the epoll fd.
52 * 57 *
53 * lots of "weird code" and complication handling in this file is due 58 * lots of "weird code" and complication handling in this file is due
54 * to these design problems with epoll, as we try very hard to avoid 59 * to these design problems with epoll, as we try very hard to avoid
55 * epoll_ctl syscalls for common usage patterns and handle the breakage 60 * epoll_ctl syscalls for common usage patterns and handle the breakage
56 * ensuing from receiving events for closed and otherwise long gone 61 * ensuing from receiving events for closed and otherwise long gone

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines