[ruby-cvs:70517] normal:r63427 (trunk): thread.c: enable ppoll for FreeBSD 11.0 and later

normal at ruby-lang.org normal at ruby-lang.org
Tue May 15 12:49:22 JST 2018


normal	2018-05-15 12:49:21 +0900 (Tue, 15 May 2018)

  New Revision: 63427

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63427

  Log:
    thread.c: enable ppoll for FreeBSD 11.0 and later
    
    FreeBSD 11.0+ supports ppoll, so we may use it after accounting
    for portability differences in how it treats POLLOUT vs POLLHUP
    events as mutually exclusive (as documented in the FreeBSD
    poll(2) manpage).
    
    For waiting on high-numbered single FDs, this should put
    FreeBSD on equal footing with Linux and should allow cheaper
    FD readiness checking with sleepy GC in the future.
    
    * thread.c (USE_POLL, POLLERR_SET): define for FreeBSD 11.0+
      (rb_wait_for_single_fd): return all requested events on POLLERR_SET
      io.c (USE_POLL): define for FreeBSD 11.0+

  Modified files:
    trunk/io.c
    trunk/thread.c


More information about the ruby-cvs mailing list