Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/lib/libc/thread-stub Pull up following revision(s) (reque...



details:   https://anonhg.NetBSD.org/src/rev/a8a929bca1f4
branches:  netbsd-9
changeset: 373379:a8a929bca1f4
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Feb 04 16:19:20 2023 +0000

description:
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

diffstat:

 lib/libc/thread-stub/thread-stub.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (35 lines):

diff -r 4c169e1b610d -r a8a929bca1f4 lib/libc/thread-stub/thread-stub.c
--- a/lib/libc/thread-stub/thread-stub.c        Sat Feb 04 14:42:43 2023 +0000
+++ b/lib/libc/thread-stub/thread-stub.c        Sat Feb 04 16:19:20 2023 +0000
@@ -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 <sys/cdefs.h>
 #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 @@
        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



Home | Main Index | Thread Index | Old Index