xref: /aosp_15_r20/external/ltp/testcases/realtime/m4/check.m4 (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1AC_DEFUN([REALTIME_CHECK_PRIO_INHERIT],[
2AC_MSG_CHECKING([for PTHREAD_PRIO_INHERIT])
3AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4#include <pthread.h>]], [[int main(void) {
5	pthread_mutexattr_t attr;
6	return pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
7}]])],[has_priority_inherit="yes"],[])
8if test "x$has_priority_inherit" = "xyes" ; then
9	AC_DEFINE(HAS_PRIORITY_INHERIT,1,[Define to 1 if you have PTHREAD_PRIO_INHERIT])
10	AC_MSG_RESULT(yes)
11else
12	AC_MSG_RESULT(no)
13fi
14])
15