Changeset 1304 for trunk/dll


Ignore:
Timestamp:
Nov 30, 2008, 3:29:45 PM (17 years ago)
Author:
Gregg Young
Message:

Move DosEnterCritSec into SetMask Replace 2 more with semaphore(Ticket 308)

Location:
trunk/dll
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/comp.c

    r1221 r1304  
    27532753    if (cmp) {
    27542754      if (mp1) {
    2755         DosEnterCritSec();
     2755        //DosEnterCritSec(); // GKY 11-30-08 moved to SetMask
    27562756        SetMask((CHAR *)mp1, &cmp->dcd.mask);
    2757         DosExitCritSec();
     2757        //DosExitCritSec();
    27582758      }
    27592759      WinSetDlgItemText(hwnd, COMP_NOTE,
  • trunk/dll/dircnrs.c

    r1303 r1304  
    17671767
    17681768      if (mp1) {
    1769         DosEnterCritSec();
     1769        //DosEnterCritSec(); // GKY 11-30-08 moved to SetMask
    17701770        SetMask((CHAR *)mp1, &dcd->mask);
    1771         DosExitCritSec();
     1771        //DosExitCritSec();
    17721772      }
    17731773      dcd->suspendview = 1;
  • trunk/dll/filter.c

    r1249 r1304  
    623623            add_mask(test);
    624624            save_masks();
    625             DosEnterCritSec();
     625            //DosEnterCritSec(); // GKY 11-30-08 moved to SetMask
    626626            SetMask(mask->szMask, mask);
    627             DosExitCritSec();
     627            //DosExitCritSec();
    628628            WinDismissDlg(hwnd, 1);
    629629          }
     
    647647          if (SHORT1FROMMP(mp1) == DID_OK) {
    648648            *mask->szMask = 0;
    649             DosEnterCritSec();
     649            //DosEnterCritSec(); // GKY 11-30-08 moved to SetMask
    650650            SetMask(mask->szMask, mask);
    651             DosExitCritSec();
     651            //DosExitCritSec();
    652652            WinDismissDlg(hwnd, 1);
    653653          }
  • trunk/dll/fonts.c

    r1193 r1304  
    1010
    1111  05 Jan 08 SHL Sync
     12  29 Nov 08 GKY Remove or replace with a mutex semaphore DosEnterCriSec where appropriate.
    1213
    1314***********************************************************************/
     
    121122    *szTitle = GetPString(IDS_SETFONTTITLETEXT), *szPreview;
    122123
    123   DosEnterCritSec();
     124  //DosEnterCritSec(); //GKY 11-30-08
     125  DosRequestMutexSem(hmtxFM2Globals, SEM_INDEFINITE_WAIT);
    124126  szPreview = GetPString(IDS_BLURB1TEXT + counter++);
    125127  if (strcmp(szPreview, "0")) {
     
    127129    szPreview = GetPString(IDS_BLURB1TEXT + counter++);
    128130  }
    129   DosExitCritSec();
     131  DosReleaseMutexSem(hmtxFM2Globals);
     132  //DosExitCritSec();
    130133  memset(&fontdlg, 0, sizeof(fontdlg)); /* initialize all fields */
    131134  hps = WinGetPS(hwnd);
     
    182185  if ((flags & 1) && !fattrs)
    183186    return fattrs;
    184   DosEnterCritSec();
     187  //DosEnterCritSec(); //GKY 11-30-08
     188  DosRequestMutexSem(hmtxFM2Globals, SEM_INDEFINITE_WAIT);
    185189  szPreview = GetPString(IDS_BLURB1TEXT + counter++);
    186190  if (strcmp(szPreview, "0")) {
     
    188192    szPreview = GetPString(IDS_BLURB1TEXT + counter++);
    189193  }
    190   DosExitCritSec();
     194  DosReleaseMutexSem(hmtxFM2Globals);
     195  //DosExitCritSec();
    191196  memset(&fontDlg, 0, sizeof(fontDlg)); /* initialize all fields */
    192197  /*
  • trunk/dll/select.c

    r1226 r1304  
    529529  PSZ p;
    530530
     531  DosEnterCritSec();
    531532  if (maskstr)
    532533    strcpy(mask->szMask, maskstr);      // Got new mask string
     
    545546  }                                     // for
    546547  mask->pszMasks[x] = NULL;             // Mark end
     548  DosExitCritSec();
    547549}
    548550
  • trunk/dll/treecnr.c

    r1303 r1304  
    22862286
    22872287      if (mp1) {
    2288         DosEnterCritSec();
     2288        //DosEnterCritSec(); // GKY 11-30-08 moved to SetMask
    22892289        SetMask((CHAR *)mp1, &dcd->mask);
    2290         DosExitCritSec();
     2290        //DosExitCritSec();
    22912291      }
    22922292      dcd->suspendview = TRUE;
Note: See TracChangeset for help on using the changeset viewer.