Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

px4_platform_common/sem.h: Enable SEM_PRIO_INHERIT by default #503

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion platforms/common/include/px4_platform_common/sem.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ typedef sem_t px4_sem_t;

__BEGIN_DECLS

#define px4_sem_init sem_init
#define px4_sem_init(s, p, v) ({ \
int __ret; \
do { __ret = sem_init(s, p, v); sem_setprotocol(s, SEM_PRIO_INHERIT); } while(0); \
__ret; \
})

#define px4_sem_setprotocol sem_setprotocol
#define px4_sem_wait sem_wait
#define px4_sem_trywait sem_trywait
Expand Down