[lkml]   [2003]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Inconsistency in changing the state of task ??
On Thu, 2003-03-06 at 08:11, wrote:

> Thanks Robert for the reply.
> But I notice that __set_current_state() is same as current->state. So, I
> didn't understand the safety factor on using __set_current_state( ).

There is no safety with __set_current_state(). It is just an

The safety comes from set_current_state(), which ensures memory

This is an issue not just on SMP, but on a weakly ordered processor like

> Also why should I use __set_current_state() instead of set_current_state()
> when the later is SMP safe.

You only use __set_current_state() if you know you do not need to ensure
memory ordering constraints.

Robert Love

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:33    [W:0.037 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site