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
#else
  use hlt
#endif

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."


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to