(HAVE_RESTARTABLE_SYSCALLS): Do define even when
[bpt/guile.git] / libguile / async.h
index b4fa403..f58703b 100644 (file)
@@ -1,8 +1,9 @@
 /* classes: h_files */
 
-#ifndef ASYNCH
-#define ASYNCH
-/* Copyright (C) 1995, 96, 97, 98, 2000 Free Software Foundation, Inc.
+#ifndef SCM_ASYNC_H
+#define SCM_ASYNC_H
+
+/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002 Free Software Foundation, Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * whether to permit this exception to apply to your modifications.
  * If you do not wish that, delete this exception notice.  */
 
-/* Software engineering face-lift by Greg J. Badros, 11-Dec-1999,
-   gjb@cs.washington.edu, http://www.cs.washington.edu/homes/gjb */
 \f
 
 #include "libguile/__scm.h"
+#include "libguile/root.h"
 
 \f
 
-extern unsigned int scm_mask_ints;
+#define scm_mask_ints (scm_root->block_asyncs != 0)
 
 \f
 
-extern int scm_asyncs_pending (void);
-extern void scm_async_click (void);
-extern void scm_switch (void);
-extern SCM scm_async (SCM thunk);
-extern SCM scm_system_async (SCM thunk);
-extern SCM scm_async_mark (SCM a);
-extern SCM scm_system_async_mark (SCM a);
-extern SCM scm_run_asyncs (SCM list_of_a);
-extern SCM scm_noop (SCM args);
-extern SCM scm_set_tick_rate (SCM n);
-extern SCM scm_set_switch_rate (SCM n);
-extern SCM scm_unmask_signals (void);
-extern SCM scm_mask_signals (void);
-extern void scm_init_async (void);
+SCM_API void scm_async_click (void);
+SCM_API void scm_switch (void);
+SCM_API SCM scm_async (SCM thunk);
+SCM_API SCM scm_async_mark (SCM a);
+SCM_API SCM scm_system_async_mark (SCM a);
+SCM_API SCM scm_system_async_mark_for_thread (SCM a, SCM thread);
+SCM_API void scm_i_queue_async_cell (SCM cell, scm_root_state *);
+SCM_API SCM scm_run_asyncs (SCM list_of_a);
+SCM_API SCM scm_noop (SCM args);
+SCM_API SCM scm_call_with_blocked_asyncs (SCM proc);
+SCM_API SCM scm_call_with_unblocked_asyncs (SCM proc);
+void *scm_c_call_with_blocked_asyncs (void *(*p) (void *d), void *d);
+void *scm_c_call_with_unblocked_asyncs (void *(*p) (void *d), void *d);
+SCM_API void scm_init_async (void);
+
+#if (SCM_ENABLE_DEPRECATED == 1)
+
+SCM_API SCM scm_system_async (SCM thunk);
+SCM_API SCM scm_unmask_signals (void);
+SCM_API SCM scm_mask_signals (void);
+
+#endif
 
-#endif  /* ASYNCH */
+#endif  /* SCM_ASYNC_H */
 
 /*
   Local Variables: