Paolo Gai wrote: > Dear all, > > here is another small demo... this time of a periodic thread in POSIX. > > It works under Xenomai, but it fails under Posix Real-Time. > > The reason of the failure is the SIGUSR1 not being blocked by the main > thread. If in main() the comments below the note "// REMOVE THE COMMENTS > BELOW" are removed, then the signal is masked also in the main(), and as > a result the POSIX version works. > > The question I have is if the behavior in Xenomai (that is, not failing > like the POSIX counterpart) is correct or not... > Without having read your program in details and thought about the signal behaviour as well, just two general remarks: 1. Signals are not yet supported by Xenomai in primary mode. All you receive are Linux signals so that the real-time thread is effectively running only in secondary mode (also due to the printf). 2. Periodic threads can be set up more easily and efficiently under POSIX by using clock_nanosleep with absolute timeouts. Jan