[Top][All Lists]

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

Re: [PATCH] Enable grub_cpu_idle for i386 to halt the CPU

From: Robert Millan
Subject: Re: [PATCH] Enable grub_cpu_idle for i386 to halt the CPU
Date: Tue, 12 Aug 2008 12:47:48 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On Tue, Aug 12, 2008 at 11:10:37AM +0200, Robert Millan wrote:
> > +void
> > +grub_cpu_idle ()
> > +{
> > +  struct timespec req={0,1};
> > +  nanosleep (&req, NULL);
> > +}
> grub_cpu_idle is intended to be a (cpu-independant) primitive, not a stub for
> nanosleep.

Ah, sorry.  I notice you're writing user code here.

This would be best kept as an inline in the same file that defines
grub_cpu_idle for real GRUB, something like:

#ifdef GRUB_UTIL
  use nanosleep
  use hlt

In include/grub/i386/time.h.

Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."

reply via email to

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