Re: Suspend 2 merge: 22/51: Suspend2 lowlevel code.

Pavel Machek
2004-11-27T04:17:47Z

Hi!

> +#include "../../../kernel/power/suspend.h"

Ouch.

> +#define loaddebug(thread,register) > + __asm__("movl %0,%%db" #register > + : /* no output */ > + :"r" ((thread)->debugreg[register]))

This should be already defined somewhere...

> + * Note that the context and timing of this function is pretty critical.
> + * With a minimal amount of things going on in the caller and in here, gcc
> + * does a good job of being just a dumb compiler. Watch the assembly output
> + * if anything changes, though, and make sure everything is going in the right
> + * place.

You should include assembly source (unless you can test all the compilers...). Feel free
to include C version, too, but #ifdef it out.

Pavel

--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms