Commit b5f36a96 authored by julien.delange's avatar julien.delange
Browse files

* src/po_hi_task.c

   src/po_hi_time.c
   - Adapt to be compliant with XENO_POSIX, behavior of
     RMA is now correct.


git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@2329 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent c9a08c04
......@@ -35,13 +35,13 @@ typedef struct
{
__po_hi_task_id id; /* Identifier of the task in the system */
__po_hi_time_t period;
#if defined(RTEMS_POSIX) || defined(POSIX) || defined (XENO_POSIX)
#if defined (RTEMS_POSIX) || defined (POSIX) || defined (XENO_POSIX)
__po_hi_time_t timer;
pthread_t tid; /* The pthread_t type used by the
POSIX library */
pthread_mutex_t mutex;
pthread_cond_t cond;
#elif defined(RTEMS_PURE)
#elif defined (RTEMS_PURE)
rtems_id ratemon_period;
rtems_id rtems_id;
#elif defined(XENO_NATIVE)
......@@ -57,7 +57,7 @@ __po_hi_task_t tasks[__PO_HI_NB_TASKS];
void __po_hi_wait_for_tasks ()
{
#if defined(RTEMS_POSIX) || defined(POSIX) || defined (XENO_POSIX)
#if defined (RTEMS_POSIX) || defined (POSIX) || defined (XENO_POSIX)
int i;
for (i = 0; i < __PO_HI_NB_TASKS; i++)
......@@ -78,7 +78,7 @@ void __po_hi_wait_for_tasks ()
int __po_hi_compute_next_period (__po_hi_task_id task)
{
#if defined(RTEMS_POSIX) || defined(POSIX)
#if defined (RTEMS_POSIX) || defined (POSIX) || defined (XENO_POSIX)
__po_hi_time_t mytime;
if (__po_hi_get_time (&mytime) != __PO_HI_SUCCESS)
......
......@@ -16,7 +16,7 @@
#include <po_hi_returns.h>
#include <po_hi_debug.h>
#if defined (POSIX) || defined (RTEMS_POSIX)
#if defined (POSIX) || defined (RTEMS_POSIX) || defined (XENO_POSIX)
#include <pthread.h>
#elif defined (RTEMS_PURE)
#include <bsp.h>
......@@ -44,7 +44,7 @@ int clock_gettime(int clk_id, struct timespec *tp)
int __po_hi_get_time (__po_hi_time_t* mytime)
{
#if defined (POSIX) || defined (RTEMS_POSIX)
#if defined (POSIX) || defined (RTEMS_POSIX) || defined (XENO_POSIX)
struct timespec ts;
__po_hi_time_t tmp;
......@@ -107,7 +107,7 @@ __po_hi_time_t __po_hi_microseconds (__po_hi_uint32_t microseconds)
int __po_hi_delay_until (__po_hi_time_t time)
{
#if defined (POSIX) || defined (RTEMS_POSIX)
#if defined (POSIX) || defined (RTEMS_POSIX) || defined (XENO_POSIX)
pthread_mutex_t mutex;
pthread_cond_t cond;
struct timespec timer;
......
Markdown is supported
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