Subversion Repositories shark

Rev

Rev 436 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
432 giacomo 1
 
2
#include <ll/i386/hw-instr.h>
3
 
4
#include <linuxcomp.h>
5
 
6
#include <linux/time.h>
7
#include <linux/sched.h>
8
 
9
int nanosleep(const struct timespec *rqtp, struct timespec *rmtp);
10
 
11
signed long schedule_timeout(signed long timeout) {
12
 
13
  SYS_FLAGS f;
14
  struct timespec t;
15
 
16
  f = ll_fsave();
17
  sti();
18
 
19
  jiffies_to_timespec(timeout, &t);
20
 
21
  nanosleep(&t,NULL);
22
 
23
  cli();
24
  ll_frestore(f);
25
 
26
  return 0;
27
 
28
}