Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/dircnrs.c
r1870 r1873 2864 2864 // 2015-08-07 SHL FIXME to wait for Flesh to finish before PostMsg 2865 2865 if (SHORT2FROMMP(mp1) == CN_EXPANDTREE && AddFleshWorkRequest(hwnd, pci, eFlesh) && 2866 !dcd->suspendview && fTopDir ) {2866 !dcd->suspendview && fTopDir && !fSwitchTreeOnDirChg) { 2867 2867 PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID); 2868 2868 //DbgMsg(pszSrcFile, __LINE__, "UM_TOPDIR %p pci %p", hwnd, pci); … … 2873 2873 } 2874 2874 else if (SHORT2FROMMP(mp1) == CN_EXPANDTREE) { 2875 if (AddFleshWorkRequest(hwnd, pci, eFlesh) && !dcd->suspendview && fTopDir) { 2875 if (AddFleshWorkRequest(hwnd, pci, eFlesh) && !dcd->suspendview && 2876 fTopDir && !fSwitchTreeOnDirChg) { 2876 2877 // 2015-08-07 SHL FIXME to wait for Flesh to finish before PostMsg 2877 2878 PostMsg(hwnd, UM_TOPDIR, MPFROMP(pci), MPVOID); -
trunk/dll/filldir.c
r1871 r1873 123 123 use of NULL/Nullstr pszFileNames by Stubby). Add code to relink pci chain 124 124 following rename, delete, etc. Add "Expanding" window text. 125 26 Sep 15 GKY Remove fInitialDriveScan code 125 126 126 127 ***********************************************************************/ … … 908 909 do { 909 910 /** 910 * remove . and .. from list if present 911 * remove . and .. and directories already added 912 * by Stubby from list if present 911 913 * also counter file system bugs that sometimes 912 914 * allows normal files to slip through when … … 1183 1185 1184 1186 // 13 Oct 09 SHL FIXME to be saymsg if ERROR_NOT_READY and first try on volume 1185 if (rc && rc != ERROR_NO_MORE_FILES && (fDontSuggestAgain || !fInitialDriveScan)) {1187 if (rc && rc != ERROR_NO_MORE_FILES && fDontSuggestAgain) { 1186 1188 Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 1187 1189 GetPString(IDS_CANTFINDDIRTEXT), pszFileSpec); … … 1688 1690 1689 1691 DosSleep(16); 1690 1691 fInitialDriveScan = FALSE;1692 //DbgMsg(pszSrcFile, __LINE__, "fInitialDriveScan now FALSE"); // 2015-08-03 SHL FIXME debug1693 1692 DosPostEventSem(CompactSem); 1694 1693 … … 1697 1696 BOOL includesyours = FALSE; 1698 1697 1699 // 02 Mar 14 GKY !didon e for fFirstTime so it works again1698 // 02 Mar 14 GKY !didonce for fFirstTime so it works again 1700 1699 if (*szSuggest || ~driveflags[1] & DRIVE_IGNORE && !didonce) { 1701 1700 if (!DosDevConfig(&info, DEVINFO_FLOPPY) && info == 1) { -
trunk/dll/flesh.c
r1871 r1873 41 41 complete container item. Add a flag to indicate when a directory needed to be 42 42 Fleshed 43 26 Sep 15 GKY Changes to speed up ExpandAll 44 26 Sep 15 GKY WaitFleshWorkListEmpty now gives error message and returns if semaphore request 45 fails more than 5 consecutive times. 43 46 44 47 ***********************************************************************/ … … 74 77 #include "common.h" // IncrThreadUsage DecrThreadUsage 75 78 #include "pathutil.h" 79 #include "treecnr.h" // fExpandAll 76 80 #if 0 77 81 #define __PMPRINTF__ … … 863 867 BOOL waited; 864 868 PCSZ pszSavedFleshFocusPath; 869 INT rcCount = 0; 865 870 866 871 if (tid == 1 || tid == tidFleshWorkListThread) { … … 902 907 if (pszDirName) { 903 908 rc = xDosRequestMutexSem(hmtxFleshWork, SEM_INDEFINITE_WAIT); 904 if (rc) 905 continue; // Maybe should return ??? 909 if (rc) { 910 rcCount++; 911 if (rcCount < 6) 912 continue; // Maybe should return ??? 913 else { 914 Dos_Error(MB_CANCEL, rc, HWND_DESKTOP, pszSrcFile, __LINE__, 915 PCSZ_DOSREQUESTMUTEXSEM); 916 return; 917 } 918 919 } 906 920 907 921 if (!pathSaved) { … … 915 929 916 930 xDosReleaseMutexSem(hmtxFleshWork); 931 rcCount = 0; 917 932 918 933 if (!item) { 919 934 if (waited) 920 DosSleep(100); // Let PM do some work935 DosSleep(fExpandAll ? 1 : 240); // Let PM do some work 921 936 break; // Dependents gone from work list 922 937 } 923 938 } // if pszDirName 924 925 DosSleep(250); 939 DosSleep(fExpandAll ? 10 : 250); 926 940 } // for 927 941 -
trunk/dll/init.c
r1871 r1873 140 140 24 Aug 15 GKY Remove obsolete code fDontAsk?zip 141 141 20 Sep 15 GKY Move tree expand to a thread. 142 26 Sep 15 GKY Remove fInitialDriveScan code 142 143 143 144 ***********************************************************************/ … … 255 256 ULONG ulDateFmt; 256 257 BOOL fDontSuggestAgain; 257 BOOL fInitialDriveScan;258 258 BOOL fAmAV2; 259 259 BOOL fChangeTarget; … … 1211 1211 fSwitchTreeExpand = fNoSearch = fCustomFileDlg = fOtherHelp = 1212 1212 fSaveMiniCmds = fUserComboBox = fFM2Deletes = fConfirmTarget = 1213 fShowTarget = fDrivebarHelp = fCheckMM = fInitialDriveScan = 1214 fEjectRemovableScan = TRUE; 1213 fShowTarget = fDrivebarHelp = fCheckMM = fEjectRemovableScan = TRUE; 1215 1214 ulCnrType = CCS_EXTENDSEL; 1216 1215 FilesToGet = FILESTOGET_MAX; -
trunk/dll/init.h
r1868 r1873 215 215 extern PCSZ WC_VIEWSTATUS; 216 216 extern BOOL fDontSuggestAgain; 217 extern BOOL fInitialDriveScan;218 217 extern BOOL fAmAV2; 219 218 extern BOOL fChangeTarget; -
trunk/dll/select.c
r1872 r1873 38 38 in UM_EXPAND until until drive is completely expanded. Changes were need to 39 39 work with Flesh, Stubby and UnFlesh being moved to a thread 40 26 Sep 15 GKY Changes to speed up ExpandAll 40 41 41 42 ***********************************************************************/ … … 572 573 { 573 574 PCNRITEM pci; 574 static BOOL fExpanding = FALSE; 575 static BOOL fExpanding = FALSE; // statics are only used by tree container 575 576 static INT counter = 1; 576 577 … … 596 597 if (count != 0) { 597 598 fExpanding = TRUE; 599 if (IsFleshWorkListEmpty()) 600 DosSleep(0); // Yield to EXPANDTREE and Flesh thread 598 601 if (!IsFleshWorkListEmpty()) { 599 602 WaitFleshWorkListEmpty(NULL); // Let it expand … … 609 612 } 610 613 } 611 //DosSleep(0);612 614 return fExpanding; 613 615 } -
trunk/dll/treecnr.c
r1871 r1873 108 108 a thread. Loop and idle ExpandAll; Add CollapseAll; Move tree expand to a 109 109 thread; Have ShowTreeRec wait for the Flesh thread. 110 26 Sep 15 GKY Adjustments to ShowTreeRec to eliminate failures and reduce retries and container 111 noise on tree switches. 112 26 Sep 15 GKY Remove fInitialDriveScan code 113 26 Sep 15 GKY Changes to speed up ExpandAll 110 114 111 115 ***********************************************************************/ … … 191 195 BOOL fMiniLVM; 192 196 BOOL fLVM; 197 BOOL fExpandAll; 193 198 HPOINTER hptrDunno; 194 199 HWND hwndMainMenu; … … 203 208 static BOOL fOkayMinimize; 204 209 static HMQ hmqExpandTree; 205 static BOOL fExpandAll;206 210 207 211 APIRET16 APIENTRY16 Dos16MemAvail(PULONG pulAvailMem); … … 305 309 CHAR chSaved; 306 310 307 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec called for pszDir_ \"%s\"", pszDir_); // 2015-08-04 SHL FIXME debug 308 309 strcpy(szDirArg, pszDir_); // Cache here in case arg content changed by some other thread 310 311 strcpy(szDirArg, pszDir_); // Cache here in case arg content changed by some other thread 312 311 313 // already positioned to requested record? 312 314 pci = WinSendMsg(hwndCnr, … … 314 316 MPFROMLONG(CMA_FIRST), MPFROMSHORT(CRA_CURSORED)); 315 317 if (pci && (INT)pci != -1 && !stricmp(pci->pszFileName, szDirArg)) { 316 found = TRUE;317 318 quickbail = TRUE; // Already at requested record - bypass repositioning 318 319 goto MakeTop; 319 320 } 320 // 2015-08-23 SHL FIXME to be gone - problem must be elsewhere321 // 2015-08-22 GKY Without this FM2 has NULL pci->pszFileName errors and switch failures322 if (fInitialDriveScan)323 DosSleep(100); // 100 still had errors324 if (fSwitchTreeOnDirChg)325 DosSleep(200);326 327 321 // 2015-08-13 SHL add retry logic 2015-08-22 GKY increase retries from 10 to 100 to 328 322 // eliminate switch failures on deep or large tree state switches … … 391 385 } 392 386 } 393 394 DosSleep(100); // 2015-08-13 SHL Let PM catch up 395 387 WaitFleshWorkListEmpty(NULL); // 2015-09-26 GKY Let Flesh thread catch up 396 388 } // while expanding 397 389 … … 404 396 if (~pci->rc.flRecordAttr & CRA_CURSORED) { 405 397 if (collapsefirst) { 398 WaitFleshWorkListEmpty(NULL); 406 399 pciP = WinSendMsg(hwndCnr, 407 400 CM_QUERYRECORD, … … 447 440 } 448 441 if (maketop || fTopDir) { 449 if (fCollapseFirst )442 if (fCollapseFirst && !quickbail) { 450 443 WaitFleshWorkListEmpty(NULL); //Let the root expand first otherwise it makes top 444 } 451 445 // 2015-08-23 SHL FIXME debug 452 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec ShowCnrRecord(%p) f TopDir %i maketop %i", pciToSelect, fTopDir, maketop); // 2015-08-04 SHL FIXME debug446 //DbgMsg(pszSrcFile, __LINE__, "ShowTreeRec ShowCnrRecord(%p) filename %s", pciToSelect, pciToSelect->pszFileName); // 2015-08-04 SHL FIXME debug 453 447 ShowCnrRecord(hwndCnr, (PMINIRECORDCORE)pciToSelect); 454 448 } … … 759 753 #endif 760 754 //DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME calling ShowTreeRec(\"%s\")", mp1); // 2015-08-04 SHL FIXME debug 761 ShowTreeRec(dcd->hwndCnr, (CHAR *)mp1, fCollapseFirst, TRUE); 762 //DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME calling PostMsg(IDM_UPDATE)"); // 2015-08-04 SHL FIXME debug 755 priority_idle(); // 2015-09-26 GKY Majority of work done by Flesh and UI threads 756 ShowTreeRec(dcd->hwndCnr, (CHAR *)mp1, fCollapseFirst, TRUE); 757 priority_normal(); 758 //DbgMsg(pszSrcFile, __LINE__, "TreeObjWndProc UM_SHOWME calling PostMsg(IDM_UPDATE)"); // 2015-08-04 SHL FIXME debug 763 759 PostMsg(hwndTree, WM_COMMAND, MPFROM2SHORT(IDM_UPDATE, 0), MPVOID); 764 760 … … 3437 3433 driveserial[toupper(*pci->pszFileName) - 'A'] != 3438 3434 volser.serial) 3439 { // 2015-08-28 GKY fixme? I think this code runs on the UI thread3435 { 3440 3436 WaitFleshWorkListEmpty(pci->pszFileName); // 2015-08-19 SHL in case pci still in work list 3441 3437 AddFleshWorkRequest(dcd->hwndCnr, pci, eUnFlesh); … … 3446 3442 volser.serial)) { 3447 3443 if (qmsg.msg == UM_EXPANDTREE && AddFleshWorkRequest(dcd->hwndCnr, pci, eFlesh) 3448 && !dcd->suspendview && fTopDir ) {3444 && !dcd->suspendview && fTopDir && !fSwitchTreeOnDirChg) { 3449 3445 DosSleep(1); 3450 3446 WaitFleshWorkListEmpty(pci->pszFileName); … … 3456 3452 else { 3457 3453 driveserial[toupper(*pci->pszFileName) - 'A'] = -1; 3458 // 2015-08-28 GKY fixme? I think this code runs on the UI thread3459 3454 WaitFleshWorkListEmpty(pci->pszFileName); // 2015-08-19 SHL in case pci still in work list 3460 3455 AddFleshWorkRequest(dcd->hwndCnr, pci, eUnFlesh); -
trunk/dll/treecnr.h
r1871 r1873 45 45 extern BOOL fMiniLVM; 46 46 extern BOOL fLVM; 47 extern BOOL fExpandAll; 47 48 extern HPOINTER hptrDunno; 48 49 extern HWND hwndMainMenu;
Note:
See TracChangeset
for help on using the changeset viewer.
