From 15ad984ba10f78eae940505c18c6cca036c0864b Mon Sep 17 00:00:00 2001 From: martin Date: Sat, 4 Feb 2023 16:19:20 +0000 Subject: [PATCH] Pull up following revision(s) (requested by uwe in ticket #1584): lib/libc/thread-stub/thread-stub.c: revision 1.31 change libc sched_yield() stub to actually still call the syscall instead of doing nothing when app is not linked with pthread; this matches other systems suggested by Mateusz Guzik in: http://mail-index.netbsd.org/tech-kern/2020/07/19/msg026620.html --- lib/libc/thread-stub/thread-stub.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/libc/thread-stub/thread-stub.c b/lib/libc/thread-stub/thread-stub.c index 8a7cc6bed42f..d066a8d24076 100644 --- a/lib/libc/thread-stub/thread-stub.c +++ b/lib/libc/thread-stub/thread-stub.c @@ -1,4 +1,4 @@ -/* $NetBSD: thread-stub.c,v 1.29.2.1 2023/02/04 14:41:39 martin Exp $ */ +/* $NetBSD: thread-stub.c,v 1.29.2.2 2023/02/04 16:19:20 martin Exp $ */ /*- * Copyright (c) 2003, 2009 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: thread-stub.c,v 1.29.2.1 2023/02/04 14:41:39 martin Exp $"); +__RCSID("$NetBSD: thread-stub.c,v 1.29.2.2 2023/02/04 16:19:20 martin Exp $"); #endif /* LIBC_SCCS and not lint */ /* @@ -394,12 +394,13 @@ __libc_thr_self_stub(void) return ((thr_t) -1); } +/* This is the strong symbol generated for sched_yield(2) via WSYSCALL() */ +int _sys_sched_yield(void); + int __libc_thr_yield_stub(void) { - - /* Nothing to do. */ - return (0); + return _sys_sched_yield(); } int