Re: [Xenomai] timer_create( ) example in Xenomai-3

2015-09-09 Thread Philippe Gerum
On 09/09/2015 03:29 PM, Konstantinos Chalas wrote: > For future reference, this is what a working POSIX timer in Xenomai > looks like: > Good you got it working. A few additional hints: > void* print_time (void* args) > { > struct timespec tp; > char buffer [80]; > struct itimerspec

Re: [Xenomai] timer_create( ) example in Xenomai-3

2015-09-09 Thread Gilles Chanteperdrix
On Wed, Sep 09, 2015 at 03:29:26PM +0200, Konstantinos Chalas wrote: > For future reference, this is what a working POSIX timer in Xenomai looks Unfortunately, this code is a very bad reference - you ignore some function potential errors - and even in the case you do not ignore them, you do not ta

Re: [Xenomai] timer_create( ) example in Xenomai-3

2015-09-09 Thread Konstantinos Chalas
For future reference, this is what a working POSIX timer in Xenomai looks like: #include #include #include #include #include #include #include void* print_time (void*); timer_t timer1; pthread_t thread; int main (int argc, char **argv) { pthread_create(&thread, NULL, print_time, NU

Re: [Xenomai] timer_create( ) example in Xenomai-3

2015-09-07 Thread Philippe Gerum
On 09/07/2015 01:53 PM, Konstantinos Chalas wrote: > Hello everyone, > > Does any of you have a working implementation of timer_create( ) in > Xenomai-3? > > According to the documentation /only thread-directed notification is > supported (evp->sigev_notify set to//SIGEV_THREAD_ID//). The thing i

[Xenomai] timer_create( ) example in Xenomai-3

2015-09-07 Thread Konstantinos Chalas
Hello everyone, Does any of you have a working implementation of timer_create( ) in Xenomai-3? According to the documentation /only thread-directed notification is supported (evp->sigev_notify set to//SIGEV_THREAD_ID//). The thing is that the use of //SIG/EV_THREAD_ID is not common, therefor