Bug 206741 - [PATCH] libcap 2.33 use sched_yield instead of pthread_yield
Summary: [PATCH] libcap 2.33 use sched_yield instead of pthread_yield
Status: RESOLVED CODE_FIX
Alias: None
Product: Tools
Classification: Unclassified
Component: libcap (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Andrew G. Morgan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-03 06:54 UTC by Adam Schaefers
Modified: 2020-03-07 18:52 UTC (History)
1 user (show)

See Also:
Kernel Version: 5.5.7
Subsystem:
Regression: No
Bisected commit-id:


Attachments
psx.c use sched_yield instead of pthread_yield (432 bytes, patch)
2020-03-03 06:54 UTC, Adam Schaefers
Details | Diff

Description Adam Schaefers 2020-03-03 06:54:24 UTC
Created attachment 287773 [details]
psx.c use sched_yield instead of pthread_yield

Hi,

The man page for pthread_yield says to use sched_yield instead, and if you look at glibc implementation, it's just a wrapper around sched_yield (https://sourceware.org/git/?p=glibc.git;a=blob;f=nptl/pthread_yield.c;h=57d103cb388a00a8a0f7c4ce6cccaa83744b2235;hb=HEAD)

This patch allows building 2.33 libcap using other libc's, like musl.

Thank you.

-Adam Schaefers
Comment 1 Adam Schaefers 2020-03-03 07:02:41 UTC
I forgot to mention, the downstream bug report, https://github.com/kisslinux/community/issues/495

Thank you.
Comment 2 Andrew G. Morgan 2020-03-07 18:52:32 UTC
Applied:

https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=551bbc17d64237da0555a817fd4552bd706dd987

This will be included in the future 2.34 release.

Note You need to log in before you can comment on or make changes to this bug.