[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4BAA86E8.5090108@gmail.com>
Date: Wed, 24 Mar 2010 22:40:56 +0100
From: Jiri Slaby <jirislaby@...il.com>
To: Pavel Machek <pavel@....cz>
CC: linux-pm@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
Nigel Cunningham <ncunningham@...a.org.au>,
"Rafael J. Wysocki" <rjw@...k.pl>
Subject: Re: [RFC 09/15] PM / Hibernate: user, implement user_ops writer
On 03/24/2010 09:42 PM, Pavel Machek wrote:
>> + if (test_bit(TODO_CLOSED, to_do_flags))
>> + return -EIO;
>> +
>> + to_do_buf = buf;
>> + wmb();
>> + set_bit(TODO_WORK, to_do_flags);
>> + wake_up_interruptible(&to_do_wait);
>
> Uhuh, open-coded barriers... these need to be commented, and I guess
> you just should not play this kind of trickery.
It's just to ensure the to_do_buf store is not reordered with the
set_bit. I wanted to avoid locks as too heavy tools here.
thanks,
--
js
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists