From fd8ae31c74975c8499983c9831bff2b136b98434 Mon Sep 17 00:00:00 2001 From: "Bjoern B. Brandenburg" Date: Fri, 28 Jan 2011 11:54:38 -0500 Subject: fdso: supply object type to constructor and destructor methods Passing the object type explicitly will enable generic lock constructors. --- litmus/fdso.c | 4 ++-- litmus/fmlp.c | 4 ++-- litmus/srp.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'litmus') diff --git a/litmus/fdso.c b/litmus/fdso.c index 85be716941d8..3bb331e471df 100644 --- a/litmus/fdso.c +++ b/litmus/fdso.c @@ -29,14 +29,14 @@ static const struct fdso_ops* fdso_ops[] = { static void* fdso_create(obj_type_t type) { if (fdso_ops[type]->create) - return fdso_ops[type]->create(); + return fdso_ops[type]->create(type); else return NULL; } static void fdso_destroy(obj_type_t type, void* obj) { - fdso_ops[type]->destroy(obj); + fdso_ops[type]->destroy(type, obj); } static int fdso_open(struct od_table_entry* entry, void* __user config) diff --git a/litmus/fmlp.c b/litmus/fmlp.c index a9a638576d69..1e4d544a9230 100644 --- a/litmus/fmlp.c +++ b/litmus/fmlp.c @@ -20,7 +20,7 @@ #ifdef CONFIG_FMLP -static void* create_fmlp_semaphore(void) +static void* create_fmlp_semaphore(obj_type_t type) { struct pi_semaphore* sem; int i; @@ -45,7 +45,7 @@ static int open_fmlp_semaphore(struct od_table_entry* entry, void* __user arg) return 0; } -static void destroy_fmlp_semaphore(void* sem) +static void destroy_fmlp_semaphore(obj_type_t type, void* sem) { /* XXX assert invariants */ kfree(sem); diff --git a/litmus/srp.c b/litmus/srp.c index cb577598ce3e..4601b7dba812 100644 --- a/litmus/srp.c +++ b/litmus/srp.c @@ -108,7 +108,7 @@ static void srp_add_prio(struct srp* srp, struct srp_priority* prio) } -static void* create_srp_semaphore(void) +static void* create_srp_semaphore(obj_type_t type) { struct srp_semaphore* sem; @@ -152,7 +152,7 @@ static noinline int open_srp_semaphore(struct od_table_entry* entry, void* __use return ret; } -static void destroy_srp_semaphore(void* sem) +static void destroy_srp_semaphore(obj_type_t type, void* sem) { /* XXX invariants */ atomic_dec(&srp_objects_in_use); -- cgit v1.2.2