ulib Time utilities, expose time() syscall
This commit is contained in:
@ -138,3 +138,7 @@ int32_t dev_stat(DevStat *devstatbuf, size_t idx) {
|
||||
int32_t dev_cmd(Dev_t *dev, uint64_t cmd, void *buf, size_t len, void *extra) {
|
||||
return syscall(SYS_DEV_CMD, (uint64_t)dev, (uint64_t)cmd, (uint64_t)buf, (uint64_t)len, (uint64_t)extra, 0);
|
||||
}
|
||||
|
||||
int32_t time(Time *time) {
|
||||
return syscall(SYS_TIME, (uint64_t)time, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
#include <sysdefs/dev.h>
|
||||
#include <sysdefs/proc.h>
|
||||
#include <sysdefs/fs.h>
|
||||
#include <sysdefs/time.h>
|
||||
|
||||
void debugprint(const char *string);
|
||||
int32_t mman_map(uint8_t *addr, size_t size, uint64_t prot, uint64_t flags, uint8_t **out);
|
||||
@ -41,5 +42,6 @@ int32_t dev_gethandle(Dev_t *dev, char *name);
|
||||
int32_t dev_listsize(void);
|
||||
int32_t dev_stat(DevStat *devstatbuf, size_t idx);
|
||||
int32_t dev_cmd(Dev_t *dev, uint64_t cmd, void *buf, size_t len, void *extra);
|
||||
int32_t time(Time *time);
|
||||
|
||||
#endif // ULIB_SYSTEM_SYSTEM_H_
|
||||
|
||||
Reference in New Issue
Block a user