bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH 3/4] device/chario.c: qualify pointers that access their dere


From: Richard Braun
Subject: Re: [PATCH 3/4] device/chario.c: qualify pointers that access their dereferenced values under locks with __restrict__
Date: Wed, 18 Dec 2013 00:17:38 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Dec 17, 2013 at 03:58:27PM +0100, Marin Ramesa wrote:
> Qualifier __restrict__ means that only the pointer under __restrict__ will be 
> used
> to access dereferenced values. So if a code is under locks and no function is 
> called
> in the critical section with pointer as an argument, it's safe to use 
> __restrict__.
> This allows the compiler to make optimizations.

Marin, to begin with, I'd like to thank you for the work you've done so
far. It's tedious and not something people usually want to do, and yet
it's important. But please, learn from experience and don't try to
overengineer. Keep it simple, limit yourself to cleaning the code, not
making it more complicated (and then dirtier) than it could be.

-- 
Richard Braun



reply via email to

[Prev in Thread] Current Thread [Next in Thread]