diff options
author | Marius Vollmer <mvo@zagadka.de> | 2005-01-24 19:14:54 +0000 |
---|---|---|
committer | Marius Vollmer <mvo@zagadka.de> | 2005-01-24 19:14:54 +0000 |
commit | a54a94b39707f47a1f30533bcf7664094d65d073 (patch) | |
tree | 69a524a4c3fbb084e1e2fef05da61e1852700909 /libguile/hashtab.c | |
parent | be1b896c82273d97b79cd839d7281b46e54920f8 (diff) | |
download | guile-a54a94b39707f47a1f30533bcf7664094d65d073.tar.gz |
Threading changes.
Diffstat (limited to 'libguile/hashtab.c')
-rw-r--r-- | libguile/hashtab.c | 23 |
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; |