Home | History | Annotate | Download | only in m4
      1 AC_DEFUN([REALTIME_CHECK_PRIO_INHERIT],[
      2 AC_MSG_CHECKING([for PTHREAD_PRIO_INHERIT])
      3 AC_TRY_COMPILE([
      4 #ifndef _GNU_SOURCE
      5 #define _GNU_SOURCE
      6 #endif
      7 #include <pthread.h>],[int main(void) {
      8 	pthread_mutexattr_t attr;
      9 	return pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
     10 }],[has_priority_inherit="yes"],[])
     11 if test "x$has_priority_inherit" = "xyes" ; then
     12 	AC_DEFINE(HAS_PRIORITY_INHERIT,1,[Define to 1 if you have PTHREAD_PRIO_INHERIT])
     13 	AC_MSG_RESULT(yes)
     14 else
     15 	AC_MSG_RESULT(no)
     16 fi
     17 ])
     18 
     19 AC_DEFUN([REALTIME_CHECK_ROBUST_APIS],[
     20 AC_MSG_CHECKING([for pthread_mutexattr_*robust* APIs])
     21 AC_TRY_COMPILE([
     22 #ifndef _GNU_SOURCE
     23 #define _GNU_SOURCE
     24 #endif
     25 #include <pthread.h>],[int main(void) {
     26 	pthread_mutexattr_t attr;
     27 	return pthread_mutexattr_setrobust_np(&attr, 0);
     28 }],[has_robust="yes"])
     29 if test "x$has_robust" = "xyes" ; then
     30 	AC_DEFINE(HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS,1,[Define to 1 if you have pthread_mutexattr_*robust* APIs])
     31 	AC_MSG_RESULT(yes)
     32 else
     33 	AC_MSG_RESULT(no)
     34 fi
     35 ])
     36 
     37 AC_DEFUN([REALTIME_CHECK_ROBUST_APIS],[
     38 AC_MSG_CHECKING([for pthread_mutexattr_*robust* APIs])
     39 AC_TRY_COMPILE([
     40 #ifndef _GNU_SOURCE
     41 #define _GNU_SOURCE
     42 #endif
     43 #include <pthread.h>],[int main(void) {
     44 	pthread_mutexattr_t attr;
     45 	return pthread_mutexattr_setrobust_np(&attr, 0);
     46 }],[has_robust="yes"])
     47 if test "x$has_robust" = "xyes" ; then
     48 	AC_DEFINE(HAS_PTHREAD_MUTEXTATTR_ROBUST_APIS,1,[Define to 1 if you have pthread_mutexattr_*robust* APIs])
     49 	AC_MSG_RESULT(yes)
     50 else
     51 	AC_MSG_RESULT(no)
     52 fi
     53 ])
     54