Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#3117 closed enhancement (fixed)

score: Optimize _Thread_queue_Enqueue() timeout handling

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 5.1
Component: score Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

Use the Thread_queue_Context::enqueue_callout to do the timeout handling. This avoids the switch statement in _Thread_queue_Timeout(). It removes the thread queue dependency to _Thread_Timeout().

Change History (24)

comment:1 Changed on 08/24/17 at 09:52:09 by Sebastian Huber

Summary: score: Optimize _Thread_queue_Enqueue()score: Optimize _Thread_queue_Enqueue() timeout handling

comment:2 Changed on 10/09/17 at 12:18:01 by Sebastian Huber

Milestone: Indefinite4.12.0
Status: assignedaccepted

comment:3 Changed on 10/17/17 at 06:31:01 by Sebastian Huber <sebastian.huber@…>

In [changeset:"bf2a53d272107b8b224b1a48694da24d2d042442/rtems" bf2a53d2/rtems]:

score: Rename watchdog variants

Rename PER_CPU_WATCHDOG_RELATIVE in PER_CPU_WATCHDOG_MONOTONIC to
highlight the corresponding POSIX CLOCK_MONOTONIC.

Rename PER_CPU_WATCHDOG_ABSOLUTE in PER_CPU_WATCHDOG_REALTIME to
highlight the corresponding POSIX CLOCK_REALTIME.

Update #3117.
Update #3182.

comment:4 Changed on 10/17/17 at 06:31:14 by Sebastian Huber <sebastian.huber@…>

In [changeset:"91ce012ced085682e271af4bf33e112dc968d4b9/rtems" 91ce012c/rtems]:

score: Rename _Watchdog_Per_CPU_insert_monotonic()

Rename _Watchdog_Per_CPU_insert_monotonic() in
_Watchdog_Per_CPU_insert_ticks().

Update #3117.
Update #3182.

comment:5 Changed on 10/17/17 at 11:57:07 by Sebastian Huber <sebastian.huber@…>

In [changeset:"9a583a94d372afba5a2796189b40f8efa16bcfd4/rtems-libbsd" 9a583a9/rtems-libbsd]:

SLEEPQUEUE(9): Update due to API changes

Update #3117.
Update #3182.

comment:6 Changed on 10/24/17 at 08:20:25 by Sebastian Huber <sebastian.huber@…>

In [changeset:"028786263f8e23d85723e0751f132401cd4dbc44/rtems" 02878626/rtems]:

score: Add _Thread_Add_timeout_ticks()

Replace _Thread_Timer_insert_monotonic() with
_Thread_Add_timeout_ticks().

Update #3117.
Update #3182.

comment:7 Changed on 10/24/17 at 08:20:37 by Sebastian Huber <sebastian.huber@…>

In [changeset:"27cfe7c86ba0801f4961871869ec4e691ca694f3/rtems" 27cfe7c/rtems]:

score: Add _Watchdog_Ticks_per_second

This value is frequently used. Avoid the function call overhead and the
integer division at run-time.

Update #3117.
Update #3182.

comment:8 Changed on 10/24/17 at 08:20:49 by Sebastian Huber <sebastian.huber@…>

In [changeset:"e0dc6efcf0f7d6da2cc0ac08303e1382f6bf4e69/rtems" e0dc6ef/rtems]:

rtems: Simplify RTEMS_MILLISECONDS_TO_MICROSECONDS

Remove the cast so that it can be used in C pre-processor directives.

Update #3117.
Update #3182.

comment:9 Changed on 10/24/17 at 08:21:01 by Sebastian Huber <sebastian.huber@…>

In [changeset:"381ef5c83393d3707cf74f40f1edc2d0404c3ee6/rtems" 381ef5c/rtems]:

confdefs: Warn about problematic ticks per second

A non-integer clock ticks per second value may lead to inaccurate time
format conversions.

Update #3117.
Update #3182.

comment:10 Changed on 10/24/17 at 08:21:13 by Sebastian Huber <sebastian.huber@…>

In [changeset:"ecef36987538fe7daf033c0c9344413355d615b1/rtems" ecef3698/rtems]:

score: Rename _Watchdog_Ticks_from_*()

Rename _Watchdog_Ticks_from_*() to _Watchdog_Realtime_from_*().

This highlights that these routines are used for the CLOCK_REALTIME
watchdogs (in contrast to CLOCK_MONOTONIC).

Update #3117.
Update #3182.

