From 80fabedc72b56664a4f6d77c253f9b3fe3939707 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Tue, 31 Mar 2009 18:46:23 +0200 Subject: started to add thread support (POSIX) --- tests/threads/GNUmakefile | 22 ++++++++++++++++++++++ tests/threads/Makefile.W32 | 29 +++++++++++++++++++++++++++++ tests/threads/test_create_join.c | 7 +++++++ 3 files changed, 58 insertions(+) create mode 100644 tests/threads/GNUmakefile create mode 100644 tests/threads/Makefile.W32 create mode 100644 tests/threads/test_create_join.c (limited to 'tests/threads') diff --git a/tests/threads/GNUmakefile b/tests/threads/GNUmakefile new file mode 100644 index 0000000..62c5b8a --- /dev/null +++ b/tests/threads/GNUmakefile @@ -0,0 +1,22 @@ +TOPDIR = ../.. + +INCLUDE_DIRS = \ + -I$(TOPDIR)/include/wolf -I. -I$(TOPDIR)/src + +INCLUDE_LIBS = \ + $(TOPDIR)/src/libwolf.a + +TEST_BINS = \ + test_create_join$(EXE) + +-include $(TOPDIR)/makefiles/gmake/sub.mk + +local_all: + +local_clean: + +local_distclean: + +local_test: + @echo "Testing creating, joining of threads.." + @./test_create_join >/dev/null diff --git a/tests/threads/Makefile.W32 b/tests/threads/Makefile.W32 new file mode 100644 index 0000000..8f30fe6 --- /dev/null +++ b/tests/threads/Makefile.W32 @@ -0,0 +1,29 @@ +TOPDIR = ..\.. + +INCLUDE_DIRS = \ + /I$(TOPDIR)\include\wolf /I. /I$(TOPDIR)\src \ + /D_WIN32_WINNT=0x400 /I"$(PLATFORM_SDK_DIR)\Include" + +INCLUDE_LDFLAGS = \ + /LIBPATH:"$(PLATFORM_SDK_DIR)\lib" + +INCLUDE_LIBS = \ + $(TOPDIR)\src\wolf.lib + +TEST_BINS = \ + test_create_join.exe + +!INCLUDE $(TOPDIR)\makefiles\nmake\sub.mk + +# TODO: what is the autogeneration rule for NMAKE? +test_create_join.exe: test_create_join.obj + +local_all: + +local_clean: + +local_distclean: + +local_test: + @echo Testing creating,joining of threads.. + @test_create_join >NUL 2>NUL diff --git a/tests/threads/test_create_join.c b/tests/threads/test_create_join.c new file mode 100644 index 0000000..70fee97 --- /dev/null +++ b/tests/threads/test_create_join.c @@ -0,0 +1,7 @@ +#include "threads/threads.h" + +#include /* for exit, EXIT_SUCCESS, free */ + +int main( void ) { + return EXIT_SUCCESS; +} -- cgit v1.2.3-54-g00ecf