Subversion Repositories shark

Rev

Rev 437 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed


#include <ll/i386/hw-instr.h>

#include <linuxcomp.h>

#include <linux/time.h>
#include <linux/sched.h>

int nanosleep(const struct timespec *rqtp, struct timespec *rmtp);

signed long schedule_timeout(signed long timeout) {

  SYS_FLAGS f;
  struct timespec t;

  f = ll_fsave();
  sti();

  jiffies_to_timespec(timeout, &t);

  nanosleep(&t,NULL);

  cli();
  ll_frestore(f);

  return 0;

}