added pthread example
authorHarvie <tomas@mudrunka.cz>
Wed, 9 Jun 2010 00:50:00 +0000 (02:50 +0200)
committerHarvie <tomas@mudrunka.cz>
Wed, 9 Jun 2010 00:50:00 +0000 (02:50 +0200)
c/pthread.c [new file with mode: 0644]

diff --git a/c/pthread.c b/c/pthread.c
new file mode 100644 (file)
index 0000000..74ab4bd
--- /dev/null
@@ -0,0 +1,15 @@
+#include <stdio.h>
+#include <pthread.h>
+
+void *go(void *args) {
+       while(1) {
+               puts("lol!");
+       }
+}
+
+int main() {
+       pthread_t t;
+       //pthread_create(&t, NULL, go, NULL);
+       pthread_create(&t, NULL, puts, "hello!");
+       sleep(1);
+}
This page took 0.182184 seconds and 4 git commands to generate.