lkml.org 
[lkml]   [2009]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] kthreads: rework kthread_stop()
On Fri, 30 Jan 2009 13:33:58 +0100
Oleg Nesterov <oleg@redhat.com> wrote:

> int kthread_stop(struct task_struct *k)
> {
> + struct kthread *kthread;
> int ret;
>
> - mutex_lock(&kthread_stop_lock);
> -
> - /* It could exit after stop_info.k set, but before wake_up_process. */
> - get_task_struct(k);
> -
> trace_sched_kthread_stop(k);
> + get_task_struct(k);
>
> - /* Must init completion *before* thread sees kthread_stop_info.k */
> - init_completion(&kthread_stop_info.done);
> - smp_wmb();
> + kthread = to_kthread(k);
> + barrier(); /* it might have exited */

Why the change from smp_wmb() to plain old barrier()?


\
 
 \ /
  Last update: 2009-01-30 22:51    [W:0.063 / U:0.348 seconds]
©2003-2014 Jasper Spaans. Advertise on this site