Skip to content
Snippets Groups Projects

win32: thread: simplify the millisecond waits

Merged Steve Lhomme requested to merge robUx4/vlc:win32-wait into master

Following this remark, I factorized the code in vlc_tick_wait() to always use vlc_atomic_timedwait() even on Win7+ builds running on Win7.

Also cleaned up the milliseconds passed as DWORD in Windows API. DWORD is an unsigned long so we can put up to ULONG_MAX in it.

And exit early when we know a call timed out. No need to call vlc_tick_now() and its fluctuating precision to know that yes we timed out.


v2:

  • removed the Win7 use of WaitOnAddress for vlc_tick_wait()
  • fix the rounding of the vlc_tick_wait() delay in win7/non killable threads
Edited by Steve Lhomme

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading