This is an automated email from the ASF dual-hosted git repository.

wwbmmm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-brpc.git


The following commit(s) were added to refs/heads/master by this push:
     new 11b2f52f Fix "sched_to itself" error when buidling by Clang on Linux 
aarch64 (#1950)
11b2f52f is described below

commit 11b2f52fcb15b6847907dff5fdc9971c3d8417ff
Author: Adonis Ling <[email protected]>
AuthorDate: Fri Oct 14 16:03:41 2022 +0800

    Fix "sched_to itself" error when buidling by Clang on Linux aarch64 (#1950)
---
 src/bthread/task_group.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/bthread/task_group.cpp b/src/bthread/task_group.cpp
index b8ead163..94ce5eb7 100644
--- a/src/bthread/task_group.cpp
+++ b/src/bthread/task_group.cpp
@@ -248,6 +248,9 @@ int TaskGroup::init(size_t runqueue_capacity) {
     return 0;
 }
 
+#if defined(__linux__) && defined(__aarch64__) && defined(__clang__)
+    __attribute__((optnone))
+#endif
 void TaskGroup::task_runner(intptr_t skip_remained) {
     // NOTE: tls_task_group is volatile since tasks are moved around
     //       different groups.
@@ -567,6 +570,9 @@ void TaskGroup::sched(TaskGroup** pg) {
     sched_to(pg, next_tid);
 }
 
+#if defined(__linux__) && defined(__aarch64__) && defined(__clang__)
+    __attribute__((optnone))
+#endif
 void TaskGroup::sched_to(TaskGroup** pg, TaskMeta* next_meta) {
     TaskGroup* g = *pg;
 #ifndef NDEBUG


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to