diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2009-03-31 18:46:23 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2009-03-31 18:46:23 +0200 |
commit | 80fabedc72b56664a4f6d77c253f9b3fe3939707 (patch) | |
tree | 35edd37dfb4bf34507826c78cf354bdc314d7fe2 /tests/threads | |
parent | d2b0696d8fa0ce47e0bc525581b6b9254637984b (diff) | |
download | wolfbones-80fabedc72b56664a4f6d77c253f9b3fe3939707.tar.gz wolfbones-80fabedc72b56664a4f6d77c253f9b3fe3939707.tar.bz2 |
started to add thread support (POSIX)
Diffstat (limited to 'tests/threads')
-rw-r--r-- | tests/threads/GNUmakefile | 22 | ||||
-rw-r--r-- | tests/threads/Makefile.W32 | 29 | ||||
-rw-r--r-- | tests/threads/test_create_join.c | 7 |
3 files changed, 58 insertions, 0 deletions
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 <stdlib.h> /* for exit, EXIT_SUCCESS, free */ + +int main( void ) { + return EXIT_SUCCESS; +} |