aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/go-semacquire.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/runtime/go-semacquire.c')
-rw-r--r--libgo/runtime/go-semacquire.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/libgo/runtime/go-semacquire.c b/libgo/runtime/go-semacquire.c
index 05b6377..7c77c0b 100644
--- a/libgo/runtime/go-semacquire.c
+++ b/libgo/runtime/go-semacquire.c
@@ -117,35 +117,3 @@ runtime_semrelease (uint32 *addr)
__go_assert (i == 0);
}
}
-
-
-#ifndef HAVE_SYNC_FETCH_AND_ADD_4
-
-/* For targets which don't have the required sync support. Really
- this should be provided by gcc itself. FIXME. */
-
-static pthread_mutex_t sync_lock = PTHREAD_MUTEX_INITIALIZER;
-
-uint32
-__sync_fetch_and_add_4(uint32*, uint32)
- __attribute__((visibility("hidden")));
-
-uint32
-__sync_fetch_and_add_4(uint32* ptr, uint32 add)
-{
- int i;
- uint32 ret;
-
- i = pthread_mutex_lock(&sync_lock);
- __go_assert(i == 0);
-
- ret = *ptr;
- *ptr += add;
-
- i = pthread_mutex_unlock(&sync_lock);
- __go_assert(i == 0);
-
- return ret;
-}
-
-#endif