Commit a4e3a4ed authored by jdelange's avatar jdelange
Browse files

* po-hi-c/src/po_hi_main.c

   po-hi-c/src/po_hi_protected.c
   - Fix testsuite compilation issue



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@3527 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent d74a8e63
......@@ -13,7 +13,6 @@
/* included files from the generated code */
#include <po_hi_config.h>
#include <po_hi_common.h>
#include <po_hi_returns.h>
#include <po_hi_monitor.h>
#include <po_hi_task.h>
......
......@@ -153,20 +153,18 @@ int __po_hi_mutex_init (__po_hi_mutex_t* mutex, const __po_hi_mutex_protocol_t p
}
#endif
#ifdef XENO_NATIVE
if (rt_mutex_create (&mutex->xeno_mutex, NULL) != 0)
{
__PO_HI_DEBUG_DEBUG ("[PROTECTED] Error while creating mutex\n");
return __PO_HI_ERROR_UNKNOWN;
}
}
if (rt_mutex_create (&mutex->xeno_mutex, NULL) != 0)
{
__PO_HI_DEBUG_DEBUG ("[PROTECTED] Error while creating mutex\n");
return __PO_HI_ERROR_UNKNOWN;
}
#endif
#ifdef RTEMS_PURE
if (rtems_semaphore_create (rtems_build_name ('P', 'S', 'E' , 'A' + (char) nb_mutex++), 1, RTEMS_BINARY_SEMAPHORE, __PO_HI_DEFAULT_PRIORITY, &mutex->rtems_mutex) != RTEMS_SUCCESSFUL)
{
__DEBUGMSG ("[PROTECTED] Cannot create RTEMS binary semaphore\n");
return __PO_HI_ERROR_PROTECTED_CREATE;
}
}
if (rtems_semaphore_create (rtems_build_name ('P', 'S', 'E' , 'A' + (char) nb_mutex++), 1, RTEMS_BINARY_SEMAPHORE, __PO_HI_DEFAULT_PRIORITY, &mutex->rtems_mutex) != RTEMS_SUCCESSFUL)
{
__DEBUGMSG ("[PROTECTED] Cannot create RTEMS binary semaphore\n");
return __PO_HI_ERROR_PROTECTED_CREATE;
}
#endif
return (__PO_HI_SUCCESS);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment