mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
Kernel: Add a Linux-style getrandom syscall
The way it gets the entropy and blasts it to the buffer is pretty ugly IMHO, but it does work for now. (It should be replaced, by not truncating a u32.) It implements an (unused for now) flags argument, like Linux but instead of OpenBSD's. This is in case we want to distinguish between entropy sources or any other reason and have to implement a new syscall later. Of course, learn from Linux's struggles with entropy sourcing too.
This commit is contained in:
parent
0e61d84749
commit
7e4e092653
4 changed files with 26 additions and 1 deletions
|
@ -225,6 +225,7 @@ public:
|
|||
int sys$reboot();
|
||||
int sys$set_process_icon(int icon_id);
|
||||
int sys$realpath(const char* pathname, char*, size_t);
|
||||
ssize_t sys$getrandom(void*, size_t, unsigned int);
|
||||
|
||||
static void initialize();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue