RTEMS | Add timespec_get() support to RTEMS (!670)

Sebastian Huber (@sebhub) gitlab at rtems.org
Tue Aug 19 14:31:02 UTC 2025



Merge request https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/670 was reviewed by Sebastian Huber

--
  
Sebastian Huber started a new discussion on cpukit/posix/src/timespecget.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/670#note_128999

 > +int  timespec_get(struct timespec *ts, int base)
 > +{
 > +  if( !ts ){

`if ( ts == NULL ) {`

--
  
Sebastian Huber started a new discussion on cpukit/posix/src/timespecget.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/670#note_129000

 > +
 > +#include <time.h>
 > +#include <errno.h>

Not needed: errno.h, rtems/seterr.h, rtems/timespec.h.

--
  
Sebastian Huber started a new discussion on testsuites/psxtests/psxtimes01/init.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/670#note_129001

 >  clock_t _times_r(struct _reent *ptr, struct tms  *ptms);
 >  clock_t _times(struct tms  *ptms);
 > +void test_times_functions(void);

Use static functions.

--
  
Sebastian Huber started a new discussion on testsuites/psxtests/psxtimes01/init.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/670#note_129002

 > +#include <time.h>
 >  #include <errno.h>
 > +#include <rtems/score/todimpl.h>

Do we really need this internal header file?


-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/670
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250819/15c5a6f1/attachment-0001.htm>


More information about the bugs mailing list