summaryrefslogtreecommitdiff
path: root/test/test_sref_noref.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2014-11-17 22:07:16 +0100
committerRichard Braun <rbraun@sceen.net>2014-11-17 22:07:16 +0100
commit590a42d12b908d41fb587dfcf09489e59bd1ff1a (patch)
tree5c017d381e59d4c9ea112becedae4b0cb69452e0 /test/test_sref_noref.c
parent39b2de403498163ae5e1d8f545030ec5c2af895c (diff)
test: update calls
Adjust calls to functions that were recently changed.
Diffstat (limited to 'test/test_sref_noref.c')
-rw-r--r--test/test_sref_noref.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/test_sref_noref.c b/test/test_sref_noref.c
index 208eab25..394f4793 100644
--- a/test/test_sref_noref.c
+++ b/test/test_sref_noref.c
@@ -98,7 +98,7 @@ test_obj_noref(struct sref_counter *counter)
struct test_obj *obj;
obj = structof(counter, struct test_obj, ref_counter);
- vm_kmem_free((unsigned long)obj, sizeof(*obj));
+ vm_kmem_free(obj, sizeof(*obj));
printk("0 references, page released\n");
evcnt_info("sref_epoch");
evcnt_info("sref_dirty_zero");
@@ -113,7 +113,6 @@ test_run(void *arg)
struct thread **threads;
struct test_obj *obj;
volatile unsigned long loop;
- unsigned long va;
unsigned int i, nr_threads;
int error;
@@ -133,12 +132,11 @@ test_run(void *arg)
}
printk("allocating page\n");
- va = vm_kmem_alloc(sizeof(*obj));
+ obj = vm_kmem_alloc(sizeof(*obj));
- if (va == 0)
+ if (obj == NULL)
panic("vm_kmem_alloc: %s", error_str(ERROR_NOMEM));
- obj = (void *)va;
sref_counter_init(&obj->ref_counter, test_obj_noref);
printk("page allocated, 1 reference, publishing\n");