Subversion Repositories HelenOS-historic

Rev

Rev 1449 | Rev 1453 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1449 Rev 1452
Line 29... Line 29...
29
#include <sys/time.h>
29
#include <sys/time.h>
30
#include <unistd.h>
30
#include <unistd.h>
31
#include <ipc/ipc.h>
31
#include <ipc/ipc.h>
32
#include <stdio.h>
32
#include <stdio.h>
33
#include <arch/barrier.h>
33
#include <arch/barrier.h>
-
 
34
#include <unistd.h>
-
 
35
#include <atomic.h>
-
 
36
#include <futex.h>
34
 
37
 
35
#include <sysinfo.h>
38
#include <sysinfo.h>
36
#include <as.h>
39
#include <as.h>
37
#include <ddi.h>
40
#include <ddi.h>
38
 
41
 
Line 91... Line 94...
91
    } else
94
    } else
92
        tv->tv_sec = s1;
95
        tv->tv_sec = s1;
93
 
96
 
94
    return 0;
97
    return 0;
95
}
98
}
-
 
99
 
-
 
100
/** Wait unconditionally for specified miliseconds */
-
 
101
void usleep(unsigned long usec)
-
 
102
{
-
 
103
    atomic_t futex = FUTEX_INITIALIZER;
-
 
104
 
-
 
105
    futex_initialize(&futex,0);
-
 
106
    futex_down_timeout(&futex, usec, 0);
-
 
107
}