comment:11 Changed on 10/24/17 at 08:21:25 by Sebastian Huber <sebastian.huber@…>

In [changeset:"adaf5c232e680630e77c697fafa31dff4f3e1d24/rtems" adaf5c23/rtems]:

score: _Watchdog_Is_far_future_realtime_timespec()

Update #3117.
Update #3182.

comment:12 Changed on 10/24/17 at 08:21:36 by Sebastian Huber <sebastian.huber@…>

In [changeset:"d16d07fbb82132e185835382201243c5eab5417a/rtems" d16d07f/rtems]:

score: Add _Watchdog_Is_valid_interval_timespec()

Update #3117.
Update #3182.

comment:13 Changed on 10/24/17 at 08:21:48 by Sebastian Huber <sebastian.huber@…>

In [changeset:"7ed377bc69e8cf96b989018322dc43bc0f2d2e36/rtems" 7ed377b/rtems]:

score: _Watchdog_Is_far_future_monotonic_timespec

Update #3117.
Update #3182.

comment:14 Changed on 10/24/17 at 08:22:00 by Sebastian Huber <sebastian.huber@…>

In [changeset:"cea5ff700166a24b5da300cf0aa6884164600ed3/rtems" cea5ff7/rtems]:

score: Add _Watchdog_Nanoseconds_per_tick

Move it from the configuration to a separate variable.

Update #3117.
Update #3182.

comment:15 Changed on 10/24/17 at 08:22:12 by Sebastian Huber <sebastian.huber@…>

In [changeset:"b13ec804763d8f428161a50fd1846d567982ed4b/rtems" b13ec80/rtems]:

score: Add _Watchdog_Monotonic_from_timespec()

Update #3117.
Update #3182.

comment:16 Changed on 10/24/17 at 08:22:24 by Sebastian Huber <sebastian.huber@…>

In [changeset:"57479629094a7b1a13a6fb03c3162cb53367022c/rtems" 5747962/rtems]:

score: _Watchdog_Per_CPU_lazy_insert_monotonic()

Update #3117.
Update #3182.

comment:17 Changed on 10/24/17 at 08:22:36 by Sebastian Huber <sebastian.huber@…>

In [changeset:"6de1f92121f947f9c379747d66135fd8a500d0f5/rtems" 6de1f92/rtems]:

score: Add _Thread_Continue()

Update #3117.
Update #3182.

comment:18 Changed on 10/24/17 at 08:22:48 by Sebastian Huber <sebastian.huber@…>

In [changeset:"1666ffe535b5e2ca801dafa13437fc2bd041cd3a/rtems" 1666ffe5/rtems]:

score: Rename function threadq support function

Rename _Thread_queue_Context_set_do_nothing_enqueue_callout() into
_Thread_queue_Context_set_enqueue_do_nothing_extra(). More
_Thread_queue_Context_set_enqueue_*() functions will follow.

Update #3117.
Update #3182.

comment:19 Changed on 10/24/17 at 08:23:00 by Sebastian Huber <sebastian.huber@…>

In [changeset:"c31058947491ca319c901040219be39e4f8155b6/rtems" c3105894/rtems]:

score: Move thread queue timeout handling

Update #3117.
Update #3182.

comment:20 Changed on 10/24/17 at 08:52:31 by Sebastian Huber

Resolution: fixed
Status: acceptedclosed

comment:21 Changed on 10/24/17 at 10:20:24 by Sebastian Huber <sebastian.huber@…>

In [changeset:"2fcf5aadd584c08066ddc03b9b4f79eaf17d9d24/rtems-libbsd" 2fcf5aa/rtems-libbsd]:

rtems-bsd-mutex: Update due to API changes

Update #3117.

comment:22 Changed on 11/09/17 at 06:27:14 by Sebastian Huber

Milestone: 4.12.05.1

Milestone renamed

comment:23 Changed on 03/22/18 at 07:43:06 by Sebastian Huber <sebastian.huber@…>

In [changeset:"3da2f4711d3691716b9f0b468978fe43cdc91df8/rtems" 3da2f471/rtems]:

mpci: Update due to thread queue API changes

Update #3117.
Update #3182.

comment:24 Changed on 03/22/18 at 08:06:14 by Sebastian Huber <sebastian.huber@…>

In [changeset:"7353422fc350c29f08a757696d25fdb38a297bef/rtems" 7353422f/rtems]:

mpci: Fix _MPCI_Enqueue_callout()

Update #3117.
Update #3182.

Note: See TracTickets for help on using tickets.