diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2013-01-18 15:21:02 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2013-01-18 15:21:02 -0500 |
commit | 84aa3706d63edda13560ff812740cac0adf744e1 (patch) | |
tree | 1af6c007c9cc9a4b2d2d5f9041759107fc7ee632 | |
parent | a4bd234fef9230dffa4fa47ff4d42ddbe9f3d7db (diff) |
Minor changes to lock proc
-rw-r--r-- | include/litmus/locking.h | 2 | ||||
-rw-r--r-- | litmus/locking.c | 2 | ||||
-rw-r--r-- | litmus/rsm_lock.c | 6 |
3 files changed, 6 insertions, 4 deletions
diff --git a/include/litmus/locking.h b/include/litmus/locking.h index 22f7372bf621..cc62fa0cb044 100644 --- a/include/litmus/locking.h +++ b/include/litmus/locking.h | |||
@@ -24,7 +24,7 @@ static inline struct task_struct* top_priority(struct binheap* handle) { | |||
24 | void print_hp_waiters(struct binheap_node* n, int depth); | 24 | void print_hp_waiters(struct binheap_node* n, int depth); |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #define LOCK_NAME_LEN 16 | 27 | #define LOCK_NAME_LEN 32 |
28 | struct litmus_lock_proc_ops { | 28 | struct litmus_lock_proc_ops { |
29 | void (*add)(struct litmus_lock *l); | 29 | void (*add)(struct litmus_lock *l); |
30 | void (*remove)(struct litmus_lock *l); | 30 | void (*remove)(struct litmus_lock *l); |
diff --git a/litmus/locking.c b/litmus/locking.c index b7f02f0e6b24..81a1fc9bdd12 100644 --- a/litmus/locking.c +++ b/litmus/locking.c | |||
@@ -66,7 +66,7 @@ static int create_generic_lock(void** obj_ref, obj_type_t type, void* __user ar | |||
66 | lock->ident = atomic_inc_return(&lock_id_gen); | 66 | lock->ident = atomic_inc_return(&lock_id_gen); |
67 | *obj_ref = lock; | 67 | *obj_ref = lock; |
68 | 68 | ||
69 | TRACE_CUR("Lock %d created. Type = %d\n.", lock->ident, type); | 69 | TRACE_CUR("Lock %d (%p) created. Type = %d\n.", lock->ident, lock, type); |
70 | 70 | ||
71 | if (lock->proc && lock->proc->add) { | 71 | if (lock->proc && lock->proc->add) { |
72 | lock->proc->add(lock); | 72 | lock->proc->add(lock); |
diff --git a/litmus/rsm_lock.c b/litmus/rsm_lock.c index ae6dd3fb237b..dcf44a848cbb 100644 --- a/litmus/rsm_lock.c +++ b/litmus/rsm_lock.c | |||
@@ -531,6 +531,8 @@ out: | |||
531 | #endif | 531 | #endif |
532 | unlock_global_irqrestore(dgl_lock, flags); | 532 | unlock_global_irqrestore(dgl_lock, flags); |
533 | 533 | ||
534 | TRACE_TASK(t, "-- Freed lock %d --\n", l->ident); | ||
535 | |||
534 | return err; | 536 | return err; |
535 | } | 537 | } |
536 | 538 | ||
@@ -803,7 +805,7 @@ static int rsm_proc_print(char *page, char **start, off_t off, int count, int *e | |||
803 | } | 805 | } |
804 | 806 | ||
805 | if (locked) { | 807 | if (locked) { |
806 | w = scnprintf(next, size, "%s:\n", mutex->litmus_lock.name); | 808 | w = scnprintf(next, size, "%s (mutex: %p, data: %p):\n", mutex->litmus_lock.name, mutex, data); |
807 | size -= w; | 809 | size -= w; |
808 | next += w; | 810 | next += w; |
809 | 811 | ||
@@ -903,7 +905,7 @@ static int rsm_proc_print(char *page, char **start, off_t off, int count, int *e | |||
903 | 905 | ||
904 | static void rsm_proc_add(struct litmus_lock* l) | 906 | static void rsm_proc_add(struct litmus_lock* l) |
905 | { | 907 | { |
906 | snprintf(l->name, LOCK_NAME_LEN, "rsm-%d", l->ident); | 908 | snprintf(l->name, LOCK_NAME_LEN, "rsm-%d_%p", l->ident, l); |
907 | 909 | ||
908 | l->proc_entry = litmus_add_proc_lock(l, rsm_proc_print); | 910 | l->proc_entry = litmus_add_proc_lock(l, rsm_proc_print); |
909 | } | 911 | } |