Use kqueue on BSD

db4
Slava Pestov 2008-12-10 20:24:22 -06:00
parent f849e41c7e
commit 717bceb6ff
2 changed files with 4 additions and 12 deletions
basis/io/unix

View File

@ -1,16 +1,11 @@
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
IN: io.unix.bsd
USING: namespaces system kernel accessors assocs continuations
unix io.backend io.unix.backend io.unix.select ;
unix io.backend io.unix.backend io.unix.kqueue ;
IN: io.unix.bsd
M: bsd init-io ( -- )
<select-mx> mx set-global ;
! <kqueue-mx> kqueue-mx set-global
! kqueue-mx get-global <mx-port> <mx-task>
! dup io-task-fd
! [ mx get-global reads>> set-at ]
! [ mx get-global writes>> set-at ] 2bi ;
<kqueue-mx> mx set-global ;
! M: bsd (monitor) ( path recursive? mailbox -- )
! swap [ "Recursive kqueue monitors not supported" throw ] when

View File

@ -1,10 +1,7 @@
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
IN: io.unix.macosx
USING: io.unix.backend io.unix.bsd io.unix.kqueue io.backend
USING: io.unix.backend io.unix.bsd io.backend
namespaces system ;
M: macosx init-io ( -- )
<kqueue-mx> mx set-global ;
macosx set-io-backend