Now ptask_init() takes three parameters: the scheduling policy (SCHED_FIFO, SCHED_RR or SCHED_OTHER), the global flag (PARTITIONED or GLOBAL), and the semaphore protocol (PRIO_INHERITANCE or PRIO_CEILING).
Now ptime_t -> ptime Now tspec_t -> tspec
ptime is a common name, quite easy to come up with and use in your program. Maybe it is better to go back and use ptime_t again
Now, if you specify act_flag=ACT then the thread starts right away (as in pthread). If you specify act_flag=NOACT, then the thread waits for an explicit activation with the task_activate()
The latter is also valid for aperiodic tasks. Now, a task (both periodic and aperiodic) has the same structure:
while (…) { <task body> wait_for_instance(); }
if the task is periodic, the wait_for_instance waits until the end of the period; if it is aperiodic, the wait_for_instance() waits for an explicit activate.
Function wait_for_activation() has been kept, and is simply blocks the task on a private semaphore until the task is activated expliticely with a task_activate(). This function can be invoked by both periodic and aperiodic tasks without distinctions.
Now their name starts with ptask_ for uniformity of the interface.
To measure wcet, use module tstat.h
In particular, the allegro_exit() produces a core-dump. I still do not know what is going on with that.
Not clear why. Here is the error message:
> pcp: pthread_mutex_lock.c:459: __pthread_mutex_lock_full: Assertion `mutex->__data.__owner == 0’ failed. > Aborted (core dumped)
- Solved many bugs related to macros
- Changed the interface for ptask_param_add_mode()
Crashes on exit of pcp.c is still there.