This commit is contained in:
2026-05-18 07:07:19 -06:00
parent 11bfd20e5d
commit 4ef6788029
5 changed files with 103 additions and 3 deletions
+24
View File
@@ -0,0 +1,24 @@
#include "gyehoek.h"
#include "obarray.h"
typedef struct {
unsigned long hash;
scm_t_bits key;
} scm_t_weak_entry;
struct weak_entry_data {
scm_t_weak_entry *in;
scm_t_weak_entry *out;
};
typedef struct {
scm_t_weak_entry *entries; /* the data */
scm_i_pthread_mutex_t lock; /* the lock */
unsigned long size; /* total number of slots. */
unsigned long n_items; /* number of items in set */
unsigned long lower; /* when to shrink */
unsigned long upper; /* when to grow */
int size_index; /* index into hashset_size */
int min_size_index; /* minimum size_index */
} scm_t_weak_set;