mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
* libguile/async.c: * libguile/async.h (scm_i_async_push, scm_i_async_pop): Make internally available. * libguile/vm-engine.c (vm_engine): Invoke interrupts inline. Add return-from-interrupt instruction. * libguile/vm.c (vm_handle_interrupt_code): New "builtin".
60 lines
1.9 KiB
C
60 lines
1.9 KiB
C
/* classes: h_files */
|
||
|
||
#ifndef SCM_ASYNC_H
|
||
#define SCM_ASYNC_H
|
||
|
||
/* Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2008, 2009, 2011
|
||
* 2014 Free Software Foundation, Inc.
|
||
*
|
||
* This library is free software; you can redistribute it and/or
|
||
* modify it under the terms of the GNU Lesser General Public License
|
||
* as published by the Free Software Foundation; either version 3 of
|
||
* the License, or (at your option) any later version.
|
||
*
|
||
* This library is distributed in the hope that it will be useful, but
|
||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
* Lesser General Public License for more details.
|
||
*
|
||
* You should have received a copy of the GNU Lesser General Public
|
||
* License along with this library; if not, write to the Free Software
|
||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||
* 02110-1301 USA
|
||
*/
|
||
|
||
|
||
|
||
#include "libguile/__scm.h"
|
||
#include "libguile/root.h"
|
||
#include "libguile/threads.h"
|
||
|
||
|
||
|
||
SCM_API void scm_async_tick (void);
|
||
SCM_API void scm_switch (void);
|
||
SCM_API SCM scm_system_async_mark (SCM a);
|
||
SCM_API SCM scm_system_async_mark_for_thread (SCM a, SCM thread);
|
||
SCM_INTERNAL int scm_i_setup_sleep (scm_i_thread *,
|
||
scm_i_pthread_mutex_t *m,
|
||
int fd);
|
||
SCM_INTERNAL void scm_i_reset_sleep (scm_i_thread *);
|
||
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);
|
||
SCM_API void *scm_c_call_with_blocked_asyncs (void *(*p) (void *d), void *d);
|
||
SCM_API void *scm_c_call_with_unblocked_asyncs (void *(*p) (void *d), void *d);
|
||
SCM_API void scm_dynwind_block_asyncs (void);
|
||
SCM_API void scm_dynwind_unblock_asyncs (void);
|
||
|
||
SCM_INTERNAL void scm_i_async_push (scm_i_thread *t, SCM proc);
|
||
SCM_INTERNAL SCM scm_i_async_pop (scm_i_thread *t);
|
||
|
||
SCM_INTERNAL void scm_init_async (void);
|
||
|
||
#endif /* SCM_ASYNC_H */
|
||
|
||
/*
|
||
Local Variables:
|
||
c-file-style: "gnu"
|
||
End:
|
||
*/
|