From e4426eb01aec415ee3958e5eabc8efc2e247b375 Mon Sep 17 00:00:00 2001
From: Slava Pestov <slava@oberon.internal.stack-effects.com>
Date: Tue, 12 Feb 2008 02:33:06 -0600
Subject: [PATCH] Mac OS X monitors load

---
 extra/core-foundation/fsevents/fsevents.factor | 4 ++--
 extra/io/monitors/monitors.factor              | 8 ++++----
 extra/io/unix/macosx/macosx.factor             | 3 ++-
 extra/io/unix/unix.factor                      | 2 +-
 4 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/extra/core-foundation/fsevents/fsevents.factor b/extra/core-foundation/fsevents/fsevents.factor
index 73232ad522..41d2844811 100644
--- a/extra/core-foundation/fsevents/fsevents.factor
+++ b/extra/core-foundation/fsevents/fsevents.factor
@@ -1,8 +1,8 @@
 ! Copyright (C) 2008 Slava Pestov
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.c-types alien.syntax kernel math sequences
-namespaces assocs init continuations ;
-IN: core-foundation
+namespaces assocs init continuations core-foundation ;
+IN: core-foundation.fsevents
 
 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
 ! FSEventStream API, Leopard only !
diff --git a/extra/io/monitors/monitors.factor b/extra/io/monitors/monitors.factor
index 1f3b36fadb..eff27614ae 100755
--- a/extra/io/monitors/monitors.factor
+++ b/extra/io/monitors/monitors.factor
@@ -1,7 +1,7 @@
 ! Copyright (C) 2008 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: io.backend kernel continuations namespaces sequences
-assocs hashtables sorting arrays ;
+assocs hashtables sorting arrays threads ;
 IN: io.monitors
 
 <PRIVATE
@@ -36,7 +36,7 @@ TUPLE: simple-monitor handle callback ;
 
 : <simple-monitor> ( handle -- simple-monitor )
     f (monitor) {
-        set-simple-monitor-wd
+        set-simple-monitor-handle
         set-delegate
     } simple-monitor construct ;
 
@@ -44,8 +44,8 @@ TUPLE: simple-monitor handle callback ;
     >r <simple-monitor> r> construct-delegate ; inline
 
 : notify-callback ( simple-monitor -- )
-    dup linux-monitor-callback
-    f rot set-linux-monitor-callback
+    dup simple-monitor-callback
+    f rot set-simple-monitor-callback
     [ schedule-thread ] when* ;
 
 M: simple-monitor fill-queue ( monitor -- )
diff --git a/extra/io/unix/macosx/macosx.factor b/extra/io/unix/macosx/macosx.factor
index 22c013d64b..136035991c 100644
--- a/extra/io/unix/macosx/macosx.factor
+++ b/extra/io/unix/macosx/macosx.factor
@@ -1,6 +1,7 @@
 IN: io.unix.macosx
 USING: io.unix.bsd io.backend io.monitors io.monitors.private
-continuations kernel core-foundation.fsevents ;
+continuations kernel core-foundation.fsevents sequences
+namespaces arrays ;
 
 TUPLE: macosx-io ;
 
diff --git a/extra/io/unix/unix.factor b/extra/io/unix/unix.factor
index 14fab00a15..e740561cf9 100755
--- a/extra/io/unix/unix.factor
+++ b/extra/io/unix/unix.factor
@@ -1,6 +1,6 @@
 USING: io.unix.backend io.unix.files io.unix.sockets io.timeouts
 io.unix.launcher io.unix.mmap io.backend combinators namespaces
-system vocabs.loader ;
+system vocabs.loader sequences ;
 
 "io.unix." os append require