Commit 105eb2a5 authored by yoogx's avatar yoogx

* Minor reformatting

parent f044fbb3
......@@ -271,17 +271,17 @@ __po_hi_uint8_t __po_hi_gqueue_store_in (__po_hi_task_id id,
__DEBUGMSG ("[GQUEUE] Semaphore got (id=%d)\n", id);
#elif defined (_WIN32)
EnterCriticalSection(&__po_hi_gqueues_cs[id]);
EnterCriticalSection(&__po_hi_gqueues_cs[id]);
#endif
if (__po_hi_gqueues_sizes[id][port] == __PO_HI_GQUEUE_FIFO_INDATA)
{
memcpy(ptr,request,sizeof(*request));
memcpy(ptr,request,sizeof(*request));
}
else
{
#ifdef __PO_HI_DEBUG
__DEBUGMSG ("[GQUEUE] Received message for task %d, port %d\n", id, port);
#endif
__DEBUGMSG ("[GQUEUE] Received message for task %d, port %d\n", id, port);
if (__po_hi_gqueues_used_size[id][port] == __po_hi_gqueues_sizes[id][port])
{
......@@ -486,7 +486,6 @@ int __po_hi_gqueue_get_value (__po_hi_task_id id,
EnterCriticalSection(&__po_hi_gqueues_cs[id]);
#endif
/*
* If the port is an event port, with no value queued, then we block
* the thread.
......
......@@ -26,11 +26,6 @@
#undef POSIX
#endif
#if defined (SIMULATOR) && defined (POSIX)
#error "fuck"
#endif
#if defined (RTEMS_POSIX) || defined (RTEMS_PURE)
#include <sys/cpuset.h>
#endif
......@@ -202,18 +197,19 @@ int __po_hi_compute_next_period (__po_hi_task_id task)
int __po_hi_wait_for_next_period (__po_hi_task_id task)
{
#if defined (POSIX) || defined (RTEMS_POSIX) || defined (XENO_POSIX)
int ret;
__PO_HI_INSTRUMENTATION_VCD_WRITE("0t%d\n", task);
__po_hi_task_delay_until (&(tasks[task].timer), task);
/*!
* Entry ports monitoring at dispatch if MONITORING is defined
*/
#if defined (MONITORING)
update_periodic_dispatch(task);
update_periodic_dispatch(task); // XXX ?
#endif
#if defined (POSIX) || defined (RTEMS_POSIX) || defined (XENO_POSIX)
int ret;
__PO_HI_INSTRUMENTATION_VCD_WRITE("0t%d\n", task);
__po_hi_task_delay_until (&(tasks[task].timer), task);
if ( (ret = __po_hi_compute_next_period (task)) != 1)
{
return (__PO_HI_ERROR_CLOCK);
......@@ -271,6 +267,7 @@ int __po_hi_wait_for_next_period (__po_hi_task_id task)
{
return (__PO_HI_ERROR_TASK_PERIOD);
}
return (__PO_HI_SUCCESS);
#else
return (__PO_HI_UNAVAILABLE);
......
......@@ -99,7 +99,7 @@ void start_scheduler (void) {
sched_current_context_id = 0;
sched_context = get_context(sched_current_context_id);
__DEBUGMSG ("[MAIN] Starting scheduler\n");
__DEBUGMSG ("[UM_THREADS] Starting scheduler\n");
scheduler();
}
......
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