Tidy dcb_free (prefer use of dcb_close) and remove from test code; add good random number generator.
This commit is contained in:
@ -30,6 +30,7 @@
|
||||
#include <sys/time.h>
|
||||
#include "skygw_utils.h"
|
||||
#include <atomic.h>
|
||||
#include <random.h>
|
||||
|
||||
#if defined(MLIST)
|
||||
|
||||
@ -1265,7 +1266,7 @@ void acquire_lock(
|
||||
misscount += 1;
|
||||
if (misscount > 10)
|
||||
{
|
||||
ts1.tv_nsec = (rand()%misscount)*1000000;
|
||||
ts1.tv_nsec = (random_jkiss()%misscount)*1000000;
|
||||
nanosleep(&ts1, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user