Re: XDP socket rings, and LKMM litmus tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On 3 Mar 2021, at 21:22, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> 
>>> 
>>> Local variables absolutely should be treated just like CPU registers, if 
>>> possible.  In fact, the compiler has the option of keeping local 
>>> variables stored in registers.
>>> 
>>> (Of course, things may get complicated if anyone writes a litmus test 
>>> that uses a pointer to a local variable,  Especially if the pointer 
>>> could hold the address of a local variable in one execution and a 
>>> shared variable in another!  Or if the pointer is itself a shared 
>>> variable and is dereferenced in another thread!)
>> 
>> Good point!  I did miss this complication.  ;-)
> 
> I suspect it wouldn't be so bad if herd7 disallowed taking addresses of 
> local variables.
> 
> 

Herd7 does disallow taking addresses of local variables.

However, such  tests can still be run on machine, provided function bodies are accepted by the C compiler.

—Luc





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux