X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fthreading%2Flib.c;h=55084a2ba5477f781f34dc02cb2203dbe28d2001;hp=6456958571e52f7991f6ef065ec5e26bf31e6138;hb=2899f1fb283094d96a13bc50fff5c03f2d85cdba;hpb=caf4f0d199647715e398aa87ad4b35dd26413c92;ds=sidebyside diff --git a/direct/timothy_tests/threading/lib.c b/direct/timothy_tests/threading/lib.c index 6456958..55084a2 100644 --- a/direct/timothy_tests/threading/lib.c +++ b/direct/timothy_tests/threading/lib.c @@ -12,7 +12,7 @@ */ #include "lib.h" -static unsigned int *p_counter; +static volatile unsigned int *p_counter; static unsigned int numberOfThreads=5; unsigned int get_num_of_threads(void) @@ -37,6 +37,6 @@ void set_counter(int x, unsigned int value) void init_counter(unsigned int size_of_counter) { - p_counter=malloc(size_of_counter*sizeof(int)); + p_counter=malloc(size_of_counter*sizeof(unsigned int)); }