Joel Sherrill started a new discussion on cpukit/posix/src/semclockwait.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/669#note_130761 > +#include "config.h" > +#endif > + > +#include <rtems/posix/semaphoreimpl.h> > +#include <rtems/posix/posixapi.h> > +#include <rtems/score/todimpl.h> > + > +int sem_clockwait( > + sem_t *__restrict _sem, > + clockid_t clock_id, > + const struct timespec *__restrict abstime > +) > +{ > + > + if (!_POSIX_Is_valid_clock_id( clock_id ) ){ > + return EINVAL; Per POSIX this is wrong: > If the call was unsuccessful, the state of the semaphoreshall be unchanged, > and the functions shall return a value of −1 and set errnoto indicate the > error. As a general rule, POSIX methods follow that pattern unless the name starts with pthread_. But always read the specification carefully. -- View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/669#note_130761 You're receiving this email because of your account on gitlab.rtems.org.
_______________________________________________ bugs mailing list [email protected] http://lists.rtems.org/mailman/listinfo/bugs
