All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] stopmachine semaphore to mutex
@ 2007-12-05  8:00 ` Daniel Walker
  0 siblings, 0 replies; 22+ messages in thread
From: Daniel Walker @ 2007-12-05  8:00 UTC (permalink / raw)
  To: akpm; +Cc: mingo, linux-kernel, linux, jonathan, matthias.kaehlcke

[-- Attachment #1: stopmachine_semaphore_to_mutex.patch --]
[-- Type: text/plain, Size: 1213 bytes --]

It's called stopmachine_mutex now, but it's a semaphore. So make it
a "struct mutex" .

Signed-off-by: Daniel Walker <dwalker@mvista.com>

---
 kernel/stop_machine.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Index: linux-2.6.23/kernel/stop_machine.c
===================================================================
--- linux-2.6.23.orig/kernel/stop_machine.c
+++ linux-2.6.23/kernel/stop_machine.c
@@ -29,7 +29,7 @@ enum stopmachine_state {
 static enum stopmachine_state stopmachine_state;
 static unsigned int stopmachine_num_threads;
 static atomic_t stopmachine_thread_ack;
-static DECLARE_MUTEX(stopmachine_mutex);
+static DEFINE_MUTEX(stopmachine_mutex);
 
 static int stopmachine(void *cpu)
 {
@@ -177,7 +177,7 @@ struct task_struct *__stop_machine_run(i
 	smdata.data = data;
 	init_completion(&smdata.done);
 
-	down(&stopmachine_mutex);
+	mutex_lock(&stopmachine_mutex);
 
 	/* If they don't care which CPU fn runs on, bind to any online one. */
 	if (cpu == NR_CPUS)
@@ -193,7 +193,7 @@ struct task_struct *__stop_machine_run(i
 		wake_up_process(p);
 		wait_for_completion(&smdata.done);
 	}
-	up(&stopmachine_mutex);
+	mutex_unlock(&stopmachine_mutex);
 	return p;
 }
 

-- 

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2007-12-08 19:58 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-05  8:00 [PATCH 1/3] stopmachine semaphore to mutex Daniel Walker
2007-12-05  8:00 ` Daniel Walker
2007-12-05  8:00 ` [PATCH 2/3] Amiga serial driver: port_write_mutex fixup Daniel Walker
2007-12-05  8:00 ` [PATCH 3/3] printer port driver: semaphore to mutex Daniel Walker
2007-12-06 10:23   ` Ingo Molnar
2007-12-06 16:34     ` Daniel Walker
2007-12-06 20:01       ` Remy Bohmer
2007-12-06 20:12         ` Daniel Walker
2007-12-06 20:40           ` Remy Bohmer
2007-12-06 20:05       ` Matthias Kaehlcke
2007-12-06 20:12         ` Remy Bohmer
2007-12-06 20:23           ` Daniel Walker
2007-12-07  7:40           ` Matthias Kaehlcke
2007-12-06 20:44       ` Ingo Molnar
2007-12-06 23:30       ` Kevin Winchester
2007-12-07  1:05         ` Daniel Walker
2007-12-07  1:29           ` Possible locking issue in viotape.c Kevin Winchester
2007-12-07  1:40             ` Daniel Walker
2007-12-08 18:17               ` Kevin Winchester
2007-12-08 18:22                 ` Daniel Walker
2007-12-08 19:19                   ` Kevin Winchester
2007-12-08 19:45                     ` Daniel Walker
2007-12-06 10:22 ` [PATCH 1/3] stopmachine semaphore to mutex Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.