mirror of
https://github.com/ilyakooo0/Idris-dev.git
synced 2024-09-11 08:55:23 +03:00
Moved idris_usleep to idris_stdfgn
This commit is contained in:
parent
0fd2dab506
commit
33be12cabe
@ -1158,16 +1158,6 @@ void idris_disableBuffering(void) {
|
||||
setvbuf(stdout, NULL, _IONBF, 0);
|
||||
}
|
||||
|
||||
#ifndef SEL4
|
||||
int idris_usleep(int usec) {
|
||||
struct timespec t;
|
||||
t.tv_sec = usec / 1000000;
|
||||
t.tv_nsec = (usec % 1000000) * 1000;
|
||||
|
||||
return nanosleep(&t, NULL);
|
||||
}
|
||||
#endif // SEL4
|
||||
|
||||
void stackOverflow(void) {
|
||||
fprintf(stderr, "Stack overflow");
|
||||
exit(-1);
|
||||
|
@ -507,10 +507,6 @@ const char *idris_getArg(int i);
|
||||
// disable stdin/stdout buffering
|
||||
void idris_disableBuffering(void);
|
||||
|
||||
#ifndef SEL4
|
||||
int idris_usleep(int usec);
|
||||
#endif // SEL4
|
||||
|
||||
// Handle stack overflow.
|
||||
// Just reports an error and exits.
|
||||
|
||||
|
@ -228,6 +228,16 @@ VAL idris_clock(VM* vm) {
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifndef SEL4
|
||||
int idris_usleep(int usec) {
|
||||
struct timespec t;
|
||||
t.tv_sec = usec / 1000000;
|
||||
t.tv_nsec = (usec % 1000000) * 1000;
|
||||
|
||||
return nanosleep(&t, NULL);
|
||||
}
|
||||
#endif // SEL4
|
||||
|
||||
VAL idris_mkFileError(VM* vm) {
|
||||
VAL result;
|
||||
switch(errno) {
|
||||
|
@ -54,6 +54,9 @@ char* getEnvPair(int i);
|
||||
|
||||
VAL idris_time();
|
||||
VAL idris_clock(VM* vm);
|
||||
#ifndef SEL4
|
||||
int idris_usleep(int usec);
|
||||
#endif // SEL4
|
||||
|
||||
void idris_forceGC();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user