Changeset c77cfd8 in mainline for uspace/app/taskbar/types/clock.h


Ignore:
Timestamp:
2022-10-04T19:55:25Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e0e612b
Parents:
3fd38b2
Message:

Proper timer cleanup, unit tests

Destroying a timer that sets itself again (i.e., runs periodically) is
a little tricky. It requires a handshake (similar to destroying a worker
thread). Realizing that this handshake works correctly is a little bit
mind boggling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/taskbar/types/clock.h

    r3fd38b2 rc77cfd8  
    5555        gfx_rect_t rect;
    5656
     57        /** Clock lock */
     58        fibril_mutex_t lock;
     59
    5760        /** Clock update timer */
    5861        fibril_timer_t *timer;
     62
     63        /** Signal to timer that we are cleaning up */
     64        bool timer_cleanup;
     65
     66        /** Signal to maih thread that timer is done */
     67        bool timer_done;
     68
     69        /** Timer done condition variable */
     70        fibril_condvar_t timer_done_cv;
    5971} taskbar_clock_t;
    6072
Note: See TracChangeset for help on using the changeset viewer.