blob: 3bc96f7412e41c5f96a17ec41df7eb01dcbb6991 [file] [log] [blame]
sewardj3b13f0e2002-04-25 20:17:29 +00001
2/* ---------------------------------------------------------------------
3 Give a binding for everything the real libpthread.so binds.
4 ------------------------------------------------------------------ */
5
6extern void vgPlain_unimp ( char* );
7#define unimp(str) vgPlain_unimp(str)
8
9//void _IO_flockfile ( void ) { unimp("_IO_flockfile"); }
10void _IO_ftrylockfile ( void ) { unimp("_IO_ftrylockfile"); }
11//void _IO_funlockfile ( void ) { unimp("_IO_funlockfile"); }
12//void __close ( void ) { unimp("__close"); }
13//void __connect ( void ) { unimp("__connect"); }
14//void __errno_location ( void ) { unimp("__errno_location"); }
15//void __fcntl ( void ) { unimp("__fcntl"); }
sewardj853f55d2002-04-26 00:27:53 +000016//void __fork ( void ) { unimp("__fork"); }
sewardj3b13f0e2002-04-25 20:17:29 +000017//void __h_errno_location ( void ) { unimp("__h_errno_location"); }
18void __libc_allocate_rtsig ( void ) { unimp("__libc_allocate_rtsig"); }
19void __libc_current_sigrtmax ( void ) { unimp("__libc_current_sigrtmax"); }
20void __libc_current_sigrtmin ( void ) { unimp("__libc_current_sigrtmin"); }
sewardj5905fae2002-04-26 13:25:00 +000021//void __lseek ( void ) { unimp("__lseek"); }
sewardj3b13f0e2002-04-25 20:17:29 +000022//void __open ( void ) { unimp("__open"); }
23//void __open64 ( void ) { unimp("__open64"); }
24void __pread64 ( void ) { unimp("__pread64"); }
sewardj853f55d2002-04-26 00:27:53 +000025//void __pthread_atfork ( void ) { unimp("__pthread_atfork"); }
sewardj3b13f0e2002-04-25 20:17:29 +000026//void __pthread_getspecific ( void ) { unimp("__pthread_getspecific"); }
27//void __pthread_key_create ( void ) { unimp("__pthread_key_create"); }
sewardj853f55d2002-04-26 00:27:53 +000028//void __pthread_kill_other_threads_np ( void ) { unimp("__pthread_kill_other_threads_np"); }
sewardj3b13f0e2002-04-25 20:17:29 +000029//void __pthread_mutex_destroy ( void ) { unimp("__pthread_mutex_destroy"); }
30//void __pthread_mutex_init ( void ) { unimp("__pthread_mutex_init"); }
31//void __pthread_mutex_lock ( void ) { unimp("__pthread_mutex_lock"); }
sewardj853f55d2002-04-26 00:27:53 +000032//void __pthread_mutex_trylock ( void ) { unimp("__pthread_mutex_trylock"); }
sewardj3b13f0e2002-04-25 20:17:29 +000033//void __pthread_mutex_unlock ( void ) { unimp("__pthread_mutex_unlock"); }
34//void __pthread_mutexattr_destroy ( void ) { unimp("__pthread_mutexattr_destroy"); }
35//void __pthread_mutexattr_init ( void ) { unimp("__pthread_mutexattr_init"); }
36//void __pthread_mutexattr_settype ( void ) { unimp("__pthread_mutexattr_settype"); }
37//void __pthread_once ( void ) { unimp("__pthread_once"); }
38//void __pthread_setspecific ( void ) { unimp("__pthread_setspecific"); }
39void __pwrite64 ( void ) { unimp("__pwrite64"); }
40//void __read ( void ) { unimp("__read"); }
41//void __res_state ( void ) { unimp("__res_state"); }
sewardj5905fae2002-04-26 13:25:00 +000042//void __send ( void ) { unimp("__send"); }
sewardj3b13f0e2002-04-25 20:17:29 +000043//void __sigaction ( void ) { unimp("__sigaction"); }
44void __vfork ( void ) { unimp("__vfork"); }
sewardj5905fae2002-04-26 13:25:00 +000045//void __wait ( void ) { unimp("__wait"); }
sewardj3b13f0e2002-04-25 20:17:29 +000046//void __write ( void ) { unimp("__write"); }
47void _pthread_cleanup_pop ( void ) { unimp("_pthread_cleanup_pop"); }
48//void _pthread_cleanup_pop_restore ( void ) { unimp("_pthread_cleanup_pop_restore"); }
49void _pthread_cleanup_push ( void ) { unimp("_pthread_cleanup_push"); }
50//void _pthread_cleanup_push_defer ( void ) { unimp("_pthread_cleanup_push_defer"); }
51//void longjmp ( void ) { unimp("longjmp"); }
sewardj853f55d2002-04-26 00:27:53 +000052//void pthread_atfork ( void ) { unimp("pthread_atfork"); }
sewardj3b13f0e2002-04-25 20:17:29 +000053//void pthread_attr_destroy ( void ) { unimp("pthread_attr_destroy"); }
54void pthread_attr_getdetachstate ( void ) { unimp("pthread_attr_getdetachstate"); }
55void pthread_attr_getinheritsched ( void ) { unimp("pthread_attr_getinheritsched"); }
56//void pthread_attr_getschedparam ( void ) { unimp("pthread_attr_getschedparam"); }
57void pthread_attr_getschedpolicy ( void ) { unimp("pthread_attr_getschedpolicy"); }
58void pthread_attr_getscope ( void ) { unimp("pthread_attr_getscope"); }
59
60//void pthread_attr_setdetachstate ( void ) { unimp("pthread_attr_setdetachstate"); }
61//void pthread_attr_setinheritsched ( void ) { unimp("pthread_attr_setinheritsched"); }
62//void pthread_attr_setschedparam ( void ) { unimp("pthread_attr_setschedparam"); }
63void pthread_attr_setschedpolicy ( void ) { unimp("pthread_attr_setschedpolicy"); }
64void pthread_attr_setscope ( void ) { unimp("pthread_attr_setscope"); }
65void pthread_barrier_destroy ( void ) { unimp("pthread_barrier_destroy"); }
66void pthread_barrier_init ( void ) { unimp("pthread_barrier_init"); }
67void pthread_barrier_wait ( void ) { unimp("pthread_barrier_wait"); }
68void pthread_barrierattr_destroy ( void ) { unimp("pthread_barrierattr_destroy"); }
69void pthread_barrierattr_init ( void ) { unimp("pthread_barrierattr_init"); }
70void pthread_barrierattr_setpshared ( void ) { unimp("pthread_barrierattr_setpshared"); }
71//void pthread_cancel ( void ) { unimp("pthread_cancel"); }
72//void pthread_cond_broadcast ( void ) { unimp("pthread_cond_broadcast"); }
73//void pthread_cond_destroy ( void ) { unimp("pthread_cond_destroy"); }
74//void pthread_cond_init ( void ) { unimp("pthread_cond_init"); }
75//void pthread_cond_signal ( void ) { unimp("pthread_cond_signal"); }
76//void pthread_cond_timedwait ( void ) { unimp("pthread_cond_timedwait"); }
77//void pthread_cond_wait ( void ) { unimp("pthread_cond_wait"); }
78//void pthread_condattr_destroy ( void ) { unimp("pthread_condattr_destroy"); }
79void pthread_condattr_getpshared ( void ) { unimp("pthread_condattr_getpshared"); }
80//void pthread_condattr_init ( void ) { unimp("pthread_condattr_init"); }
81void pthread_condattr_setpshared ( void ) { unimp("pthread_condattr_setpshared"); }
sewardj853f55d2002-04-26 00:27:53 +000082//void pthread_detach ( void ) { unimp("pthread_detach"); }
sewardj3b13f0e2002-04-25 20:17:29 +000083//void pthread_equal ( void ) { unimp("pthread_equal"); }
84//void pthread_exit ( void ) { unimp("pthread_exit"); }
85void pthread_getattr_np ( void ) { unimp("pthread_getattr_np"); }
86void pthread_getcpuclockid ( void ) { unimp("pthread_getcpuclockid"); }
87//void pthread_getschedparam ( void ) { unimp("pthread_getschedparam"); }
88//void pthread_getspecific ( void ) { unimp("pthread_getspecific"); }
89//void pthread_join ( void ) { unimp("pthread_join"); }
90//void pthread_key_create ( void ) { unimp("pthread_key_create"); }
91//void pthread_key_delete ( void ) { unimp("pthread_key_delete"); }
92void pthread_kill ( void ) { unimp("pthread_kill"); }
93//void pthread_mutex_destroy ( void ) { unimp("pthread_mutex_destroy"); }
94//void pthread_mutex_init ( void ) { unimp("pthread_mutex_init"); }
95//void pthread_mutex_lock ( void ) { unimp("pthread_mutex_lock"); }
96void pthread_mutex_timedlock ( void ) { unimp("pthread_mutex_timedlock"); }
97//void pthread_mutex_trylock ( void ) { unimp("pthread_mutex_trylock"); }
98//void pthread_mutex_unlock ( void ) { unimp("pthread_mutex_unlock"); }
99//void pthread_mutexattr_destroy ( void ) { unimp("pthread_mutexattr_destroy"); }
100//void pthread_mutexattr_init ( void ) { unimp("pthread_mutexattr_init"); }
101//void pthread_once ( void ) { unimp("pthread_once"); }
102void pthread_rwlock_destroy ( void ) { unimp("pthread_rwlock_destroy"); }
103void pthread_rwlock_init ( void ) { unimp("pthread_rwlock_init"); }
sewardj5716dbb2002-04-26 03:28:18 +0000104//void pthread_rwlock_rdlock ( void ) { unimp("pthread_rwlock_rdlock"); }
sewardj3b13f0e2002-04-25 20:17:29 +0000105void pthread_rwlock_timedrdlock ( void ) { unimp("pthread_rwlock_timedrdlock"); }
106void pthread_rwlock_timedwrlock ( void ) { unimp("pthread_rwlock_timedwrlock"); }
107void pthread_rwlock_tryrdlock ( void ) { unimp("pthread_rwlock_tryrdlock"); }
108void pthread_rwlock_trywrlock ( void ) { unimp("pthread_rwlock_trywrlock"); }
sewardj5716dbb2002-04-26 03:28:18 +0000109//void pthread_rwlock_unlock ( void ) { unimp("pthread_rwlock_unlock"); }
sewardj060b04f2002-04-26 21:01:13 +0000110//void pthread_rwlock_wrlock ( void ) { unimp("pthread_rwlock_wrlock"); }
sewardj3b13f0e2002-04-25 20:17:29 +0000111void pthread_rwlockattr_destroy ( void ) { unimp("pthread_rwlockattr_destroy"); }
112void pthread_rwlockattr_getkind_np ( void ) { unimp("pthread_rwlockattr_getkind_np"); }
113void pthread_rwlockattr_getpshared ( void ) { unimp("pthread_rwlockattr_getpshared"); }
114void pthread_rwlockattr_init ( void ) { unimp("pthread_rwlockattr_init"); }
115void pthread_rwlockattr_setkind_np ( void ) { unimp("pthread_rwlockattr_setkind_np"); }
116void pthread_rwlockattr_setpshared ( void ) { unimp("pthread_rwlockattr_setpshared"); }
117//void pthread_self ( void ) { unimp("pthread_self"); }
sewardj853f55d2002-04-26 00:27:53 +0000118//void pthread_setcancelstate ( void ) { unimp("pthread_setcancelstate"); }
sewardj3b13f0e2002-04-25 20:17:29 +0000119//void pthread_setcanceltype ( void ) { unimp("pthread_setcanceltype"); }
120//void pthread_setschedparam ( void ) { unimp("pthread_setschedparam"); }
121//void pthread_setspecific ( void ) { unimp("pthread_setspecific"); }
122void pthread_sigmask ( void ) { unimp("pthread_sigmask"); }
sewardj853f55d2002-04-26 00:27:53 +0000123//void pthread_testcancel ( void ) { unimp("pthread_testcancel"); }
sewardj3b13f0e2002-04-25 20:17:29 +0000124void raise ( void ) { unimp("raise"); }
125void sem_close ( void ) { unimp("sem_close"); }
126void sem_open ( void ) { unimp("sem_open"); }
127void sem_timedwait ( void ) { unimp("sem_timedwait"); }
128void sem_unlink ( void ) { unimp("sem_unlink"); }
129//void sigaction ( void ) { unimp("sigaction"); }
130void siglongjmp ( void ) { unimp("siglongjmp"); }
131void sigwait ( void ) { unimp("sigwait"); }
132
133#if 0
134void pthread_create@@GLIBC_2.1 ( void ) { unimp("pthread_create@@GLIBC_2.1"); }
135void pthread_create@GLIBC_2.0 ( void ) { unimp("pthread_create@GLIBC_2.0"); }
136
137void sem_wait@@GLIBC_2.1 ( void ) { unimp("sem_wait@@GLIBC_2.1"); }
138void sem_wait@GLIBC_2.0 ( void ) { unimp("sem_wait@GLIBC_2.0"); }
139
140void sem_trywait@@GLIBC_2.1 ( void ) { unimp("sem_trywait@@GLIBC_2.1"); }
141void sem_trywait@GLIBC_2.0 ( void ) { unimp("sem_trywait@GLIBC_2.0"); }
142
143void sem_post@@GLIBC_2.1 ( void ) { unimp("sem_post@@GLIBC_2.1"); }
144void sem_post@GLIBC_2.0 ( void ) { unimp("sem_post@GLIBC_2.0"); }
145
146void sem_destroy@@GLIBC_2.1 ( void ) { unimp("sem_destroy@@GLIBC_2.1"); }
147void sem_destroy@GLIBC_2.0 ( void ) { unimp("sem_destroy@GLIBC_2.0"); }
148void sem_getvalue@@GLIBC_2.1 ( void ) { unimp("sem_getvalue@@GLIBC_2.1"); }
149void sem_getvalue@GLIBC_2.0 ( void ) { unimp("sem_getvalue@GLIBC_2.0"); }
150void sem_init@@GLIBC_2.1 ( void ) { unimp("sem_init@@GLIBC_2.1"); }
151void sem_init@GLIBC_2.0 ( void ) { unimp("sem_init@GLIBC_2.0"); }
152
153void pthread_attr_init@@GLIBC_2.1 ( void ) { unimp("pthread_attr_init@@GLIBC_2.1"); }
154void pthread_attr_init@GLIBC_2.0 ( void ) { unimp("pthread_attr_init@GLIBC_2.0"); }
155#endif
sewardj5716dbb2002-04-26 03:28:18 +0000156
sewardj5905fae2002-04-26 13:25:00 +0000157
158
159# define strong_alias(name, aliasname) \
160 extern __typeof (name) aliasname __attribute__ ((alias (#name)));
161
162# define weak_alias(name, aliasname) \
163 extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
164
165weak_alias (__pread64, pread64)
166weak_alias (__pwrite64, pwrite64)
167
168weak_alias(pthread_rwlock_destroy, __pthread_rwlock_destroy)
169weak_alias(pthread_rwlock_init, __pthread_rwlock_init)
170weak_alias(pthread_rwlock_tryrdlock, __pthread_rwlock_tryrdlock)
171weak_alias(pthread_rwlock_trywrlock, __pthread_rwlock_trywrlock)
sewardj060b04f2002-04-26 21:01:13 +0000172//weak_alias(pthread_rwlock_wrlock, __pthread_rwlock_wrlock)
sewardj5905fae2002-04-26 13:25:00 +0000173weak_alias(_IO_ftrylockfile, ftrylockfile)
174
175__attribute__((weak)) void pread ( void ) { vgPlain_unimp("pread"); }
sewardj436e0582002-04-26 14:31:40 +0000176__attribute__((weak)) void pwrite ( void ) { vgPlain_unimp("pwrite"); }
sewardj5905fae2002-04-26 13:25:00 +0000177__attribute__((weak)) void msync ( void ) { vgPlain_unimp("msync"); }
178__attribute__((weak)) void pause ( void ) { vgPlain_unimp("pause"); }
179__attribute__((weak)) void recvfrom ( void ) { vgPlain_unimp("recvfrom"); }
180__attribute__((weak)) void recvmsg ( void ) { vgPlain_unimp("recvmsg"); }
181__attribute__((weak)) void sendmsg ( void ) { vgPlain_unimp("sendmsg"); }
182__attribute__((weak)) void tcdrain ( void ) { vgPlain_unimp("tcdrain"); }
183__attribute__((weak)) void vfork ( void ) { vgPlain_unimp("vfork"); }
sewardj436e0582002-04-26 14:31:40 +0000184
185__attribute__((weak)) void pthread_attr_getguardsize ( void )
186 { vgPlain_unimp("pthread_attr_getguardsize"); }
187__attribute__((weak)) void pthread_attr_getstack ( void )
188 { vgPlain_unimp("pthread_attr_getstack"); }
189__attribute__((weak)) void pthread_attr_getstackaddr ( void )
190 { vgPlain_unimp("pthread_attr_getstackaddr"); }
191__attribute__((weak)) void pthread_attr_getstacksize ( void )
192 { vgPlain_unimp("pthread_attr_getstacksize"); }
193__attribute__((weak)) void pthread_attr_setguardsize ( void )
194 { vgPlain_unimp("pthread_attr_setguardsize"); }
195__attribute__((weak)) void pthread_attr_setstack ( void )
196 { vgPlain_unimp("pthread_attr_setstack"); }
197__attribute__((weak)) void pthread_attr_setstackaddr ( void )
198 { vgPlain_unimp("pthread_attr_setstackaddr"); }
199__attribute__((weak)) void pthread_attr_setstacksize ( void )
200 { vgPlain_unimp("pthread_attr_setstacksize"); }
201__attribute__((weak)) void pthread_getconcurrency ( void )
202 { vgPlain_unimp("pthread_getconcurrency"); }
203__attribute__((weak)) void pthread_kill_other_threads_np ( void )
204 { vgPlain_unimp("pthread_kill_other_threads_np"); }
205__attribute__((weak)) void pthread_mutexattr_getkind_np ( void )
206 { vgPlain_unimp("pthread_mutexattr_getkind_np"); }
207__attribute__((weak)) void pthread_mutexattr_getpshared ( void )
208 { vgPlain_unimp("pthread_mutexattr_getpshared"); }
209__attribute__((weak)) void pthread_mutexattr_gettype ( void )
210 { vgPlain_unimp("pthread_mutexattr_gettype"); }
211__attribute__((weak)) void pthread_mutexattr_setkind_np ( void )
212 { vgPlain_unimp("pthread_mutexattr_setkind_np"); }
213__attribute__((weak)) void pthread_mutexattr_setpshared ( void )
214 { vgPlain_unimp("pthread_mutexattr_setpshared"); }
215__attribute__((weak)) void pthread_setconcurrency ( void )
216 { vgPlain_unimp("pthread_setconcurrency"); }
217__attribute__((weak)) void pthread_spin_destroy ( void )
218 { vgPlain_unimp("pthread_spin_destroy"); }
219__attribute__((weak)) void pthread_spin_init ( void )
220 { vgPlain_unimp("pthread_spin_init"); }
221__attribute__((weak)) void pthread_spin_lock ( void )
222 { vgPlain_unimp("pthread_spin_lock"); }
223__attribute__((weak)) void pthread_spin_trylock ( void )
224 { vgPlain_unimp("pthread_spin_trylock"); }
225__attribute__((weak)) void pthread_spin_unlock ( void )
226 { vgPlain_unimp("pthread_spin_unlock"); }
227__attribute__((weak)) void pthread_yield ( void )
228 { vgPlain_unimp("pthread_yield"); }
229
230__attribute__((weak)) void __pthread_initialize ( void )
231 { vgPlain_unimp("__pthread_initialize"); }