diff options
author | Markus Armbruster <armbru@redhat.com> | 2006-06-25 08:47:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 13:01:04 -0400 |
commit | 59cc185ada89245204c658ebcf64422968736672 (patch) | |
tree | 042e46cfe90c2ad5b711e2791b05f73ab1fe7725 /drivers/oprofile/buffer_sync.c | |
parent | a2926b1449bcc3d348e2228114b04869dc2f3986 (diff) |
[PATCH] oprofile: convert from semaphores to mutexes
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Cc: Philippe Elie <phil.el@wanadoo.fr>
Cc: John Levon <levon@movementarian.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/oprofile/buffer_sync.c')
-rw-r--r-- | drivers/oprofile/buffer_sync.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c index b2e8e49c8659..43e521e99126 100644 --- a/drivers/oprofile/buffer_sync.c +++ b/drivers/oprofile/buffer_sync.c | |||
@@ -108,10 +108,10 @@ static int module_load_notify(struct notifier_block * self, unsigned long val, v | |||
108 | return 0; | 108 | return 0; |
109 | 109 | ||
110 | /* FIXME: should we process all CPU buffers ? */ | 110 | /* FIXME: should we process all CPU buffers ? */ |
111 | down(&buffer_sem); | 111 | mutex_lock(&buffer_mutex); |
112 | add_event_entry(ESCAPE_CODE); | 112 | add_event_entry(ESCAPE_CODE); |
113 | add_event_entry(MODULE_LOADED_CODE); | 113 | add_event_entry(MODULE_LOADED_CODE); |
114 | up(&buffer_sem); | 114 | mutex_unlock(&buffer_mutex); |
115 | #endif | 115 | #endif |
116 | return 0; | 116 | return 0; |
117 | } | 117 | } |
@@ -501,7 +501,7 @@ void sync_buffer(int cpu) | |||
501 | sync_buffer_state state = sb_buffer_start; | 501 | sync_buffer_state state = sb_buffer_start; |
502 | unsigned long available; | 502 | unsigned long available; |
503 | 503 | ||
504 | down(&buffer_sem); | 504 | mutex_lock(&buffer_mutex); |
505 | 505 | ||
506 | add_cpu_switch(cpu); | 506 | add_cpu_switch(cpu); |
507 | 507 | ||
@@ -550,5 +550,5 @@ void sync_buffer(int cpu) | |||
550 | 550 | ||
551 | mark_done(cpu); | 551 | mark_done(cpu); |
552 | 552 | ||
553 | up(&buffer_sem); | 553 | mutex_unlock(&buffer_mutex); |
554 | } | 554 | } |