AW: AW: [PATCH 08/12] kern_tc.c: Add definition of tc_getfrequency in kern_tc

Gabriel.Moyano at dlr.de Gabriel.Moyano at dlr.de
Thu Apr 7 12:54:10 UTC 2022


> On 07/04/2022 12:43, Gabriel.Moyano at dlr.de wrote:
> >
> >> On 07/04/2022 10:36, Gabriel Moyano wrote:
> >>> ---
> >>>    cpukit/score/src/kern_tc.c | 2 +-
> >>>    1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/cpukit/score/src/kern_tc.c b/cpukit/score/src/kern_tc.c
> >>> index a8ba268ea3..dd718b3bab 100644
> >>> --- a/cpukit/score/src/kern_tc.c
> >>> +++ b/cpukit/score/src/kern_tc.c
> >>> @@ -1506,7 +1506,6 @@ unlock:
> >>>    #endif /* __rtems__ */
> >>>    }
> >>>
> >>> -#ifndef __rtems__
> >>>    /* Report the frequency of the current timecounter. */
> >>>    uint64_t
> >>>    tc_getfrequency(void)
> >>> @@ -1515,6 +1514,7 @@ tc_getfrequency(void)
> >>>    	return (timehands->th_counter->tc_frequency);
> >>>    }
> >>>
> >>> +#ifndef __rtems__
> >>>    static bool
> >>>    sleeping_on_old_rtc(struct thread *td)
> >>>    {
> >> Please add this new global function to <rtems/score/timecounter.h>.
> >>
> > uint64_t tc_getfrequency(void) is already declared in
> > cpukit/include/sys/timetc.h
> 
> Yes, this is fine, please just have a look how the other global functions in this file are used:
> 
> nm build/arm/xilinx_zynq_a9_qemu/cpukit/score/src/kern_tc.c.65.o -g --defined-only
> 00000000 T rtems_clock_get_boot_time
> 00000000 T rtems_clock_get_boot_time_bintime
> 00000000 T rtems_clock_get_boot_time_timeval
> 00000000 T rtems_clock_get_monotonic
> 00000000 T rtems_clock_get_monotonic_bintime
> 00000000 T rtems_clock_get_monotonic_coarse
> 00000000 T rtems_clock_get_monotonic_coarse_bintime
> 00000000 T rtems_clock_get_monotonic_coarse_timeval
> 00000000 T rtems_clock_get_monotonic_sbintime
> 00000000 T rtems_clock_get_monotonic_timeval
> 00000000 T rtems_clock_get_realtime
> 00000000 T rtems_clock_get_realtime_bintime
> 00000000 T rtems_clock_get_realtime_coarse
> 00000000 T rtems_clock_get_realtime_coarse_bintime
> 00000000 T rtems_clock_get_realtime_coarse_timeval
> 00000000 T rtems_clock_get_realtime_timeval
> 00000000 D _Timecounter
> 00000000 T _Timecounter_Bintime
> 00000000 T _Timecounter_Binuptime
> 00000000 T _Timecounter_Getbintime
> 00000000 T _Timecounter_Getbinuptime
> 00000000 T _Timecounter_Getboottime
> 00000000 T _Timecounter_Getboottimebin
> 00000000 T _Timecounter_Getmicrotime
> 00000000 T _Timecounter_Getmicrouptime
> 00000000 T _Timecounter_Getnanotime
> 00000000 T _Timecounter_Getnanouptime
> 00000000 T _Timecounter_Install
> 00000000 T _Timecounter_Microtime
> 00000000 T _Timecounter_Microuptime
> 00000000 T _Timecounter_Nanotime
> 00000000 T _Timecounter_Nanouptime
> 00000000 T _Timecounter_Sbinuptime
> 00000000 T _Timecounter_Set_clock
> 00000000 T _Timecounter_Set_NTP_update_second
> 00000000 T _Timecounter_Tick
> 00000000 T _Timecounter_Tick_simple
> 00000000 D _Timecounter_Time_second
> 00000000 D _Timecounter_Time_uptime
> 
Sorry, I didn't follow you here. tc_getfrequency() is already declared. Do you want to change its name?


More information about the devel mailing list