Fix pthread_yield is deprecated
(cherry picked from commit 2cb0f61c399fcbf29cbaf957eb83a09fe364c9d9)
This commit is contained in:
parent
d2fbe77bc3
commit
d827ee1d2a
25
0002-fix-pthread_yield.patch
Normal file
25
0002-fix-pthread_yield.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From f0c7130d9186dbb62367c0eb6c4d2ae6f78ef577 Mon Sep 17 00:00:00 2001
|
||||||
|
From: caodongxia <315816521@qq.com>
|
||||||
|
Date: Thu, 12 Aug 2021 11:49:36 +0800
|
||||||
|
Subject: [PATCH] pthread_yield is deprecated, use sched_yield instead
|
||||||
|
|
||||||
|
---
|
||||||
|
KAE/utils/engine_utils.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/KAE/utils/engine_utils.h b/KAE/utils/engine_utils.h
|
||||||
|
index 12a587e..f0b69b2 100644
|
||||||
|
--- a/KAE/utils/engine_utils.h
|
||||||
|
+++ b/KAE/utils/engine_utils.h
|
||||||
|
@@ -129,7 +129,7 @@ static inline void kae_memcpy(void *src, const void *dst, int len)
|
||||||
|
|
||||||
|
static inline void kae_pthread_yield()
|
||||||
|
{
|
||||||
|
- (void)pthread_yield(); //lint !e1055
|
||||||
|
+ (void)sched_yield(); //lint !e1055
|
||||||
|
}
|
||||||
|
|
||||||
|
int kae_create_thread(pthread_t *thread_id, const pthread_attr_t *attr,
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
6
kae.spec
6
kae.spec
@ -3,7 +3,7 @@
|
|||||||
Name: libkae
|
Name: libkae
|
||||||
Summary: Huawei Kunpeng Accelerator Engine
|
Summary: Huawei Kunpeng Accelerator Engine
|
||||||
Version: 1.2.10
|
Version: 1.2.10
|
||||||
Release: 4
|
Release: 5
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
Source: %{name}-%{version}.tar.gz
|
Source: %{name}-%{version}.tar.gz
|
||||||
Vendor: Huawei Corporation
|
Vendor: Huawei Corporation
|
||||||
@ -18,6 +18,7 @@ Requires: openssl
|
|||||||
ExclusiveArch: aarch64
|
ExclusiveArch: aarch64
|
||||||
|
|
||||||
Patch0001: 0001-Don-t-redefine-gettid-if-glibc-provides-it.patch
|
Patch0001: 0001-Don-t-redefine-gettid-if-glibc-provides-it.patch
|
||||||
|
Patch0002: 0002-fix-pthread_yield.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package contains the Huawei Kunpeng Accelerator Engine
|
This package contains the Huawei Kunpeng Accelerator Engine
|
||||||
@ -67,6 +68,9 @@ fi
|
|||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 12 2021 caodongxia <caodongxia@huawei.com> 1.2.10-5
|
||||||
|
- Fix pthread_yield is deprecated
|
||||||
|
|
||||||
* Tue Jul 28 2020 lingsheng <lingsheng@huawei.com> 1.2.10-4
|
* Tue Jul 28 2020 lingsheng <lingsheng@huawei.com> 1.2.10-4
|
||||||
- Check glibc version to avoid redefine gettid()
|
- Check glibc version to avoid redefine gettid()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user