summaryrefslogtreecommitdiff
path: root/test/test_sref_noref.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_sref_noref.c')
-rw-r--r--test/test_sref_noref.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_sref_noref.c b/test/test_sref_noref.c
index f556d32..40f1d8f 100644
--- a/test/test_sref_noref.c
+++ b/test/test_sref_noref.c
@@ -37,6 +37,7 @@
#include <kern/condition.h>
#include <kern/error.h>
+#include <kern/init.h>
#include <kern/kmem.h>
#include <kern/macros.h>
#include <kern/mutex.h>
@@ -142,7 +143,7 @@ test_run(void *arg)
panic("vm_kmem_alloc: %s", error_str(ERROR_NOMEM));
}
- sref_counter_init(&obj->ref_counter, NULL, test_obj_noref);
+ sref_counter_init(&obj->ref_counter, 1, NULL, test_obj_noref);
printf("page allocated, 1 reference, publishing\n");
@@ -168,7 +169,7 @@ test_run(void *arg)
kmem_free(threads, sizeof(*threads) * nr_threads);
}
-void
+void __init
test_setup(void)
{
struct thread_attr attr;