Error when using RTEMS_MICROSECONDS_TO_TICKS

Richi Dubey richidubey at gmail.com
Sun May 9 15:32:42 UTC 2021


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?

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)

----------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210509/e2d04bc8/attachment-0001.html>


More information about the devel mailing list