diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2009-03-31 22:02:42 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2009-03-31 22:02:42 +0200 |
commit | 41cb2efe1bceb9eef88f0010358b7712c1ad7c59 (patch) | |
tree | 2824923804841d87a66be4e6398a4bd89921b524 /tests | |
parent | 0ff770d78ea31b332bde745404e29db71ab8d18c (diff) | |
download | wolfbones-41cb2efe1bceb9eef88f0010358b7712c1ad7c59.tar.gz wolfbones-41cb2efe1bceb9eef88f0010358b7712c1ad7c59.tar.bz2 |
fixed threading on native Windows
Diffstat (limited to 'tests')
-rw-r--r-- | tests/threads/Makefile.W32 | 2 | ||||
-rw-r--r-- | tests/threads/test_create_join.c | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/threads/Makefile.W32 b/tests/threads/Makefile.W32 index 8f30fe6..84b8610 100644 --- a/tests/threads/Makefile.W32 +++ b/tests/threads/Makefile.W32 @@ -26,4 +26,4 @@ local_distclean: local_test: @echo Testing creating,joining of threads.. - @test_create_join >NUL 2>NUL + @test_create_join >NUL diff --git a/tests/threads/test_create_join.c b/tests/threads/test_create_join.c index 117c304..c985e15 100644 --- a/tests/threads/test_create_join.c +++ b/tests/threads/test_create_join.c @@ -7,7 +7,7 @@ #define NOF_THREADS 10 #define NOF_ITERATIONS 10000 -static void *thread_func( void *thread_data ) { +static WOLF_THREAD_RETURN_DECL thread_func( void *thread_data ) { int i; for( i = 0; i < NOF_ITERATIONS; i++ ) { @@ -16,7 +16,8 @@ static void *thread_func( void *thread_data ) { } WOLF_UNUSED( thread_data ); - return NULL; + + WOLF_THREAD_RETURN; } int main( void ) { @@ -34,6 +35,8 @@ int main( void ) { fflush( stdout ); } + Sleep( 5 ); + for( i = 0; i < NOF_THREADS; i++ ) { error = wolf_thread_join( &thread[i] ); if( error != WOLF_OK ) { |