From: Thomas Schwinge <tschwinge@baylibre.com>
To: Andrew Stubbs <ams@baylibre.com>, newlib@sourceware.org
Subject: amdgcn: Implement proper locks: Fix 'newlib/libc/sys/amdgcn/include/sys/lock.h' for C++ (was: [PATCH] amdgcn: Implement proper locks)
Date: Thu, 04 Apr 2024 16:05:47 +0200 [thread overview]
Message-ID: <874jchfcjo.fsf@euler.schwinge.ddns.net> (raw)
In-Reply-To: <20240322145330.761851-1-ams@baylibre.com>
[-- Attachment #1: Type: text/plain, Size: 934 bytes --]
Hi!
On 2024-03-22T14:53:30+0000, Andrew Stubbs <ams@baylibre.com> wrote:
> This should prevent printf output from multiple threads getting garbled.
Confirmed, thanks!
> I don't know why IO ever worked properly -- probably it was always a bit
> broken -- but the GFX11 devices have a different cache architecture and
> trying to print from many threads at once corrupted the FILE buffers.
> --- /dev/null
> +++ b/newlib/libc/sys/amdgcn/include/sys/lock.h
> @@ -0,0 +1,39 @@
> +#ifndef __SYS_LOCK_H__
> +#define __SYS_LOCK_H__
> +
> +#include <newlib.h>
> +#include <_ansi.h>
> +
> +typedef unsigned int _LOCK_T;
> +[...]
> +
> +#ifdef __cplusplus
> +}
> +#endif
> +
> +#endif /* __SYS_LOCK_H__ */
Pushed to main branch commit ed50a50b9b551ed693d28cd458a49e5196d27f06
"amdgcn: Implement proper locks: Fix 'newlib/libc/sys/amdgcn/include/sys/lock.h' for C++",
see attached.
Grüße
Thomas
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-amdgcn-Implement-proper-locks-Fix-newlib-libc-sys-am.patch --]
[-- Type: text/x-diff, Size: 1093 bytes --]
From ed50a50b9b551ed693d28cd458a49e5196d27f06 Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <tschwinge@baylibre.com>
Date: Thu, 4 Apr 2024 16:01:35 +0200
Subject: [PATCH] amdgcn: Implement proper locks: Fix
'newlib/libc/sys/amdgcn/include/sys/lock.h' for C++
As of commit 7dd4eb1db9e1b1b9f14ef5b743705156e5f370e1
"amdgcn: Implement proper locks", we get, by the thousands, for C++ code:
In file included from [...]/newlib/libc/include/stdio.h:60,
from [...]:
[...]/newlib/libc/include/sys/reent.h:911:1: error: expected declaration before '}' token
---
newlib/libc/sys/amdgcn/include/sys/lock.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/newlib/libc/sys/amdgcn/include/sys/lock.h b/newlib/libc/sys/amdgcn/include/sys/lock.h
index 0e0e667e5e..1f41cf2f7d 100644
--- a/newlib/libc/sys/amdgcn/include/sys/lock.h
+++ b/newlib/libc/sys/amdgcn/include/sys/lock.h
@@ -4,6 +4,10 @@
#include <newlib.h>
#include <_ansi.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef unsigned int _LOCK_T;
typedef unsigned int _LOCK_RECURSIVE_T;
--
2.34.1
prev parent reply other threads:[~2024-04-04 14:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-22 14:53 [PATCH] amdgcn: Implement proper locks Andrew Stubbs
2024-03-25 10:35 ` Corinna Vinschen
2024-04-04 14:05 ` Thomas Schwinge [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874jchfcjo.fsf@euler.schwinge.ddns.net \
--to=tschwinge@baylibre.com \
--cc=ams@baylibre.com \
--cc=newlib@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).