diff --git a/ulib/system/system.c b/ulib/system/system.c index 7da9c67..b954d67 100644 --- a/ulib/system/system.c +++ b/ulib/system/system.c @@ -39,3 +39,7 @@ int32_t schedrelease(void) { int32_t devctl(Dev_t *devh, uint64_t cmd, uint8_t *buffer, size_t len, uint64_t extra) { return syscall(SYS_DEVCTL, (uint64_t)devh, cmd, (uint64_t)buffer, (uint64_t)len, (uint64_t)extra, 0); } + +int32_t rand(void) { + return syscall(SYS_RAND, 0, 0, 0, 0, 0, 0); +} diff --git a/ulib/system/system.h b/ulib/system/system.h index c48f6b4..1d7a611 100644 --- a/ulib/system/system.h +++ b/ulib/system/system.h @@ -13,5 +13,6 @@ int32_t mman_map(uint8_t *addr, size_t size, uint64_t prot, uint64_t flags, uint int32_t mman_unmap(uint8_t *addr); int32_t schedrelease(void); int32_t devctl(Dev_t *devh, uint64_t cmd, uint8_t *buffer, size_t len, uint64_t extra); +int32_t rand(void); #endif // ULIB_SYSTEM_SYSTEM_H_