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

Comparing libev/ev_select.c (file contents):
Revision 1.27 by root, Tue Dec 25 07:05:45 2007 UTC vs.
Revision 1.28 by root, Sun Mar 16 16:38:23 2008 UTC

93 else 93 else
94 FD_CLR (handle, (fd_set *)vec_wi); 94 FD_CLR (handle, (fd_set *)vec_wi);
95 95
96#else 96#else
97 97
98 int word = fd / NFDBITS; 98 int word = fd / NFDBITS;
99 int mask = 1UL << (fd % NFDBITS); 99 fd_mask mask = 1UL << (fd % NFDBITS);
100 100
101 if (expect_false (vec_max < word + 1)) 101 if (expect_false (vec_max < word + 1))
102 { 102 {
103 int new_max = word + 1; 103 int new_max = word + 1;
104 104
106 vec_ro = ev_realloc (vec_ro, new_max * NFDBYTES); /* could free/malloc */ 106 vec_ro = ev_realloc (vec_ro, new_max * NFDBYTES); /* could free/malloc */
107 vec_wi = ev_realloc (vec_wi, new_max * NFDBYTES); 107 vec_wi = ev_realloc (vec_wi, new_max * NFDBYTES);
108 vec_wo = ev_realloc (vec_wo, new_max * NFDBYTES); /* could free/malloc */ 108 vec_wo = ev_realloc (vec_wo, new_max * NFDBYTES); /* could free/malloc */
109 109
110 for (; vec_max < new_max; ++vec_max) 110 for (; vec_max < new_max; ++vec_max)
111 ((fd_mask *)vec_ri)[vec_max] = 111 ((fd_mask *)vec_ri) [vec_max] =
112 ((fd_mask *)vec_wi)[vec_max] = 0; 112 ((fd_mask *)vec_wi) [vec_max] = 0;
113 } 113 }
114 114
115 ((fd_mask *)vec_ri) [word] |= mask; 115 ((fd_mask *)vec_ri) [word] |= mask;
116 if (!(nev & EV_READ)) 116 if (!(nev & EV_READ))
117 ((fd_mask *)vec_ri) [word] &= ~mask; 117 ((fd_mask *)vec_ri) [word] &= ~mask;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines