Changeset 1303
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/dircnrs.c
r1222 r1303 49 49 25 Aug 08 GKY Check TMP directory space warn if lee than 5 MiB prevent archiver from opening if 50 50 less than 10 KiB (It hangs and can't be closed) 51 29 Nov 08 GKY Remove or replace with a mutex semaphore DosEnterCriSec where appropriate. 51 52 52 53 ***********************************************************************/ … … 798 799 dcd = WinQueryWindowPtr(hwnd, QWL_USER); 799 800 if (dcd) { 800 DosEnterCritSec(); 801 //DosEnterCritSec(); //GKY 11-29-08 802 DosRequestMutexSem(hmtxFM2Globals, SEM_INDEFINITE_WAIT); 801 803 if (dcd->stopflag) 802 804 dcd->stopflag--; 803 805 if (dcd->stopflag) { 804 DosExitCritSec(); 806 DosReleaseMutexSem(hmtxFM2Globals); 807 //DosExitCritSec(); 805 808 return 0; 806 809 } 807 DosExitCritSec(); 810 DosReleaseMutexSem(hmtxFM2Globals); 811 //DosExitCritSec(); 808 812 if (mp1) { 809 813 strcpy(dcd->previous, dcd->directory); … … 1419 1423 strcpy(dcd->previous, dcd->directory); 1420 1424 strcpy(dcd->directory, fullname); 1421 DosEnterCritSec();1425 //DosEnterCritSec(); //GKY 11-27-08 1422 1426 dcd->stopflag++; 1423 DosExitCritSec();1427 //DosExitCritSec(); 1424 1428 if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPFROMLONG(1L))) { 1425 1429 strcpy(dcd->directory, dcd->previous); 1426 DosEnterCritSec();1430 //DosEnterCritSec(); //GKY 11-27-08 1427 1431 dcd->stopflag--; 1428 DosExitCritSec();1432 //DosExitCritSec(); 1429 1433 } 1430 1434 else if (*dcd->directory) { … … 2286 2290 2287 2291 case IDM_RESCAN: 2288 DosEnterCritSec();2292 //DosEnterCritSec(); //GKY 11-27-08 2289 2293 dcd->stopflag++; 2290 DosExitCritSec();2294 //DosExitCritSec(); 2291 2295 if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPVOID)) { 2292 DosEnterCritSec();2296 //DosEnterCritSec(); //GKY 11-27-08 2293 2297 dcd->stopflag--; 2294 DosExitCritSec();2298 //DosExitCritSec(); 2295 2299 } 2296 2300 break; … … 2424 2428 strcpy(dcd->previous, dcd->directory); 2425 2429 strcpy(dcd->directory, (CHAR *)mp2); 2426 DosEnterCritSec();2430 //DosEnterCritSec(); // GKY 11-27-08 2427 2431 dcd->stopflag++; 2428 DosExitCritSec();2432 //DosExitCritSec(); 2429 2433 if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPFROMLONG(1L))) { 2430 2434 strcpy(dcd->directory, dcd->previous); 2431 DosEnterCritSec();2435 //DosEnterCritSec(); // GKY 11-27-08 2432 2436 dcd->stopflag--; 2433 DosExitCritSec();2437 //DosExitCritSec(); 2434 2438 } 2435 2439 else if (*dcd->directory) { … … 2458 2462 strcpy(dcd->previous, dcd->directory); 2459 2463 strcpy(dcd->directory, tempname2); 2460 DosEnterCritSec();2464 //DosEnterCritSec(); // GKY 11-27-08 2461 2465 dcd->stopflag++; 2462 DosExitCritSec();2466 //DosExitCritSec(); 2463 2467 if (!PostMsg(dcd->hwndObject, 2464 2468 UM_RESCAN, MPVOID, MPFROMLONG(1L))) { 2465 2469 strcpy(dcd->directory, dcd->previous); 2466 DosEnterCritSec();2470 //DosEnterCritSec();// GKY 11-27-08 2467 2471 dcd->stopflag--; 2468 DosExitCritSec();2472 //DosExitCritSec(); 2469 2473 } 2470 2474 else if (*dcd->directory) { … … 2490 2494 strcpy(dcd->directory, dcd->previous); 2491 2495 strcpy(dcd->previous, tempname); 2492 DosEnterCritSec();2496 //DosEnterCritSec(); // GKY 11-27-08 2493 2497 dcd->stopflag++; 2494 DosExitCritSec();2498 //DosExitCritSec(); 2495 2499 if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPFROMLONG(1L))) { 2496 2500 strcpy(dcd->directory, dcd->previous); 2497 DosEnterCritSec();2501 //DosEnterCritSec(); // GKY 11-27-08 2498 2502 dcd->stopflag--; 2499 DosExitCritSec();2503 //DosExitCritSec(); 2500 2504 } 2501 2505 else if (*dcd->directory) { … … 2527 2531 strcpy(dcd->previous, dcd->directory); 2528 2532 strcpy(dcd->directory, newdir); 2529 DosEnterCritSec();2533 //DosEnterCritSec(); //GKY 11-27-08 2530 2534 dcd->stopflag++; 2531 DosExitCritSec();2535 //DosExitCritSec(); 2532 2536 if (!PostMsg(dcd->hwndObject, UM_RESCAN, MPVOID, MPFROMLONG(1L))) { 2533 2537 strcpy(dcd->directory, dcd->previous); 2534 DosEnterCritSec();2538 //DosEnterCritSec(); // GKY 11-27-08 2535 2539 dcd->stopflag--; 2536 DosExitCritSec();2540 //DosExitCritSec(); 2537 2541 } 2538 2542 else if (*dcd->directory) { … … 3363 3367 strcpy(dcd->previous, dcd->directory); 3364 3368 strcpy(dcd->directory, pci->pszFileName); 3365 DosEnterCritSec();3369 //DosEnterCritSec(); // GKY 11-27-08 3366 3370 dcd->stopflag++; 3367 DosExitCritSec();3371 //DosExitCritSec(); 3368 3372 if (!PostMsg(dcd->hwndObject, 3369 3373 UM_RESCAN, MPVOID, MPFROMLONG(1))) { 3370 DosEnterCritSec();3374 //DosEnterCritSec(); // GKY 11-27-08 3371 3375 dcd->stopflag--; 3372 DosExitCritSec();3376 //DosExitCritSec(); 3373 3377 } 3374 3378 else if (*dcd->directory) { … … 3410 3414 } 3411 3415 else { 3412 DosEnterCritSec();3416 //DosEnterCritSec(); // GKY 11-27-08 3413 3417 dcd->stopflag++; 3414 DosExitCritSec();3418 //DosExitCritSec(); 3415 3419 if (!PostMsg(dcd->hwndObject, 3416 3420 UM_RESCAN, MPVOID, MPFROMLONG(1L))) { 3417 DosEnterCritSec();3421 //DosEnterCritSec(); // GKY 11-27-08 3418 3422 dcd->stopflag--; 3419 DosExitCritSec();3423 //DosExitCritSec(); 3420 3424 } 3421 3425 else if (*dcd->directory) { -
trunk/dll/grep.c
r1223 r1303 29 29 07 Feb 08 SHL Use ITIMER_DESC to control sleeps and reporting 30 30 29 Feb 08 GKY Use xfree where appropriate 31 29 Nov 08 GKY Remove or replace with a mutex semaphore DosEnterCriSec where appropriate. 31 32 32 33 ***********************************************************************/ … … 62 63 #include "misc.h" // PostMsg 63 64 #include "fortify.h" 65 #include "init.h" // Golbal semaphore 64 66 65 67 static VOID DoAllSubdirs(GREP *grep, … … 743 745 CM_INSERTRECORD, MPFROMP(pciFirst), MPFROMP(&ri)); 744 746 if (dcd) { 745 DosEnterCritSec(); 747 //DosEnterCritSec(); //GKY 11-29-08 748 DosRequestMutexSem(hmtxFM2Globals, SEM_INDEFINITE_WAIT); 746 749 dcd->ullTotalBytes += grep->insertedbytes; 747 DosExitCritSec(); 750 DosReleaseMutexSem(hmtxFM2Globals); 751 //DosExitCritSec(); 748 752 } 749 753 SleepIfNeeded(pitdSleep, 1); -
trunk/dll/init.c
r1224 r1303 57 57 23 Aug 08 GKY Check that space on TMP & FM2 save drives exceed 5 GiB; Done to allow user setting of 58 58 minimum size in future 59 29 Nov 08 GKY Remove or replace with a mutex semaphore DosEnterCriSec where appropriate. 59 60 60 61 ***********************************************************************/ … … 155 156 156 157 #pragma data_seg(GLOBAL1) 158 HMTX hmtxFM2Globals; 157 159 ULONG OS2ver[2]; 158 160 PFNWP PFNWPCnr; … … 1177 1179 sizeof(PVOID)); 1178 1180 1181 DosCreateMutexSem("\\SEM\\GLOBAL1", &hmtxFM2Globals, 0L, FALSE); 1182 1179 1183 /* 1180 1184 * set some defaults (note: everything else automatically initialized -
trunk/dll/init.h
r1209 r1303 10 10 11 11 Change log 12 29 Nov 08 GKY Remove or replace with a mutex semaphore DosEnterCriSec where appropriate. 12 13 13 14 ***********************************************************************/ … … 90 91 extern CHAR profile[CCHMAXPATH]; 91 92 extern ULONGLONG ullTmpSpaceNeeded; 93 extern HMTX hmtxFM2Globals; 92 94 93 95 #endif // INIT_H -
trunk/dll/mainwnd.c
r1224 r1303 69 69 29 Aug 08 JBS Ticket 259: Support saving/restoring target directories with states (except the shutdown state) 70 70 01 Sep 08 GKY Save toolbars immediately on change. Add bmps for default toolbars 71 29 Nov 08 GKY Remove or replace with a mutex semaphore DosEnterCriSec where appropriate. 71 72 72 73 ***********************************************************************/ … … 1401 1402 1402 1403 case WM_CONTEXTMENU: 1403 DosEnterCritSec(); 1404 //DosEnterCritSec(); //GKY 11-29-08 1405 DosRequestMutexSem(hmtxFM2Globals, SEM_INDEFINITE_WAIT); 1404 1406 if (!hwndMenu) 1405 1407 hwndMenu = WinLoadMenu(hwnd, FM3ModHandle, ID_BUTTONMENU); 1406 DosExitCritSec(); 1408 DosReleaseMutexSem(hmtxFM2Globals); 1409 //DosExitCritSec(); 1407 1410 SetPresParams(hwndMenu, NULL, NULL, NULL, GetPString(IDS_10SYSPROTEXT)); 1408 1411 if (PopupMenu(hwnd, hwnd, hwndMenu)) -
trunk/dll/treecnr.c
r1299 r1303 49 49 19 Oct 08 GKY Fixed logic for greying menu items (Format etc) on remote and virtual drives (it was reversed) 50 50 19 Oct 08 GKY Fixed context menu to be "drives" menu on unformatted drives 51 28 Nov 08 GKY Remove unneeded DosEnterCriSec calls 51 52 52 53 ***********************************************************************/
Note:
See TracChangeset
for help on using the changeset viewer.