help with createTimer - VxWorks

This is a discussion on help with createTimer - VxWorks ; Hi I'm having problem with the following code. It works with the simpc but not on my board which is wrsbc8548 int createTimer (void) { timer_t timerid; /* create timer */ if (timer_create (CLOCK_REALTIME, NULL, &timerid) == ERROR) { //printf ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: help with createTimer

  1. help with createTimer

    Hi
    I'm having problem with the following code. It works with the simpc
    but not on my board which is wrsbc8548


    int createTimer (void)
    {
    timer_t timerid;



    /* create timer */
    if (timer_create (CLOCK_REALTIME, NULL, &timerid) == ERROR) {
    //printf ("create FAILED\n");
    return (ERROR);
    }
    return (OK);
    }


    i got
    value=-1 in the target host shell when run in 8548board and
    value=0 in simpc

    what could be wrong ?
    thx
    Tugrul

  2. Re: help with createTimer

    The example of code looks fine. It would be quite useful to know what
    the reported errno is (use printErrno (errnoGet()). Could it be a
    VxWorks configuration mismatch? For instance may be the VxWorks image
    on your PPC board is lacking the INCLUDE_POSIX_TIMERS component?

    --
    PAD

  3. Re: help with createTimer

    On 10 Aralęk, 19:52, PAD wrote:
    > The example of code looks fine. It would be quite useful to know what
    > the reported errno is (use printErrno (errnoGet()). Could it be a
    > VxWorks configuration mismatch? For instance may be the VxWorks image
    > on your PPC board is lacking the INCLUDE_POSIX_TIMERS component?
    >
    > --
    > PAD


    Hi
    The INCLUDE_POSIX_TIMERS component was missing as you said.
    Thanks

+ Reply to Thread