Module Name: src
Committed By: martin
Date: Sat Feb 4 16:19:20 UTC 2023
Modified Files:
src/lib/libc/thread-stub [netbsd-9]: thread-stub.c
Log Message:
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
To generate a diff of this commit:
cvs rdiff -u -r1.29.2.1 -r1.29.2.2 src/lib/libc/thread-stub/thread-stub.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/thread-stub/thread-stub.c
diff -u src/lib/libc/thread-stub/thread-stub.c:1.29.2.1 src/lib/libc/thread-stub/thread-stub.c:1.29.2.2
--- src/lib/libc/thread-stub/thread-stub.c:1.29.2.1 Sat Feb 4 14:41:39 2023
+++ src/lib/libc/thread-stub/thread-stub.c Sat Feb 4 16:19:20 2023
@@ -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 @@ __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