options/posix: stub itimer functions

This commit is contained in:
Arsen 2020-05-26 17:53:34 +02:00 committed by Arsen Arsenović
parent ab5d124a3a
commit e9aaa04d3f
No known key found for this signature in database
GPG key ID: 4A3FCA65C153F43E
9 changed files with 47 additions and 0 deletions

15
abis/linux/x86_64/time.h Normal file
View file

@ -0,0 +1,15 @@
#ifndef _ABIBITS_TIME_H
#define _ABIBITS_TIME_H
#include <bits/posix/timeval.h>
struct itimerval {
struct timeval it_interval; /* Interval for periodic timer */
struct timeval it_value; /* Time until next expiration */
};
#define ITIMER_REAL 0
#define ITIMER_VIRTUAL 1
#define ITIMER_PROF 2
#endif // _ABIBITS_TIME_H

15
abis/mlibc/time.h Normal file
View file

@ -0,0 +1,15 @@
#ifndef _ABIBITS_TIME_H
#define _ABIBITS_TIME_H
#include <bits/posix/timeval.h>
struct itimerval {
struct timeval it_interval; /* Interval for periodic timer */
struct timeval it_value; /* Time until next expiration */
};
#define ITIMER_REAL 0
#define ITIMER_VIRTUAL 1
#define ITIMER_PROF 2
#endif // _ABIBITS_TIME_H

View file

@ -41,3 +41,11 @@ int timerisset(struct timeval *tvp) {
__builtin_unreachable();
}
int getitimer(int, struct itimerval *) {
__ensure(!"Not implemented");
__builtin_unreachable();
}
int setitimer(int, const struct itimerval *, struct itimerval *) {
__ensure(!"Not implemented");
__builtin_unreachable();
}

View file

@ -24,6 +24,10 @@ int timerisset(struct timeval *tvp);
//TODO: implement timercmp as a macro
//int timercmp(struct timeval *a, struct timeval *b, CMP);
int getitimer(int which, struct itimerval *curr_value);
int setitimer(int which, const struct itimerval *new_value,
struct itimerval *old_value);
#ifdef __cplusplus
}
#endif

View file

@ -0,0 +1 @@
../../../../abis/mlibc/time.h

View file

@ -0,0 +1 @@
../../../../abis/linux/x86_64/time.h

View file

@ -0,0 +1 @@
../../../../abis/mlibc/time.h

View file

@ -0,0 +1 @@
../../../../abis/mlibc/time.h

View file

@ -0,0 +1 @@
../../../../abis/mlibc/time.h