diff options
author | M Joonas Pihlaja <jpihlaja@cc.helsinki.fi> | 2010-03-04 04:46:13 +0200 |
---|---|---|
committer | M Joonas Pihlaja <jpihlaja@cc.helsinki.fi> | 2010-03-04 04:46:13 +0200 |
commit | 9ef5cfce720e903442cbf2818192330bb4b71fe4 (patch) | |
tree | 1f9711dce9d5899c7ae1ab470807cf29fe93f2a7 | |
parent | 45a8a4b0f52dd3311cd095aa1b17b2fcd380d833 (diff) |
Add minimal spin lock support.extra-stubs
-rw-r--r-- | list.txt | 8 | ||||
-rw-r--r-- | stubs.c | 36 |
2 files changed, 40 insertions, 4 deletions
@@ -93,9 +93,9 @@ alias("zero", [[pthread_setschedparam]]) alias("zero", [[pthread_setschedprio]]) alias("na", [[pthread_setspecific]]) alias("na", [[pthread_sigmask]]) -alias("na", [[pthread_spin_destroy]]) -alias("na", [[pthread_spin_init]]) -alias("na", [[pthread_spin_lock]]) +alias("zero", [[pthread_spin_destroy]]) +alias("zero", [[pthread_spin_init]]) +alias("zero", [[pthread_spin_lock]]) alias("na", [[pthread_spin_trylock]]) -alias("na", [[pthread_spin_unlock]]) +alias("zero", [[pthread_spin_unlock]]) alias("na", [[pthread_testcancel]]) @@ -444,6 +444,42 @@ int pthread_setschedprio() __attribute__ ((weak, alias ("__pthread_zero_stub"))) # endif #endif +#ifndef HAVE_PTHREAD_SPIN_DESTROY +#define NEED_ZERO_STUB +# ifdef SUPPORT_ATTRIBUTE_ALIAS +int pthread_spin_destroy() __attribute__ ((weak, alias ("__pthread_zero_stub"))); +# else +# pragma weak pthread_spin_destroy = __pthread_zero_stub +# endif +#endif + +#ifndef HAVE_PTHREAD_SPIN_INIT +#define NEED_ZERO_STUB +# ifdef SUPPORT_ATTRIBUTE_ALIAS +int pthread_spin_init() __attribute__ ((weak, alias ("__pthread_zero_stub"))); +# else +# pragma weak pthread_spin_init = __pthread_zero_stub +# endif +#endif + +#ifndef HAVE_PTHREAD_SPIN_LOCK +#define NEED_ZERO_STUB +# ifdef SUPPORT_ATTRIBUTE_ALIAS +int pthread_spin_lock() __attribute__ ((weak, alias ("__pthread_zero_stub"))); +# else +# pragma weak pthread_spin_lock = __pthread_zero_stub +# endif +#endif + +#ifndef HAVE_PTHREAD_SPIN_UNLOCK +#define NEED_ZERO_STUB +# ifdef SUPPORT_ATTRIBUTE_ALIAS +int pthread_spin_unlock() __attribute__ ((weak, alias ("__pthread_zero_stub"))); +# else +# pragma weak pthread_spin_unlock = __pthread_zero_stub +# endif +#endif + #ifdef NEED_ZERO_STUB static int __pthread_zero_stub() { |