aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/locking.c
diff options
context:
space:
mode:
Diffstat (limited to 'litmus/locking.c')
-rw-r--r--litmus/locking.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/litmus/locking.c b/litmus/locking.c
index d39afaeefffe..8ee6a6b68009 100644
--- a/litmus/locking.c
+++ b/litmus/locking.c
@@ -5,7 +5,7 @@
5#include <litmus/sched_plugin.h> 5#include <litmus/sched_plugin.h>
6#include <litmus/trace.h> 6#include <litmus/trace.h>
7 7
8static void* create_generic_lock(obj_type_t type); 8static int create_generic_lock(void** obj_ref, obj_type_t type, void* __user arg);
9static int open_generic_lock(struct od_table_entry* entry, void* __user arg); 9static int open_generic_lock(struct od_table_entry* entry, void* __user arg);
10static int close_generic_lock(struct od_table_entry* entry); 10static int close_generic_lock(struct od_table_entry* entry);
11static void destroy_generic_lock(obj_type_t type, void* sem); 11static void destroy_generic_lock(obj_type_t type, void* sem);
@@ -28,16 +28,15 @@ static inline struct litmus_lock* get_lock(struct od_table_entry* entry)
28 return (struct litmus_lock*) entry->obj->obj; 28 return (struct litmus_lock*) entry->obj->obj;
29} 29}
30 30
31static void* create_generic_lock(obj_type_t type) 31static int create_generic_lock(void** obj_ref, obj_type_t type, void* __user arg)
32{ 32{
33 struct litmus_lock* lock; 33 struct litmus_lock* lock;
34 int err; 34 int err;
35 35
36 err = litmus->allocate_lock(&lock, type); 36 err = litmus->allocate_lock(&lock, type, arg);
37 if (err == 0) 37 if (err == 0)
38 return lock; 38 *obj_ref = lock;
39 else 39 return err;
40 return NULL;
41} 40}
42 41
43static int open_generic_lock(struct od_table_entry* entry, void* __user arg) 42static int open_generic_lock(struct od_table_entry* entry, void* __user arg)