diff options
Diffstat (limited to 'common/recipes-extended/openssl-qat/openssl-qat/0001-Use_sched_yield_api.patch')
-rw-r--r-- | common/recipes-extended/openssl-qat/openssl-qat/0001-Use_sched_yield_api.patch | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/common/recipes-extended/openssl-qat/openssl-qat/0001-Use_sched_yield_api.patch b/common/recipes-extended/openssl-qat/openssl-qat/0001-Use_sched_yield_api.patch deleted file mode 100644 index 1b7921fa..00000000 --- a/common/recipes-extended/openssl-qat/openssl-qat/0001-Use_sched_yield_api.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | From f4c50648752ee1000f606585f4df9fa6bd9ff8e8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Saul Wold <sgw@linux.intel.com> | ||
3 | Date: Wed, 8 Feb 2017 17:36:48 -0800 | ||
4 | Subject: [PATCH] openssl-qat: Use sched_yield() instead of pthread_yield() | ||
5 | |||
6 | sched_yield() is the correct POSIX API to use for thread switching | ||
7 | This futher supports building with MUSL. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
11 | --- | ||
12 | engines/qat_engine/e_qat.c | 5 +++-- | ||
13 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/engines/qat_engine/e_qat.c b/engines/qat_engine/e_qat.c | ||
16 | index 17d7935..af543bc 100644 | ||
17 | --- a/engines/qat_engine/e_qat.c | ||
18 | +++ b/engines/qat_engine/e_qat.c | ||
19 | @@ -90,6 +90,7 @@ | ||
20 | #include <stdio.h> | ||
21 | #include <stdlib.h> | ||
22 | #include <string.h> | ||
23 | +#include <sched.h> | ||
24 | #include <pthread.h> | ||
25 | #include <unistd.h> | ||
26 | #include <ctype.h> | ||
27 | @@ -545,7 +546,7 @@ CpaStatus myPerformOp(const CpaInstanceHandle instanceHandle, | ||
28 | pSrcBuffer, pDstBuffer, pVerifyResult); | ||
29 | if (status == CPA_STATUS_RETRY) { | ||
30 | qatPerformOpRetries++; | ||
31 | - pthread_yield(); | ||
32 | + sched_yield(); | ||
33 | if (uiRetry >= iMsgRetry | ||
34 | && iMsgRetry != QAT_INFINITE_MAX_NUM_RETRIES) { | ||
35 | break; | ||
36 | @@ -588,7 +589,7 @@ static void *sendPoll(void *ih) | ||
37 | if (likely(CPA_STATUS_SUCCESS == status)) { | ||
38 | /* Do nothing */ | ||
39 | } else if (CPA_STATUS_RETRY == status) { | ||
40 | - pthread_yield(); | ||
41 | + sched_yield(); | ||
42 | } else { | ||
43 | WARN("WARNING icp_sal_CyPollInstance returned status %d\n", | ||
44 | status); | ||
45 | -- | ||
46 | 2.7.4 | ||
47 | |||