… | |
… | |
2477 | /* Coro::Semaphore & Coro::Signal */ |
2477 | /* Coro::Semaphore & Coro::Signal */ |
2478 | |
2478 | |
2479 | static SV * |
2479 | static SV * |
2480 | coro_waitarray_new (pTHX_ int count) |
2480 | coro_waitarray_new (pTHX_ int count) |
2481 | { |
2481 | { |
2482 | /* a semaphore contains a counter IV in $sem->[0] and any waiters after that */ |
2482 | /* a waitarray=semaphore contains a counter IV in $sem->[0] and any waiters after that */ |
2483 | AV *av = newAV (); |
2483 | AV *av = newAV (); |
2484 | SV **ary; |
2484 | SV **ary; |
2485 | |
2485 | |
2486 | /* unfortunately, building manually saves memory */ |
2486 | /* unfortunately, building manually saves memory */ |
2487 | Newx (ary, 2, SV *); |
2487 | Newx (ary, 2, SV *); |