Error when using RTEMS_MICROSECONDS_TO_TICKS

Gedare Bloom gedare at rtems.org
Tue May 11 06:11:38 UTC 2021


On Sun, May 9, 2021 at 9:33 AM Richi Dubey <richidubey at gmail.com> wrote:
>
> Hi,
>
> I am using the line: rtems_task_wake_after(RTEMS_MICROSECONDS_TO_TICKS(6000)); in my test program to emulate a 6 seconds sleep. But when I deubg the program using qemu, I do not see it waiting for 6 seconds; on debugging, there is a error of a shared library file not found, which leads to the ticks being 0. Can someone please help?
>

Yes, 6000 microseconds isn't 6 seconds.

> Debug log:
>
> ----------------------------------------------------------------------------------------------------------
> 35  rtems_task_wake_after(RTEMS_MICROSECONDS_TO_TICKS(6000));
> (gdb) si
> 0x00101176 135  rtems_task_wake_after(RTEMS_MICROSECONDS_TO_TICKS(6000));
> (gdb)
> 0x00101178 135  rtems_task_wake_after(RTEMS_MICROSECONDS_TO_TICKS(6000));
> (gdb)
> 0x0010117c 135  rtems_task_wake_after(RTEMS_MICROSECONDS_TO_TICKS(6000));
> (gdb)
> __udivsi3 () at ../../../../../../gnu-mirror-gcc-57b5da3/libgcc/config/arm/lib1funcs.S:1104
> 1104 ../../../../../../gnu-mirror-gcc-57b5da3/libgcc/config/arm/lib1funcs.S: No such file or directory.
> (gdb)
> 1105 in ../../../../../../gnu-mirror-gcc-57b5da3/libgcc/config/arm/lib1funcs.S
> (gdb) ni
> 1106 in ../../../../../../gnu-mirror-gcc-57b5da3/libgcc/config/arm/lib1funcs.S
> (gdb)
> 1107 in ../../../../../../gnu-mirror-gcc-57b5da3/libgcc/config/arm/lib1funcs.S
> (gdb) si
> 1108 in ../../../../../../gnu-mirror-gcc-57b5da3/libgcc/config/arm/lib1funcs.S
> (gdb) ni
> 1109 in ../../../../../../gnu-mirror-gcc-57b5da3/libgcc/config/arm/lib1funcs.S
> (gdb)
> 1118 in ../../../../../../gnu-mirror-gcc-57b5da3/libgcc/config/arm/lib1funcs.S
> (gdb)
> 1119 in ../../../../../../gnu-mirror-gcc-57b5da3/libgcc/config/arm/lib1funcs.S
> (gdb)
> 1120 in ../../../../../../gnu-mirror-gcc-57b5da3/libgcc/config/arm/lib1funcs.S
> (gdb)
> 1121 in ../../../../../../gnu-mirror-gcc-57b5da3/libgcc/config/arm/lib1funcs.S
> (gdb)
> 0x00101180 in test () at ../../../testsuites/smptests/smpschededf05/init.c:135
> 135  rtems_task_wake_after(RTEMS_MICROSECONDS_TO_TICKS(6000));
> (gdb) si
> 0x00101182 135  rtems_task_wake_after(RTEMS_MICROSECONDS_TO_TICKS(6000));
> (gdb)
> 0x00101184 135  rtems_task_wake_after(RTEMS_MICROSECONDS_TO_TICKS(6000));
> (gdb)
> rtems_task_wake_after (ticks=16777216) at ../../../cpukit/rtems/src/taskwakeafter.c:30
> 30 {
> (gdb)
> 0x00108b44 30 {
> (gdb) ni
> 0x00108b46 30 {
> (gdb)
> 0x00108b48 30 {
> (gdb)
> 38  cpu_self = _Thread_Dispatch_disable();
> (gdb)
> 0x00108b4e 38  cpu_self = _Thread_Dispatch_disable();
> (gdb)
> 39    executing = _Per_CPU_Get_executing( cpu_self );
> (gdb)
> 0x00108b52 39    executing = _Per_CPU_Get_executing( cpu_self );
> (gdb)
> 0x00108b56 39    executing = _Per_CPU_Get_executing( cpu_self );
> (gdb)
> 41    if ( ticks == 0 ) {
> (gdb)
> 0x00108b5a 41    if ( ticks == 0 ) {
> (gdb) p ticks
> $1 = 0
> (gdb)
>
> ----------------------------------------------------------------------------------------------------------
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list