2008-01-20 17:07:18 -05:00
|
|
|
! Copyright (C) 2008 Slava Pestov.
|
|
|
|
! See http://factorcode.org/license.txt for BSD license.
|
|
|
|
IN: io.unix.bsd
|
2008-04-11 10:54:50 -04:00
|
|
|
USING: namespaces system kernel accessors assocs continuations
|
2008-07-02 22:52:28 -04:00
|
|
|
unix io.backend io.unix.backend io.unix.select ;
|
2008-01-20 17:07:18 -05:00
|
|
|
|
2008-04-02 21:09:56 -04:00
|
|
|
M: bsd init-io ( -- )
|
2008-05-13 19:24:46 -04:00
|
|
|
<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 ;
|
2008-04-11 10:54:50 -04:00
|
|
|
|
2008-05-13 19:24:46 -04:00
|
|
|
! M: bsd (monitor) ( path recursive? mailbox -- )
|
|
|
|
! swap [ "Recursive kqueue monitors not supported" throw ] when
|
|
|
|
! <vnode-monitor> ;
|