From: Tony Arcieri Date: 2010-12-09T14:23:00+09:00 Subject: Re: [ANN] cool.io 0.9.0: a cool event framework for Ruby (formerly known as Rev) based on libev --0015175cd794081a1b0496f3676f Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable TRAP_BEG and TRAP_END are for MRI 1.8. This is a fallback for if Cool.io doesn't find the rb_thread_blocking_region() function, which allows it to make blocking system calls in a multithreaded environment. You'll probably want to implement rb_thread_blocking_region() instead. I believe 1.9 additionally implements TRAP_BEG and TRAP_END using some C macro magic whic= h generates an rb_thread_blocking_region() call. Beyond that, it's going to need GetOpenFile() and the FPTR_TO_FD() macro. On Wed, Dec 8, 2010 at 9:56 PM, Charles Oliver Nutter wrote: > On Tue, Dec 7, 2010 at 9:56 PM, Tony Arcieri > wrote: > > It uses several parts of the MRI C API which I can only assume are > > unimplemented by JRuby. > > I gave it a shot, and it got as far as compiling loop.c: > > loop.c: In function =91Coolio_Loop_run_nonblock=92: > loop.c:277: error: =91TRAP_BEG=92 undeclared (first use in this function) > loop.c:277: error: (Each undeclared identifier is reported only once > loop.c:277: error: for each function it appears in.) > loop.c:279: error: =91TRAP_END=92 undeclared (first use in this function) > make: *** [loop.o] Error 1 > > I don't know what TRAP_BEG and TRAP_END do in MRI, but those would be > the next ones to implement in JRuby's cext support... > > https://github.com/jruby/jruby/tree/master/cext/src > > - Charlie > > --=20 Tony Arcieri Medioh! Kudelski --0015175cd794081a1b0496f3676f--