summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index 469c9748b2..e1b20be58a 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -1226,8 +1226,7 @@ ubf_wakeup_all_threads(void)
if (!ubf_threads_empty()) {
native_mutex_lock(&ubf_list_lock);
list_for_each(&ubf_list_head, dat, ubf_list) {
- th = (rb_thread_t *)(
- ((char *)dat) - offsetof(rb_thread_t, native_thread_data));
+ th = container_of(dat, rb_thread_t, native_thread_data);
ubf_wakeup_thread(th);
}
native_mutex_unlock(&ubf_list_lock);