diff options
| author | Khem Raj <raj.khem@gmail.com> | 2019-12-15 19:38:04 -0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2019-12-16 08:38:35 -0800 |
| commit | 29126c33387229ae2cb585b863de7b17c317f86e (patch) | |
| tree | 083ca2b9a8e6f7bd55894f12d2e733dd9ffbb85d | |
| parent | 72e1e79589b75901fe8543501c45eb25dcda55ff (diff) | |
| download | meta-openembedded-29126c33387229ae2cb585b863de7b17c317f86e.tar.gz | |
rdma-core: Replace pthread_yield with sched_yield
Fixes
/usr/src/debug/rdma-core/26.1-r0/git/librdmacm/rsocket.c:3041: undefined reference to `pthread_yield'
collect2: error: ld returned 1 exit status
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Kai Kang <kai.kang@windriver.com>
| -rw-r--r-- | meta-networking/recipes-support/rdma-core/rdma-core/0001-librdmacm-Use-sched_yield-instead-of-pthread_yield.patch | 30 | ||||
| -rw-r--r-- | meta-networking/recipes-support/rdma-core/rdma-core_27.0.bb | 1 |
2 files changed, 31 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/rdma-core/rdma-core/0001-librdmacm-Use-sched_yield-instead-of-pthread_yield.patch b/meta-networking/recipes-support/rdma-core/rdma-core/0001-librdmacm-Use-sched_yield-instead-of-pthread_yield.patch new file mode 100644 index 0000000000..80abd33139 --- /dev/null +++ b/meta-networking/recipes-support/rdma-core/rdma-core/0001-librdmacm-Use-sched_yield-instead-of-pthread_yield.patch | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | From 6ac9562d756d42592994aeaac7a5e7b2bbce5cab Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 14 Dec 2019 14:07:57 -0800 | ||
| 4 | Subject: [PATCH] librdmacm: Use sched_yield instead of pthread_yield | ||
| 5 | |||
| 6 | glibc redirects pthread_yield to sched_yield additionally we get it | ||
| 7 | working with musl on linux | ||
| 8 | |||
| 9 | Upstream-Status: Submitted [https://github.com/linux-rdma/rdma-core/pull/635] | ||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | --- | ||
| 12 | librdmacm/rsocket.c | 2 +- | ||
| 13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 14 | |||
| 15 | diff --git a/librdmacm/rsocket.c b/librdmacm/rsocket.c | ||
| 16 | index 89ae2139..7fc5b266 100644 | ||
| 17 | --- a/librdmacm/rsocket.c | ||
| 18 | +++ b/librdmacm/rsocket.c | ||
| 19 | @@ -3038,7 +3038,7 @@ static int rs_poll_enter(void) | ||
| 20 | pthread_mutex_lock(&mut); | ||
| 21 | if (suspendpoll) { | ||
| 22 | pthread_mutex_unlock(&mut); | ||
| 23 | - pthread_yield(); | ||
| 24 | + sched_yield(); | ||
| 25 | return -EBUSY; | ||
| 26 | } | ||
| 27 | |||
| 28 | -- | ||
| 29 | 2.24.1 | ||
| 30 | |||
diff --git a/meta-networking/recipes-support/rdma-core/rdma-core_27.0.bb b/meta-networking/recipes-support/rdma-core/rdma-core_27.0.bb index b7a3dfc0d9..361d69b337 100644 --- a/meta-networking/recipes-support/rdma-core/rdma-core_27.0.bb +++ b/meta-networking/recipes-support/rdma-core/rdma-core_27.0.bb | |||
| @@ -8,6 +8,7 @@ RDEPENDS_${PN} = "bash perl" | |||
| 8 | BRANCH = "stable-v${@d.getVar('PV').split('.')[0]}" | 8 | BRANCH = "stable-v${@d.getVar('PV').split('.')[0]}" |
| 9 | SRC_URI = "git://github.com/linux-rdma/rdma-core.git;branch=${BRANCH} \ | 9 | SRC_URI = "git://github.com/linux-rdma/rdma-core.git;branch=${BRANCH} \ |
| 10 | file://0001-Remove-man-files-which-cant-be-built.patch \ | 10 | file://0001-Remove-man-files-which-cant-be-built.patch \ |
| 11 | file://0001-librdmacm-Use-sched_yield-instead-of-pthread_yield.patch \ | ||
| 11 | " | 12 | " |
| 12 | SRCREV = "84caf035ae6123e2296b72006cd2cf698c65eb46" | 13 | SRCREV = "84caf035ae6123e2296b72006cd2cf698c65eb46" |
| 13 | S = "${WORKDIR}/git" | 14 | S = "${WORKDIR}/git" |
