From 53e4380b1f39577698180697ec9caa4d646468c1 Mon Sep 17 00:00:00 2001 From: asterix Date: Fri, 9 Feb 2007 17:58:09 +0000 Subject: [PATCH] Add macro CONFIG_RANDPOOL_TIMER. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@775 38d2e660-2303-0410-9eaa-f027e97ec537 --- algos/randpool.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/algos/randpool.c b/algos/randpool.c index 224fb456..029f5ba1 100755 --- a/algos/randpool.c +++ b/algos/randpool.c @@ -13,8 +13,8 @@ /*#* *#* $Log$ - *#* Revision 1.8 2007/02/09 17:27:09 asterix - *#* Write randpool_getN. + *#* Revision 1.9 2007/02/09 17:58:09 asterix + *#* Add macro CONFIG_RANDPOOL_TIMER. *#* *#* Revision 1.6 2007/02/09 09:24:38 asterix *#* Typos. Add data_len in randpool_add and n_byte in randpool_push pototypes. @@ -35,7 +35,12 @@ #include //sprintf(); - +//TODO: +#if CONFIG_RANDPOOL_TIMER + #define TIMER() timer_clock() +#else + #define TIMER() 0 //TODO: +#endif /* * Insert bytes in entropy pool, making a XOR of bytes present @@ -104,7 +109,7 @@ static void randpool_stir(EntropyPool *pool) */ void randpool_add(EntropyPool *pool, void *data, size_t data_len, size_t entropy) { - ticks_t event = timer_clock(); + ticks_t event = TIMER(); uint32_t delta; uint8_t sep[] = "\xaa\xaa\xaa\xaa"; // ?? @@ -140,7 +145,7 @@ void randpool_init(EntropyPool *pool) memset(pool, 0, sizeof(EntropyPool)); pool->pos_get = CONFIG_MD2_BLOCK_LEN; - pool->last_counter = timer_clock(); + pool->last_counter = TIMER(); //TODO: inizializzazione del timer di sistema. -- 2.25.1