AW: Dependencies of PPS API in rtems-libbsd
Gabriel.Moyano at dlr.de
Gabriel.Moyano at dlr.de
Wed Mar 16 07:04:02 UTC 2022
Hello Sebastian,
> On 15/03/2022 16:31, Gabriel.Moyano at dlr.de wrote:
> > I'm working on enabling PPS support in RTEMS
>
> does this mean you want to define PPS_SYNC for kern_tc.c and kern_ntptime.c in RTEMS?
yes
> I guess you want to enable tc_poll_pps in struct timecounter as well?
I didn't plan to do that but it can be done just removing some #ifndef, right?
> For what do you need the sleep() and wakeup() support? Is this only used by the RFC 2783 PPS-API implementation?
Yes, they are required by pps_fetch() and pps_event()
> If you want to keep implement this in RTEMS, then you can convert this to use a condition variable from <sys/lock.h> or
> <rtems/thread.h>.
Do you mean to add a condition variable, for example in struct pps_state, and to replace sleep() and wakeup() by wait and signal? It is good idea if we don't want to use the first functions.
> All the uses of sleep() and wakeup() need to be clearly identified and if possible avoided.
May I ask, what is the reason for avoiding them?
What do you think about coping the functions lmax()/qmin() and the define for ENOIOCTL? For lmax()/qmin() I saw that the file where are defined (libkern.h) is in libnetworking. Not sure what it is the best option here, I don't like when the things are duplicated.
What about tvtohz(), which is defined in rtemsbsd/rtems/rtems-kernel-timesupport.c?
Best regards,
Gabriel
More information about the devel
mailing list