GIT.Harvie.CZ
/
mirrors
/
Programs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acb3e41
)
added pthread example
author
Harvie
<tomas@mudrunka.cz>
Wed, 9 Jun 2010 00:50:00 +0000
(
02:50
+0200)
committer
Harvie
<tomas@mudrunka.cz>
Wed, 9 Jun 2010 00:50:00 +0000
(
02:50
+0200)
c/pthread.c
[new file with mode: 0644]
patch
|
blob
diff --git a/c/pthread.c
b/c/pthread.c
new file mode 100644
(file)
index 0000000..
74ab4bd
--- /dev/null
+++ b/
c/pthread.c
@@ -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.092263 seconds
and
4
git commands to generate.