<br><font size=2 face="sans-serif">I just have changed the value of </font><font size=2><tt>sigev.sigev_notify</tt></font><font size=2 face="sans-serif">
to SIGEV_SIGNAL (just to verify) and I got the same error.</font>
<br>
<br>
<br>
<br>
<br><font size=2><tt>rtems-users-bounces+aitor.viana.sanchez=esa.int@rtems.org
wrote on 13/06/2007 21:13:24:<br>
<br>
> Aitor.Viana.Sanchez@esa.int wrote:<br>
> ><br>
> > Hi all,<br>
> ><br>
> > i am having a look to the CANFestival v3.0 trying to port it
to RTEMS.<br>
> > I get the code already running over RTEMS but I have a problem
with<br>
> > the timer_create POSIX function.<br>
> ><br>
> > The main.c source code gets inside the RTEMS configuration which<br>
> > includes:<br>
> ><br>
> > ...<br>
> > #define CONFIGURE_MAXIMUM_TIMERS
10<br>
> > ...<br>
> ><br>
> > /** RTEMS Configuration */<br>
> > #define CONFIGURE_MAXIMUM_RTEMS_TIMERS CONFIGURE_MAXIMUM_TIMERS<br>
> > ...<br>
> ><br>
> > /** POSIX Configuration */<br>
> > #define CONFIGURE_MAXIMUM_POSIX_TIMERS
CONFIGURE_MAXIMUM_TIMERS<br>
> > ...<br>
> ><br>
> > When I try to create a timer calling the timer_create routine:<br>
> > ....<br>
> ><br>
> > memset (&sigev, 0, sizeof (struct
sigevent));<br>
> > sigev.sigev_value.sival_int = 0;<br>
> > sigev.sigev_notify = SIGEV_THREAD;<br>
> > sigev.sigev_notify_attributes = NULL;<br>
> > sigev.sigev_notify_function = timer_notify;<br>
> ><br>
> > status = timer_create (CLOCK_REALTIME,
&sigev, &timer);<br>
> > if (status != 0)<br>
> >
MSG_ERR(errno, strerror(errno), status);<br>
> ><br>
> > .....<br>
> ><br>
> > i got an error which is quite weird. I got the errno = 22 which
is<br>
> > "invalid argument", that means that the specified clockid<br>
> > (CLOCK_REALTIME) is not defined. Nevertheless, i tried to call
the<br>
> > function clock_gettime, which also needs the clockid (CLOCK_REALTIME)<br>
> > as a parameter, and i got no problem at all.<br>
> ><br>
> > I am using RTEMS 4.6.5.<br>
> ><br>
> > Do you have any idea that could help me to solve this problem
?<br>
> ><br>
> Looking in cpukit/posix/src/ptimer1.c, I see other reasons for EINVAL:<br>
</tt></font>
<br><font size=2><tt>> if (evp != NULL) {<br>
> /* The structure has data */<br>
> if ( ( evp->sigev_notify != SIGEV_NONE ) &&</tt></font>
<br><font size=2><tt>> ( evp->sigev_notify != SIGEV_SIGNAL ) ) {<br>
> /* The value of the field sigev_notify is not valid */<br>
> rtems_set_errno_and_return_minus_one( EINVAL );</tt></font>
<br><font size=2><tt>> }<br>
</tt></font>
<br><font size=2><tt>> if ( !evp->sigev_signo )<br>
> rtems_set_errno_and_return_minus_one( EINVAL );</tt></font>
<br><font size=2><tt>> <br>
> if ( !is_valid_signo(evp->sigev_signo) )<br>
> rtems_set_errno_and_return_minus_one( EINVAL );</tt></font>
<br><font size=2><tt>> }<br>
</tt></font>
<br><font size=2><tt>> <br>
> It looks like SIGEV_THREAD is not currently supported.<br>
</tt></font>
<br><font size=2><tt>> If you need it, I would be happy to give you
an estimate on<br>
> implementing it for you.<br>
</tt></font>
<br><font size=2><tt>> Thanks.<br>
</tt></font>
<br><font size=2><tt>> --joel<br>
> > Cheers<br>
> ><br>
> ><br>
> ><br>
> > -----------------------------<br>
> > Aitor Viana Sánchez<br>
> ><br>
> > ESA - European Space Technology Centre (ESTEC)<br>
> > TEC-EDD - Data Handling and Computing Section<br>
> > ESA/ESTEC P.O. Box 299 / 2200AG Noordwijk ZH, The Netherlands<br>
> > Tel (+31) 71 565 6727<br>
> > Email: aitor.viana.sanchez@esa.int<br>
> > ------------------------------------------------------------------------<br>
> ><br>
> > _______________________________________________<br>
> > rtems-users mailing list<br>
> > rtems-users@rtems.com<br>
> > http://rtems.rtems.org/mailman/listinfo/rtems-users<br>
> ><br>
</tt></font>
<br><font size=2><tt>> _______________________________________________<br>
> rtems-users mailing list<br>
> rtems-users@rtems.com<br>
> http://rtems.rtems.org/mailman/listinfo/rtems-users</tt></font>