--- gvpe/src/util.h 2013/07/17 05:34:17 1.32 +++ gvpe/src/util.h 2013/07/17 16:40:58 1.33 @@ -37,8 +37,6 @@ #include #include -#include - #include "gettext.h" #include "slog.h" @@ -135,6 +133,16 @@ /*****************************************************************************/ +void rand_fill (void *data, int len); + +template +inline void rand_fill (T &t) +{ + rand_fill (&t, sizeof (T)); +} + +/*****************************************************************************/ + // run work_cb in another thread, call done_cb in main thread when finished // only one work_cb will execute at any one time. void async (callback work_cb, callback done_cb);