Sorry I was not on e-mail yesterday.
Indeed Timo did a good job explaining -- when you are
1) Inside ntoskrnl
2) In guranteed KernelMode context
It is better to use Nt for performance, as Zw provides no advantages.
Especially in the boot path, eliminating system calls is a good thing.
That's why we should prefer to use Nt whenever possible in system threads
or boot code. In fact not even Windows always respects this "rule"/benefit,
and we could do better as well.
As for coding style, indeed, double parantheses are something I'd like to
see. I also personally hate one-line if statements without braces, however
I understand that the coding style does not enforce that... HOWEVER, if you
see a file written 99% by one dev with 99% one style, it seems a bit
offputting to add a few extra lines of code that use a different style. The
point of coding guidelines is consistency.
Best regards,
Alex Ionescu
On Tue, Jul 8, 2014 at 5:43 PM, Hermès BÉLUSCA - MAÏTO <
hermes.belusca(a)sfr.fr> wrote:
Aaaahhhh.... Extra parentheses!!!!
-----Message d'origine-----
De : Ros-dev [mailto:ros-dev-bounces@reactos.org] De la part de Dmitry
Gorbachev
Envoyé : mercredi 9 juillet 2014 00:52
À : ReactOS Development List
Objet : Re: [ros-dev] [ros-diffs] [jgardou] 63700: [NTOSKRNL] - Use
ZwSetValueKey instead of NtSetValueKey - Properly probe and copy parameters
when NtSetValueKey is called from UMode CORE-7738 #resolve #comment fixed
in
r63700
Maybe he is referring to this:
+ if (Data && !DataSize)
Some kernel code use
if (!(ActiveTimers) || !(Timers))
or
if ((!CmpNoWrite) && (!CmpHoldLazyFlush))
Dmitry
_______________________________________________
Ros-dev mailing list
Ros-dev(a)reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev
_______________________________________________
Ros-dev mailing list
Ros-dev(a)reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev