Changeset 83789ea2 in mainline for kernel/generic/src/time/timeout.c


Ignore:
Timestamp:
2023-02-09T16:12:24Z (2 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c0b54c9
Parents:
ba25c4b
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2022-08-16 17:52:15)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-02-09 16:12:24)
Message:

Simplify timeout handling

Since timeout_unregister() now waits for the handler to complete,
we can get rid of some of the bookkeeping in waitq and thread code.
We can also turn timeout_t into a local variable instead of
keeping it around in thread_t.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/time/timeout.c

    rba25c4b r83789ea2  
    128128bool timeout_unregister(timeout_t *timeout)
    129129{
     130        if (atomic_load_explicit(&timeout->finished, memory_order_acquire))
     131                /* The timeout fired and finished already, no need to check the list. */
     132                return false;
     133
    130134        assert(timeout->cpu);
    131135
Note: See TracChangeset for help on using the changeset viewer.