From 976d66925350e250ad7c2f87a2dcabd5516d3cf1 Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Thu, 4 Sep 2014 14:45:39 +0200 Subject: [PATCH] base-nova: remove special Thread_base::myself() The weak implementation was added for quite special purposes years ago and is no longer needed. On the other hand, the weak attribute does not help if the implementation ends up in a shared library, which first resolves symbols locally before asking ldso (that includes the acutal thread library) *shiver* --- repos/base-nova/src/base/lock/lock_helper.h | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/repos/base-nova/src/base/lock/lock_helper.h b/repos/base-nova/src/base/lock/lock_helper.h index a205215ecc..0908481175 100644 --- a/repos/base-nova/src/base/lock/lock_helper.h +++ b/repos/base-nova/src/base/lock/lock_helper.h @@ -28,19 +28,6 @@ extern int main_thread_running_semaphore(); -/** - * Resolve 'Thread_base::myself' when not linking the thread library - * - * This weak symbol is primarily used by test cases. Most other Genode programs - * use the thread library. If the thread library is not used, 'myself' can only - * be called by the main thread, for which 'myself' is defined as zero. - */ -Genode::Thread_base * __attribute__((weak)) Genode::Thread_base::myself() -{ - return 0; -} - - static inline bool thread_check_stopped_and_restart(Genode::Thread_base *thread_base) { Genode::addr_t sem = thread_base ?