aboutsummaryrefslogtreecommitdiffstats
path: root/litmus
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2008-09-11 21:54:44 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2008-09-11 21:54:44 -0400
commitdcf7ba77000800ab4e16b17b4f65abd05aebcbdd (patch)
treef6606cd6f5af694bb9df1d893c13f07c06b4fb6a /litmus
parentddb418f16e5a6e75e3d32cac31251b51e8bb82e8 (diff)
binomial heaps: reuse heap_node slab for allocations
We already have a heap_node slab in litmus.c. We can reuse it for the other allocations. This patch also fixes a misnaming of heap_node_alloc/free.
Diffstat (limited to 'litmus')
-rw-r--r--litmus/litmus.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/litmus/litmus.c b/litmus/litmus.c
index 979985e4a3..c64a8f6aaa 100644
--- a/litmus/litmus.c
+++ b/litmus/litmus.c
@@ -32,6 +32,16 @@ static DEFINE_SPINLOCK(sched_sig_list_lock);
32 32
33static struct kmem_cache * heap_node_cache; 33static struct kmem_cache * heap_node_cache;
34 34
35struct heap_node* heap_node_alloc(int gfp_flags)
36{
37 return kmem_cache_alloc(heap_node_cache, gfp_flags);
38}
39
40void heap_node_free(struct heap_node* hn)
41{
42 kmem_cache_free(heap_node_cache, hn);
43}
44
35/* 45/*
36 * sys_set_task_rt_param 46 * sys_set_task_rt_param
37 * @pid: Pid of the task which scheduling parameters must be changed 47 * @pid: Pid of the task which scheduling parameters must be changed