X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=init.c;h=e47e5384119b369891119b54467ed558dfa082c3;hp=53aba18899c9129986b06786d8f35c0436526de4;hb=b647a293d70949b8c401772936a8000d10eb1bb9;hpb=971caeb177d3bc4f65fa31381bbfb83710bfc690 diff --git a/init.c b/init.c index 53aba188..e47e5384 100644 --- a/init.c +++ b/init.c @@ -12,6 +12,11 @@ #include #include #include +#ifdef CONFIG_VALGRIND_DEV +#include +#else +#define DRD_IGNORE_VAR(x) do { } while (0) +#endif #include "fio.h" #ifndef FIO_NO_HAVE_SHM_H @@ -333,6 +338,8 @@ static void free_shm(void) */ static int setup_thread_area(void) { + int i; + if (threads) return 0; @@ -376,6 +383,8 @@ static int setup_thread_area(void) #endif memset(threads, 0, max_jobs * sizeof(struct thread_data)); + for (i = 0; i < max_jobs; i++) + DRD_IGNORE_VAR(threads[i]); fio_debug_jobp = (unsigned int *)(threads + max_jobs); *fio_debug_jobp = -1; fio_warned = fio_debug_jobp + 1;