rt_task_unblock() POSIX alternative

Jan Kiszka jan.kiszka at siemens.com
Tue Apr 7 16:59:12 CEST 2020


On 07.04.20 15:41, Petr ńĆervenka via Xenomai wrote:
> Hello everyone.
> I there a rt_task_unblock() Xenomai POSIX skin alternative?
> I created an example of periodic POSIX task, similar to the latency example but with very long period. When I receive a INT signal I set the end flag and I would like to unblock a task that waits on read(timerfd). But all my attempts led to standard wait timeout or worse.

Try pthread_cancel(). If you need to run some cleanup code in the target 
thread, use pthread_cleanup_push. None of that would be with real-time 
qualities, though. But I assume that the cleanup is not a time-critical 
path, is it?

Sending a Linux signal would be another way to interrupt the target task.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux



More information about the Xenomai mailing list