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

Comparing libev/ev_poll.c (file contents):
Revision 1.16 by root, Fri Nov 23 05:13:49 2007 UTC vs.
Revision 1.17 by root, Wed Nov 28 11:15:55 2007 UTC

1/* 1/*
2 * libev epoll fd activity backend 2 * libev poll fd activity backend
3 * 3 *
4 * Copyright (c) 2007 Marc Alexander Lehmann <libev@schmorp.de> 4 * Copyright (c) 2007 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 7 * Redistribution and use in source and binary forms, with or without
103 (polls [i].revents & (POLLOUT | POLLERR | POLLHUP) ? EV_WRITE : 0) 103 (polls [i].revents & (POLLOUT | POLLERR | POLLHUP) ? EV_WRITE : 0)
104 | (polls [i].revents & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0) 104 | (polls [i].revents & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0)
105 ); 105 );
106} 106}
107 107
108static int 108int inline_size
109poll_init (EV_P_ int flags) 109poll_init (EV_P_ int flags)
110{ 110{
111 backend_fudge = 1e-3; /* needed to compensate for select returning early, very conservative */ 111 backend_fudge = 1e-3; /* needed to compensate for select returning early, very conservative */
112 backend_modify = poll_modify; 112 backend_modify = poll_modify;
113 backend_poll = poll_poll; 113 backend_poll = poll_poll;
116 polls = 0; pollmax = 0; pollcnt = 0; 116 polls = 0; pollmax = 0; pollcnt = 0;
117 117
118 return EVBACKEND_POLL; 118 return EVBACKEND_POLL;
119} 119}
120 120
121static void 121void inline_size
122poll_destroy (EV_P) 122poll_destroy (EV_P)
123{ 123{
124 ev_free (pollidxs); 124 ev_free (pollidxs);
125 ev_free (polls); 125 ev_free (polls);
126} 126}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines