lkml.org 
[lkml]   [2013]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC v2 1/2] qspinlock: Introducing a 4-byte queue spinlock implementation
On 08/29/2013 01:03 PM, Alexander Fyodorov wrote:
> 29.08.2013, 19:25, "Waiman Long"<waiman.long@hp.com>:
>> What I have been thinking is to set a flag in an architecture specific
>> header file to tell if the architecture need a memory barrier. The
>> generic code will then either do a smp_mb() or barrier() depending on
>> the presence or absence of the flag. I would prefer to do more in the
>> generic code, if possible.
> If you use flag then you'll have to check it manually. It is better to add new smp_mb variant, I suggest calling it smp_mb_before_store(), and define it to barrier() on x86.

I am sorry that I was not clear in my previous mail. I mean a flag/macro
for compile time checking rather than doing runtime checking.

Regards,
Longman


\
 
 \ /
  Last update: 2013-08-30 05:41    [W:0.079 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site