git.samba.org
/
metze
/
misc
/
junkcode.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(initial)
pthread_dlsym.c
author
Stefan Metzmacher
<metze@samba.org>
Wed, 5 Mar 2008 18:08:55 +0000
(19:08 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Wed, 5 Mar 2008 18:08:55 +0000
(19:08 +0100)
pthread/pthread_dlsym.c
[new file with mode: 0644]
patch
|
blob
diff --git a/pthread/pthread_dlsym.c
b/pthread/pthread_dlsym.c
new file mode 100644
(file)
index 0000000..
e5501e4
--- /dev/null
+++ b/
pthread/pthread_dlsym.c
@@ -0,0
+1,23
@@
+#include <stdlib.h>
+#include <dlfcn.h>
+
+//int pthread_mutex_init(void);
+int pthread_create(void);
+
+int main(void)
+{
+ void *h;
+ void *f;
+
+ h = dlopen(NULL,RTLD_NOW|RTLD_GLOBAL);
+ if (!h) return 255;
+
+ f = dlsym(h, "pthread_mutex_init");
+
+ if (!f) return 127;
+
+//pthread_mutex_init();
+pthread_create();
+
+ return 0;
+}