Ignore:
Timestamp:
May 16, 2003, 11:21:00 AM (22 years ago)
Author:
sandervl
Message:

PF: Eat first WM_MOUSEMOVE while menu tracking like windows does; SvL: Use our fast critical sections instead of OS/2 mutex semaphores in the timer code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/timer.cpp

    r6269 r10102  
    1 /* $Id: timer.cpp,v 1.14 2001-07-09 18:09:13 sandervl Exp $ */
     1/* $Id: timer.cpp,v 1.15 2003-05-16 09:21:00 sandervl Exp $ */
    22
    33/*
     
    2323#include "oslibutil.h"
    2424#include "timer.h"
     25#include <odincrt.h>
    2526
    2627#define DBG_LOCALLOG    DBG_timer
     
    5253static TIMER TimersArray[NB_TIMERS];
    5354
    54 HMTX hSemTimer;
     55static CRITICAL_SECTION_OS2 timercritsect = {0};
    5556
    5657inline void EnterCriticalSection (void)
    5758{
    58    if (hSemTimer == NULLHANDLE)
    59       DosCreateMutexSem (NULL, &hSemTimer, 0L, 1);
    60    else
    61       DosRequestMutexSem (hSemTimer, SEM_INDEFINITE_WAIT);
     59   if (timercritsect.hmtxLock == 0)
     60      DosInitializeCriticalSection(&timercritsect, NULL);
     61
     62   DosEnterCriticalSection(&timercritsect);
    6263}
    6364
    6465inline void LeaveCriticalSection (void)
    6566{
    66    DosReleaseMutexSem (hSemTimer);
     67   DosLeaveCriticalSection(&timercritsect);
    6768}
    6869
Note: See TracChangeset for help on using the changeset viewer.