ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Async-Interrupt/Interrupt.xs
(Generate patch)

Comparing Async-Interrupt/Interrupt.xs (file contents):
Revision 1.2 by root, Thu Jul 2 15:13:03 2009 UTC vs.
Revision 1.3 by root, Thu Jul 2 15:17:57 2009 UTC

156 handle_asyncs (); 156 handle_asyncs ();
157 else 157 else
158 old_sighandler (signum, si, sarg); 158 old_sighandler (signum, si, sarg);
159} 159}
160#else 160#else
161static Signal_t async_sighandler (int) 161static Signal_t async_sighandler (int signum)
162{ 162{
163 if (signum == 9) 163 if (signum == 9)
164 a_asyncssync_handle (); 164 handle_asyncs ();
165 else 165 else
166 old_sighandler (signum); 166 old_sighandler (signum);
167} 167}
168#endif 168#endif
169 169
175 PL_sighandlerp = async_sighandler; 175 PL_sighandlerp = async_sighandler;
176 sig_pending = &PL_sig_pending; 176 sig_pending = &PL_sig_pending;
177 psig_pend = PL_psig_pend; 177 psig_pend = PL_psig_pend;
178 asyncs = newAV (); 178 asyncs = newAV ();
179 179
180PROTOTYPES: DISABLE
181
180SV * 182SV *
181_alloc (SV *cb, void *c_cb, void *c_arg, SV *fh_r, SV *fh_w) 183_alloc (SV *cb, void *c_cb, void *c_arg, SV *fh_r, SV *fh_w)
182 CODE: 184 CODE:
183{ 185{
184 SV *cv = SvOK (cb) ? SvREFCNT_inc_NN (get_cb (cb)) : 0; 186 SV *cv = SvOK (cb) ? SvREFCNT_inc_NN (get_cb (cb)) : 0;
243 245
244 for (i = AvFILLp (asyncs); i >= 0; --i) 246 for (i = AvFILLp (asyncs); i >= 0; --i)
245 if (AvARRAY (asyncs)[i] == async_sv) 247 if (AvARRAY (asyncs)[i] == async_sv)
246 { 248 {
247 if (i < AvFILLp (asyncs)) 249 if (i < AvFILLp (asyncs))
248 AvARRAY (asyncs)[i] == AvARRAY (asyncs)[AvFILLp (asyncs)]; 250 AvARRAY (asyncs)[i] = AvARRAY (asyncs)[AvFILLp (asyncs)];
249 251
250 assert (av_pop (asyncs) == async_sv); 252 assert (av_pop (asyncs) == async_sv);
251 goto found; 253 goto found;
252 } 254 }
253 255

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines