diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-03-08 11:58:06 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-03-08 11:58:06 +0100 |
commit | 3995fb8aee32783d3386d82a5a6910a86c7bf38c (patch) | |
tree | 0c83e20d08a82d84bbbc1d0e252bd39c903c2d7b /src/kernel/core/worker.c | |
parent | 6c50033dfb7a4dc7094d96f9339459b08b4efac9 (diff) | |
download | kogata-3995fb8aee32783d3386d82a5a6910a86c7bf38c.tar.gz kogata-3995fb8aee32783d3386d82a5a6910a86c7bf38c.zip |
Add two entropy sources. Warning: prng is not secure in any way, I have no knowlege of such things.
Diffstat (limited to 'src/kernel/core/worker.c')
-rw-r--r-- | src/kernel/core/worker.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/kernel/core/worker.c b/src/kernel/core/worker.c index e367115..cb7bf34 100644 --- a/src/kernel/core/worker.c +++ b/src/kernel/core/worker.c @@ -2,6 +2,7 @@ #include <btree.h> #include <mutex.h> #include <malloc.h> +#include <prng.h> static uint64_t time = 0; static uint64_t next_task_time = UINT64_MAX; @@ -58,6 +59,8 @@ void worker_thread(void* x) { mutex_unlock(&tasks_mutex); if (t != 0) { + prng_add_entropy((uint8_t*)&t, sizeof(t)); + // do task :-) t->fun(t->data); free(t); |