sewardj | 3b13f0e | 2002-04-25 20:17:29 +0000 | [diff] [blame] | 1 | |
| 2 | /* --------------------------------------------------------------------- |
| 3 | Give a binding for everything the real libpthread.so binds. |
| 4 | ------------------------------------------------------------------ */ |
| 5 | |
| 6 | extern void vgPlain_unimp ( char* ); |
| 7 | #define unimp(str) vgPlain_unimp(str) |
| 8 | |
| 9 | //void _IO_flockfile ( void ) { unimp("_IO_flockfile"); } |
| 10 | void _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"); } |
sewardj | 853f55d | 2002-04-26 00:27:53 +0000 | [diff] [blame] | 16 | //void __fork ( void ) { unimp("__fork"); } |
sewardj | 3b13f0e | 2002-04-25 20:17:29 +0000 | [diff] [blame] | 17 | //void __h_errno_location ( void ) { unimp("__h_errno_location"); } |
| 18 | void __libc_allocate_rtsig ( void ) { unimp("__libc_allocate_rtsig"); } |
| 19 | void __libc_current_sigrtmax ( void ) { unimp("__libc_current_sigrtmax"); } |
| 20 | void __libc_current_sigrtmin ( void ) { unimp("__libc_current_sigrtmin"); } |
sewardj | 5905fae | 2002-04-26 13:25:00 +0000 | [diff] [blame] | 21 | //void __lseek ( void ) { unimp("__lseek"); } |
sewardj | 3b13f0e | 2002-04-25 20:17:29 +0000 | [diff] [blame] | 22 | //void __open ( void ) { unimp("__open"); } |
| 23 | //void __open64 ( void ) { unimp("__open64"); } |
| 24 | void __pread64 ( void ) { unimp("__pread64"); } |
sewardj | 853f55d | 2002-04-26 00:27:53 +0000 | [diff] [blame] | 25 | //void __pthread_atfork ( void ) { unimp("__pthread_atfork"); } |
sewardj | 3b13f0e | 2002-04-25 20:17:29 +0000 | [diff] [blame] | 26 | //void __pthread_getspecific ( void ) { unimp("__pthread_getspecific"); } |
| 27 | //void __pthread_key_create ( void ) { unimp("__pthread_key_create"); } |
sewardj | 853f55d | 2002-04-26 00:27:53 +0000 | [diff] [blame] | 28 | //void __pthread_kill_other_threads_np ( void ) { unimp("__pthread_kill_other_threads_np"); } |
sewardj | 3b13f0e | 2002-04-25 20:17:29 +0000 | [diff] [blame] | 29 | //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"); } |
sewardj | 853f55d | 2002-04-26 00:27:53 +0000 | [diff] [blame] | 32 | //void __pthread_mutex_trylock ( void ) { unimp("__pthread_mutex_trylock"); } |
sewardj | 3b13f0e | 2002-04-25 20:17:29 +0000 | [diff] [blame] | 33 | //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"); } |
| 39 | void __pwrite64 ( void ) { unimp("__pwrite64"); } |
| 40 | //void __read ( void ) { unimp("__read"); } |
| 41 | //void __res_state ( void ) { unimp("__res_state"); } |
sewardj | 5905fae | 2002-04-26 13:25:00 +0000 | [diff] [blame] | 42 | //void __send ( void ) { unimp("__send"); } |
sewardj | 3b13f0e | 2002-04-25 20:17:29 +0000 | [diff] [blame] | 43 | //void __sigaction ( void ) { unimp("__sigaction"); } |
| 44 | void __vfork ( void ) { unimp("__vfork"); } |
sewardj | 5905fae | 2002-04-26 13:25:00 +0000 | [diff] [blame] | 45 | //void __wait ( void ) { unimp("__wait"); } |
sewardj | 3b13f0e | 2002-04-25 20:17:29 +0000 | [diff] [blame] | 46 | //void __write ( void ) { unimp("__write"); } |
| 47 | void _pthread_cleanup_pop ( void ) { unimp("_pthread_cleanup_pop"); } |
| 48 | //void _pthread_cleanup_pop_restore ( void ) { unimp("_pthread_cleanup_pop_restore"); } |
| 49 | void _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"); } |
sewardj | 853f55d | 2002-04-26 00:27:53 +0000 | [diff] [blame] | 52 | //void pthread_atfork ( void ) { unimp("pthread_atfork"); } |
sewardj | 3b13f0e | 2002-04-25 20:17:29 +0000 | [diff] [blame] | 53 | //void pthread_attr_destroy ( void ) { unimp("pthread_attr_destroy"); } |
| 54 | void pthread_attr_getdetachstate ( void ) { unimp("pthread_attr_getdetachstate"); } |
| 55 | void pthread_attr_getinheritsched ( void ) { unimp("pthread_attr_getinheritsched"); } |
| 56 | //void pthread_attr_getschedparam ( void ) { unimp("pthread_attr_getschedparam"); } |
| 57 | void pthread_attr_getschedpolicy ( void ) { unimp("pthread_attr_getschedpolicy"); } |
| 58 | void 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"); } |
| 63 | void pthread_attr_setschedpolicy ( void ) { unimp("pthread_attr_setschedpolicy"); } |
| 64 | void pthread_attr_setscope ( void ) { unimp("pthread_attr_setscope"); } |
| 65 | void pthread_barrier_destroy ( void ) { unimp("pthread_barrier_destroy"); } |
| 66 | void pthread_barrier_init ( void ) { unimp("pthread_barrier_init"); } |
| 67 | void pthread_barrier_wait ( void ) { unimp("pthread_barrier_wait"); } |
| 68 | void pthread_barrierattr_destroy ( void ) { unimp("pthread_barrierattr_destroy"); } |
| 69 | void pthread_barrierattr_init ( void ) { unimp("pthread_barrierattr_init"); } |
| 70 | void 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"); } |
| 79 | void pthread_condattr_getpshared ( void ) { unimp("pthread_condattr_getpshared"); } |
| 80 | //void pthread_condattr_init ( void ) { unimp("pthread_condattr_init"); } |
| 81 | void pthread_condattr_setpshared ( void ) { unimp("pthread_condattr_setpshared"); } |
sewardj | 853f55d | 2002-04-26 00:27:53 +0000 | [diff] [blame] | 82 | //void pthread_detach ( void ) { unimp("pthread_detach"); } |
sewardj | 3b13f0e | 2002-04-25 20:17:29 +0000 | [diff] [blame] | 83 | //void pthread_equal ( void ) { unimp("pthread_equal"); } |
| 84 | //void pthread_exit ( void ) { unimp("pthread_exit"); } |
| 85 | void pthread_getattr_np ( void ) { unimp("pthread_getattr_np"); } |
| 86 | void 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"); } |
| 92 | void 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"); } |
| 96 | void 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"); } |
| 102 | void pthread_rwlock_destroy ( void ) { unimp("pthread_rwlock_destroy"); } |
| 103 | void pthread_rwlock_init ( void ) { unimp("pthread_rwlock_init"); } |
sewardj | 5716dbb | 2002-04-26 03:28:18 +0000 | [diff] [blame] | 104 | //void pthread_rwlock_rdlock ( void ) { unimp("pthread_rwlock_rdlock"); } |
sewardj | 3b13f0e | 2002-04-25 20:17:29 +0000 | [diff] [blame] | 105 | void pthread_rwlock_timedrdlock ( void ) { unimp("pthread_rwlock_timedrdlock"); } |
| 106 | void pthread_rwlock_timedwrlock ( void ) { unimp("pthread_rwlock_timedwrlock"); } |
| 107 | void pthread_rwlock_tryrdlock ( void ) { unimp("pthread_rwlock_tryrdlock"); } |
| 108 | void pthread_rwlock_trywrlock ( void ) { unimp("pthread_rwlock_trywrlock"); } |
sewardj | 5716dbb | 2002-04-26 03:28:18 +0000 | [diff] [blame] | 109 | //void pthread_rwlock_unlock ( void ) { unimp("pthread_rwlock_unlock"); } |
sewardj | 060b04f | 2002-04-26 21:01:13 +0000 | [diff] [blame] | 110 | //void pthread_rwlock_wrlock ( void ) { unimp("pthread_rwlock_wrlock"); } |
sewardj | 3b13f0e | 2002-04-25 20:17:29 +0000 | [diff] [blame] | 111 | void pthread_rwlockattr_destroy ( void ) { unimp("pthread_rwlockattr_destroy"); } |
| 112 | void pthread_rwlockattr_getkind_np ( void ) { unimp("pthread_rwlockattr_getkind_np"); } |
| 113 | void pthread_rwlockattr_getpshared ( void ) { unimp("pthread_rwlockattr_getpshared"); } |
| 114 | void pthread_rwlockattr_init ( void ) { unimp("pthread_rwlockattr_init"); } |
| 115 | void pthread_rwlockattr_setkind_np ( void ) { unimp("pthread_rwlockattr_setkind_np"); } |
| 116 | void pthread_rwlockattr_setpshared ( void ) { unimp("pthread_rwlockattr_setpshared"); } |
| 117 | //void pthread_self ( void ) { unimp("pthread_self"); } |
sewardj | 853f55d | 2002-04-26 00:27:53 +0000 | [diff] [blame] | 118 | //void pthread_setcancelstate ( void ) { unimp("pthread_setcancelstate"); } |
sewardj | 3b13f0e | 2002-04-25 20:17:29 +0000 | [diff] [blame] | 119 | //void pthread_setcanceltype ( void ) { unimp("pthread_setcanceltype"); } |
| 120 | //void pthread_setschedparam ( void ) { unimp("pthread_setschedparam"); } |
| 121 | //void pthread_setspecific ( void ) { unimp("pthread_setspecific"); } |
| 122 | void pthread_sigmask ( void ) { unimp("pthread_sigmask"); } |
sewardj | 853f55d | 2002-04-26 00:27:53 +0000 | [diff] [blame] | 123 | //void pthread_testcancel ( void ) { unimp("pthread_testcancel"); } |
sewardj | 3b13f0e | 2002-04-25 20:17:29 +0000 | [diff] [blame] | 124 | void raise ( void ) { unimp("raise"); } |
| 125 | void sem_close ( void ) { unimp("sem_close"); } |
| 126 | void sem_open ( void ) { unimp("sem_open"); } |
| 127 | void sem_timedwait ( void ) { unimp("sem_timedwait"); } |
| 128 | void sem_unlink ( void ) { unimp("sem_unlink"); } |
| 129 | //void sigaction ( void ) { unimp("sigaction"); } |
| 130 | void siglongjmp ( void ) { unimp("siglongjmp"); } |
| 131 | void sigwait ( void ) { unimp("sigwait"); } |
| 132 | |
| 133 | #if 0 |
| 134 | void pthread_create@@GLIBC_2.1 ( void ) { unimp("pthread_create@@GLIBC_2.1"); } |
| 135 | void pthread_create@GLIBC_2.0 ( void ) { unimp("pthread_create@GLIBC_2.0"); } |
| 136 | |
| 137 | void sem_wait@@GLIBC_2.1 ( void ) { unimp("sem_wait@@GLIBC_2.1"); } |
| 138 | void sem_wait@GLIBC_2.0 ( void ) { unimp("sem_wait@GLIBC_2.0"); } |
| 139 | |
| 140 | void sem_trywait@@GLIBC_2.1 ( void ) { unimp("sem_trywait@@GLIBC_2.1"); } |
| 141 | void sem_trywait@GLIBC_2.0 ( void ) { unimp("sem_trywait@GLIBC_2.0"); } |
| 142 | |
| 143 | void sem_post@@GLIBC_2.1 ( void ) { unimp("sem_post@@GLIBC_2.1"); } |
| 144 | void sem_post@GLIBC_2.0 ( void ) { unimp("sem_post@GLIBC_2.0"); } |
| 145 | |
| 146 | void sem_destroy@@GLIBC_2.1 ( void ) { unimp("sem_destroy@@GLIBC_2.1"); } |
| 147 | void sem_destroy@GLIBC_2.0 ( void ) { unimp("sem_destroy@GLIBC_2.0"); } |
| 148 | void sem_getvalue@@GLIBC_2.1 ( void ) { unimp("sem_getvalue@@GLIBC_2.1"); } |
| 149 | void sem_getvalue@GLIBC_2.0 ( void ) { unimp("sem_getvalue@GLIBC_2.0"); } |
| 150 | void sem_init@@GLIBC_2.1 ( void ) { unimp("sem_init@@GLIBC_2.1"); } |
| 151 | void sem_init@GLIBC_2.0 ( void ) { unimp("sem_init@GLIBC_2.0"); } |
| 152 | |
| 153 | void pthread_attr_init@@GLIBC_2.1 ( void ) { unimp("pthread_attr_init@@GLIBC_2.1"); } |
| 154 | void pthread_attr_init@GLIBC_2.0 ( void ) { unimp("pthread_attr_init@GLIBC_2.0"); } |
| 155 | #endif |
sewardj | 5716dbb | 2002-04-26 03:28:18 +0000 | [diff] [blame] | 156 | |
sewardj | 5905fae | 2002-04-26 13:25:00 +0000 | [diff] [blame] | 157 | |
| 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 | |
| 165 | weak_alias (__pread64, pread64) |
| 166 | weak_alias (__pwrite64, pwrite64) |
| 167 | |
| 168 | weak_alias(pthread_rwlock_destroy, __pthread_rwlock_destroy) |
| 169 | weak_alias(pthread_rwlock_init, __pthread_rwlock_init) |
| 170 | weak_alias(pthread_rwlock_tryrdlock, __pthread_rwlock_tryrdlock) |
| 171 | weak_alias(pthread_rwlock_trywrlock, __pthread_rwlock_trywrlock) |
sewardj | 060b04f | 2002-04-26 21:01:13 +0000 | [diff] [blame] | 172 | //weak_alias(pthread_rwlock_wrlock, __pthread_rwlock_wrlock) |
sewardj | 5905fae | 2002-04-26 13:25:00 +0000 | [diff] [blame] | 173 | weak_alias(_IO_ftrylockfile, ftrylockfile) |
| 174 | |
| 175 | __attribute__((weak)) void pread ( void ) { vgPlain_unimp("pread"); } |
sewardj | 436e058 | 2002-04-26 14:31:40 +0000 | [diff] [blame] | 176 | __attribute__((weak)) void pwrite ( void ) { vgPlain_unimp("pwrite"); } |
sewardj | 5905fae | 2002-04-26 13:25:00 +0000 | [diff] [blame] | 177 | __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"); } |
sewardj | 436e058 | 2002-04-26 14:31:40 +0000 | [diff] [blame] | 184 | |
| 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"); } |