VirtualBox

Changeset 89678 in vbox for trunk


Ignore:
Timestamp:
Jun 14, 2021 12:57:15 PM (3 years ago)
Author:
vboxsync
Message:

Runtime/r3/timer-posix: Fixes, if inversion causing an already stopped timer to be stopped again causing an error and a running timer to not be stopped at all. Fully initialize itimerspec when stopping a timer or timer_settime will return an error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/posix/timer-posix.cpp

    r82968 r89678  
    664664     * Suspend the timer if it's running.
    665665     */
    666     if (pTimer->fSuspended)
     666    if (!pTimer->fSuspended)
    667667    {
    668668        struct itimerspec TimerSpec;
     
    813813    TimerSpec.it_value.tv_sec     = 0;
    814814    TimerSpec.it_value.tv_nsec    = 0;
     815    TimerSpec.it_interval.tv_sec  = 0;
     816    TimerSpec.it_interval.tv_nsec = 0;
    815817    int err = timer_settime(pTimer->NativeTimer, 0, &TimerSpec, NULL);
    816818    int rc = err == 0 ? VINF_SUCCESS : RTErrConvertFromErrno(errno);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette