summaryrefslogtreecommitdiff
path: root/libguile/async.h
diff options
context:
space:
mode:
authorMichael Livshin <mlivshin@bigfoot.com>2000-04-04 20:07:11 +0000
committerMichael Livshin <mlivshin@bigfoot.com>2000-04-04 20:07:11 +0000
commit843e4e9d17afbf6cc05dbb94d58f5e49c060a9ee (patch)
tree5fa6e314b3a8f16ec9652e53a361ffebda3a84e4 /libguile/async.h
parent873c35ee824f062c151ff15f0bee22e00e11f059 (diff)
downloadguile-843e4e9d17afbf6cc05dbb94d58f5e49c060a9ee.tar.gz
* async.h: kill the scm_async_t struct. having a heap cell
pretending to be a C struct is not helthy, and is not needed here anyway, as asyncs happily fit in one heap cell. * async.c: reflect the fact that asyncs are now represented by single heap cell each.
Diffstat (limited to 'libguile/async.h')
-rw-r--r--libguile/async.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/libguile/async.h b/libguile/async.h
index b1be78295..7e191d221 100644
--- a/libguile/async.h
+++ b/libguile/async.h
@@ -3,17 +3,17 @@
#ifndef ASYNCH
#define ASYNCH
/* Copyright (C) 1995, 96, 97, 98, 2000 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
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program 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 General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
@@ -52,13 +52,10 @@
#define SCM_ASYNCP(X) (SCM_NIMP(X) && (scm_tc16_async == SCM_GCTYP16 (X)))
-#define SCM_ASYNC(X) ((struct scm_async *) &SCM_CDR (X))
-struct scm_async
-{
- scm_bits_t got_it; /* needs to be delivered? */
- SCM thunk; /* the handler. */
-};
+#define SCM_ASYNC_GOT_IT(X) (SCM_CELL_WORD_0 (X) >> 16)
+#define SCM_SET_ASYNC_GOT_IT(X, V) (SCM_SET_CELL_WORD_0 (X, (SCM_CELL_WORD_0 (X) & ((1 << 16) - 1)) | ((V) << 16)))
+#define SCM_ASYNC_THUNK(X) SCM_CELL_OBJECT_1 (X)