summaryrefslogtreecommitdiff
path: root/libguile/hashtab.c
diff options
context:
space:
mode:
authorMarius Vollmer <mvo@zagadka.de>2005-01-24 19:14:54 +0000
committerMarius Vollmer <mvo@zagadka.de>2005-01-24 19:14:54 +0000
commita54a94b39707f47a1f30533bcf7664094d65d073 (patch)
tree69a524a4c3fbb084e1e2fef05da61e1852700909 /libguile/hashtab.c
parentbe1b896c82273d97b79cd839d7281b46e54920f8 (diff)
downloadguile-a54a94b39707f47a1f30533bcf7664094d65d073.tar.gz
Threading changes.
Diffstat (limited to 'libguile/hashtab.c')
-rw-r--r--libguile/hashtab.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/libguile/hashtab.c b/libguile/hashtab.c
index 453a6742b..a1d6bb48f 100644
--- a/libguile/hashtab.c
+++ b/libguile/hashtab.c
@@ -30,6 +30,27 @@
#include "libguile/hashtab.h"
+static void
+loop (void)
+{
+ int loop = 1;
+ printf ("looping %d\n", getpid ());
+ while (loop)
+ ;
+}
+
+void
+scm_i_hashtable_decrement (SCM h)
+{
+ scm_t_hashtable *t = SCM_HASHTABLE (h);
+ if (t->n_items == 0)
+ {
+ printf ("hashtab underflow\n");
+ loop ();
+ }
+ t->n_items--;
+}
+
/* NOTES
*
* 1. The current hash table implementation uses weak alist vectors
@@ -145,7 +166,7 @@ scm_i_rehash (SCM table,
SCM_HASHTABLE (table)->closure = closure;
}
SCM_HASHTABLE (table)->size_index = i;
-
+
new_size = hashtable_size[i];
if (i <= SCM_HASHTABLE (table)->min_size_index)
SCM_HASHTABLE (table)->lower = 0;