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: Marin Ramesa
Subject: Re: [PATCH 3/4] device/chario.c: qualify pointers that access their dereferenced values under locks with __restrict__
Date: Wed, 18 Dec 2013 08:51:23 +0100

On 18.12.2013 00:17:38, Richard Braun wrote:
> 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.

Thanks for the advice, I will have it mind when I work in the future. 
Making patches and having them reviewed has been a good experience, I'm 
learning a lot by doing this.


reply via email to

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