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

Comparing libev/ev_port.c (file contents):
Revision 1.6 by root, Mon Nov 26 08:06:15 2007 UTC vs.
Revision 1.7 by root, Wed Nov 28 11:15:55 2007 UTC

106 port_eventmax = array_roundsize (port_event_t, port_eventmax << 1); 106 port_eventmax = array_roundsize (port_event_t, port_eventmax << 1);
107 port_events = (port_event_t *)ev_malloc (sizeof (port_event_t) * port_eventmax); 107 port_events = (port_event_t *)ev_malloc (sizeof (port_event_t) * port_eventmax);
108 } 108 }
109} 109}
110 110
111static int 111int inline_size
112port_init (EV_P_ int flags) 112port_init (EV_P_ int flags)
113{ 113{
114 /* Initalize the kernel queue */ 114 /* Initalize the kernel queue */
115 if ((backend_fd = port_create ()) < 0) 115 if ((backend_fd = port_create ()) < 0)
116 return 0; 116 return 0;
125 port_events = (port_event_t *)ev_malloc (sizeof (port_event_t) * port_eventmax); 125 port_events = (port_event_t *)ev_malloc (sizeof (port_event_t) * port_eventmax);
126 126
127 return EVBACKEND_PORT; 127 return EVBACKEND_PORT;
128} 128}
129 129
130static void 130void inline_size
131port_destroy (EV_P) 131port_destroy (EV_P)
132{ 132{
133 close (backend_fd);
134
135 ev_free (port_events); 133 ev_free (port_events);
136} 134}
137 135
138static void 136void inline_size
139port_fork (EV_P) 137port_fork (EV_P)
140{ 138{
141 close (backend_fd); 139 close (backend_fd);
142 140
143 while ((backend_fd = port_create ()) < 0) 141 while ((backend_fd = port_create ()) < 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines