summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJennifer Averett <jennifer.averett@oarcorp.com>2012-04-19 14:10:20 -0500
committerJennifer Averett <jennifer.averett@oarcorp.com>2012-04-19 14:10:20 -0500
commitcb6ffcd6cfde7e7158df61726fcba840649f6b30 (patch)
treebcabe5c17f9c31777d7003974fd6949f3822e2f6
parentMerged rtems-bsd-uma.c back into uma_core.c (diff)
downloadrtems-libbsd-cb6ffcd6cfde7e7158df61726fcba840649f6b30.tar.bz2
Added in uma_find_refcnt() and vtoslab()
The vtoslab returns NULL for now which will cause a fault when the code runs.
-rw-r--r--freebsd/vm/uma_core.c2
-rw-r--r--freebsd/vm/uma_int.h6
2 files changed, 5 insertions, 3 deletions
diff --git a/freebsd/vm/uma_core.c b/freebsd/vm/uma_core.c
index 5e2b2cde..f85f28fa 100644
--- a/freebsd/vm/uma_core.c
+++ b/freebsd/vm/uma_core.c
@@ -3043,7 +3043,6 @@ uma_prealloc(uma_zone_t zone, int items)
ZONE_UNLOCK(zone);
}
-#ifndef __rtems__
/* See uma.h */
u_int32_t *
uma_find_refcnt(uma_zone_t zone, void *item)
@@ -3063,7 +3062,6 @@ uma_find_refcnt(uma_zone_t zone, void *item)
refcnt = &slabref->us_freelist[idx].us_refcnt;
return refcnt;
}
-#endif /* __rtems__ */
/* See uma.h */
void
diff --git a/freebsd/vm/uma_int.h b/freebsd/vm/uma_int.h
index 16115201..f3a99d78 100644
--- a/freebsd/vm/uma_int.h
+++ b/freebsd/vm/uma_int.h
@@ -391,10 +391,10 @@ hash_sfind(struct uma_hash *hash, u_int8_t *data)
return (NULL);
}
-#ifndef __rtems__
static __inline uma_slab_t
vtoslab(vm_offset_t va)
{
+#ifndef __rtems__
vm_page_t p;
uma_slab_t slab;
@@ -405,8 +405,12 @@ vtoslab(vm_offset_t va)
return (slab);
else
return (NULL);
+#else /* __rtems__ */
+ return (NULL); /* XXX - FIX THIS!!! */
+#endif /* __rtems__ */
}
+#ifndef __rtems__
static __inline void
vsetslab(vm_offset_t va, uma_slab_t slab)
{