another example which confuse me:
##
void write_task_proc(void *arg){
        int err;
        RTIME write_time;
        ssize_t sz = sizeof(RTIME);
        ssize_t written = 0;
        err = rt_task_set_periodic(NULL,
TM_NOW,rt_timer_ns2ticks(write_task_period_ns));
        printf("%d\n",err);
if (err) {
                printf(WTASK_PREFIX "error on set periodic, %s\n",
                        strerror(-err));
        }
        while (1) {
                printf("test1\n");
                err = rt_task_wait_period(NULL);
                printf("%d\n",err);
                printf("test2\n");
                if (err) {
                        printf(WTASK_PREFIX "error on rt_task_wait_period, 
%s\n", strerror(-err));
                        break;
                }
....
##
the code does compile, test1 is printed but neither err or test2.
so what makes my code stoping executing there?
The documentation sais "If NULL, this count will never be copied
back." about the argument, but exactlly what does that mean?

Why does the work in other code examples I have?

/Bachman
On 12/09/2007, Bachman Kharazmi <[EMAIL PROTECTED]> wrote:
> > You can copy this code almost unmodified into an application and compile
> > it against the Xenomai POSIX skin. The serial port configuration apart
> > (same under Linux, though), it will open "rtser<whatever>", even if
> > given like "/dev/rtser...", and work on that port as if it where a Linux
> > one. Life can be simple, sometimes.
>
> Simple? ;)
> I've tried to write a c-program which basiclly should open the device
> rtser0 and write 100x to it and then close.
>
> The simple program can be found here: http://pastebin.ca/693873
>
> I've connected the serial cable to a reading terminal, but there's no
> data at all, when I run the binary. :/
>
> /Bachman
>

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to