summaryrefslogtreecommitdiffstats
path: root/languages/cpp/debugger/tests/threads
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch)
treeacaf47eb0fa12142d3896416a69e74cbf5a72242 /languages/cpp/debugger/tests/threads
downloadtdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz
tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/debugger/tests/threads')
-rw-r--r--languages/cpp/debugger/tests/threads/Makefile4
-rw-r--r--languages/cpp/debugger/tests/threads/README.txt4
-rw-r--r--languages/cpp/debugger/tests/threads/threads.cpp26
-rw-r--r--languages/cpp/debugger/tests/threads/threads.kdevelop101
4 files changed, 135 insertions, 0 deletions
diff --git a/languages/cpp/debugger/tests/threads/Makefile b/languages/cpp/debugger/tests/threads/Makefile
new file mode 100644
index 00000000..8db14799
--- /dev/null
+++ b/languages/cpp/debugger/tests/threads/Makefile
@@ -0,0 +1,4 @@
+
+threads: threads.cpp
+ g++ -g -othreads threads.cpp -pthread
+ \ No newline at end of file
diff --git a/languages/cpp/debugger/tests/threads/README.txt b/languages/cpp/debugger/tests/threads/README.txt
new file mode 100644
index 00000000..3d84fae1
--- /dev/null
+++ b/languages/cpp/debugger/tests/threads/README.txt
@@ -0,0 +1,4 @@
+
+Tests with a threaded application. Makes sure that the
+list of threads is shown that that switching threads works.
+
diff --git a/languages/cpp/debugger/tests/threads/threads.cpp b/languages/cpp/debugger/tests/threads/threads.cpp
new file mode 100644
index 00000000..f412ef7c
--- /dev/null
+++ b/languages/cpp/debugger/tests/threads/threads.cpp
@@ -0,0 +1,26 @@
+
+#include <pthread.h>
+
+void runner(int i)
+{
+ for(int i = 0; i < 1000000;)
+ ++i;
+}
+
+void* thread(void* p)
+{
+ runner((int)p);
+}
+
+int main()
+{
+ pthread_t p1, p2;
+
+ pthread_create(&p1, 0, &thread, (void*)1);
+ pthread_create(&p2, 0, &thread, (void*)2);
+
+ pthread_join(p1, 0);
+ pthread_join(p2, 0);
+
+ return 0;
+} \ No newline at end of file
diff --git a/languages/cpp/debugger/tests/threads/threads.kdevelop b/languages/cpp/debugger/tests/threads/threads.kdevelop
new file mode 100644
index 00000000..3cd806b8
--- /dev/null
+++ b/languages/cpp/debugger/tests/threads/threads.kdevelop
@@ -0,0 +1,101 @@
+<?xml version = '1.0'?>
+<kdevelop>
+ <general>
+ <author>Vladimir Prus</author>
+ <email>ghost@zigzag</email>
+ <version>$VERSION$</version>
+ <projectmanagement>KDevCustomProject</projectmanagement>
+ <primarylanguage>C++</primarylanguage>
+ <ignoreparts/>
+ </general>
+ <kdevcustomproject>
+ <run>
+ <mainprogram>threads</mainprogram>
+ <directoryradio>executable</directoryradio>
+ </run>
+ </kdevcustomproject>
+ <kdevdebugger>
+ <general>
+ <dbgshell/>
+ </general>
+ </kdevdebugger>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>ada</toc>
+ <toc>ada_bugs_gcc</toc>
+ <toc>bash</toc>
+ <toc>bash_bugs</toc>
+ <toc>clanlib</toc>
+ <toc>fortran_bugs_gcc</toc>
+ <toc>gnome1</toc>
+ <toc>gnustep</toc>
+ <toc>gtk</toc>
+ <toc>gtk_bugs</toc>
+ <toc>haskell</toc>
+ <toc>haskell_bugs_ghc</toc>
+ <toc>java_bugs_gcc</toc>
+ <toc>java_bugs_sun</toc>
+ <toc>kde2book</toc>
+ <toc>opengl</toc>
+ <toc>pascal_bugs_fp</toc>
+ <toc>php</toc>
+ <toc>php_bugs</toc>
+ <toc>perl</toc>
+ <toc>perl_bugs</toc>
+ <toc>python</toc>
+ <toc>python_bugs</toc>
+ <toc>qt-kdev3</toc>
+ <toc>ruby</toc>
+ <toc>ruby_bugs</toc>
+ <toc>sdl</toc>
+ <toc>sw</toc>
+ <toc>w3c-dom-level2-html</toc>
+ <toc>w3c-svg</toc>
+ <toc>w3c-uaag10</toc>
+ <toc>wxwidgets_bugs</toc>
+ </ignoretocs>
+ <ignoreqt_xml>
+ <toc>Guide to the Qt Translation Tools</toc>
+ <toc>Qt Assistant Manual</toc>
+ <toc>Qt Designer Manual</toc>
+ <toc>Qt Reference Documentation</toc>
+ <toc>qmake User Guide</toc>
+ </ignoreqt_xml>
+ <ignoredoxygen>
+ <toc>KDE Libraries (Doxygen)</toc>
+ </ignoredoxygen>
+ </kdevdoctreeview>
+ <kdevfilecreate>
+ <filetypes/>
+ <useglobaltypes>
+ <type ext="ui" />
+ <type ext="cpp" />
+ <type ext="h" />
+ </useglobaltypes>
+ </kdevfilecreate>
+ <kdevcppsupport>
+ <references/>
+ <codecompletion>
+ <includeGlobalFunctions>true</includeGlobalFunctions>
+ <includeTypes>true</includeTypes>
+ <includeEnums>true</includeEnums>
+ <includeTypedefs>false</includeTypedefs>
+ <automaticCodeCompletion>true</automaticCodeCompletion>
+ <automaticArgumentsHint>true</automaticArgumentsHint>
+ <automaticHeaderCompletion>true</automaticHeaderCompletion>
+ <codeCompletionDelay>250</codeCompletionDelay>
+ <argumentsHintDelay>400</argumentsHintDelay>
+ <headerCompletionDelay>250</headerCompletionDelay>
+ </codecompletion>
+ </kdevcppsupport>
+ <kdevfileview>
+ <groups>
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ <hidenonlocation>false</hidenonlocation>
+ </groups>
+ <tree>
+ <hidepatterns>*.o,*.lo,CVS</hidepatterns>
+ <hidenonprojectfiles>false</hidenonprojectfiles>
+ </tree>
+ </kdevfileview>
+</kdevelop>