]> rtime.felk.cvut.cz Git - frescor/fosa.git/blobdiff - src_aquosa/fosa_threads_and_signals.c
Updated for compilation on older systems without PTHREAD_PRIO_INHERIT
[frescor/fosa.git] / src_aquosa / fosa_threads_and_signals.c
index 03e31160e9c69f305f4c32b842db9d9048554086..a5910719576f8858a49e764acc8c30422cdb8035 100644 (file)
 #include "fosa_configuration_parameters.h"
 #include "fosa_threads_and_signals.h"
 
+#ifdef OMK_FOR_USER            /* If compiled by OMK, use the config */
+#include "fosa_config.h"
+#endif
+
 /*************************
  * Storage of thread-specific keys
  *************************/
@@ -82,8 +86,10 @@ int init_keys()
        ret = pthread_mutexattr_init(&attr);
        if (ret) return errno;
 
+#ifndef CONFIG_NO_PRIO_INHERIT /* Not supported on older systems */
        ret = pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
        if (ret) return errno;
+#endif
 
        ret = pthread_mutex_init(&key_lock,&attr);
        if (ret) return errno;