lkml.org 
[lkml]   [2021]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: XDP socket rings, and LKMM litmus tests
On Thu, Mar 04, 2021 at 04:44:34PM +0100, maranget wrote:
>
>
> > On 3 Mar 2021, at 21:22, Alan Stern <stern@rowland.harvard.edu> 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.

Good to know, and thank you!

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

True, but that would be outside of the LKMM proper, correct?

Thanx, Paul

\
 
 \ /
  Last update: 2021-03-04 20:09    [W:0.131 / U:0.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site