Changeset 7226


Ignore:
Timestamp:
Oct 29, 2013 9:28:03 PM (13 months ago)
Author:
tboeckel
Message:
  • YAM.c, Timer.c: reworked the low memory handler once more to trigger a signal only, because the handler might be triggered from any other task/process context and hence should do as less as possible.
Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Timer.c

    r7225 r7226  
    608608 
    609609      if(updateIndex == TRUE) 
    610         DoMethod(G->App, MUIM_YAMApplication_FlushFolderIndexes, G->LowMemSituation); 
     610        DoMethod(G->App, MUIM_YAMApplication_FlushFolderIndexes, FALSE); 
    611611      else 
    612612        D(DBF_TIMER, "editor object of a write window is active, skipping update index operation"); 
  • trunk/src/YAM.c

    r7225 r7226  
    22192219// low memory handler function to flush all folder indexes 
    22202220#if defined(__amigaos4__) 
    2221 static LONG LowMemHandler(UNUSED struct ExecBase *ExecBase, UNUSED struct MemHandlerData *memHandlerData, UNUSED APTR data) 
     2221static LONG LowMemHandler(UNUSED struct ExecBase *ExecBase, UNUSED struct MemHandlerData *memHandlerData, APTR yam) 
    22222222#else 
    2223 static LONG ASM LowMemHandler(REG(a6, UNUSED struct ExecBase *ExecBase), REG(a0, UNUSED struct MemHandlerData *memHandlerData), REG(a1, UNUSED APTR data)) 
     2223static LONG ASM LowMemHandler(REG(a6, UNUSED struct ExecBase *ExecBase), REG(a0, UNUSED struct MemHandlerData *memHandlerData), REG(a1, APTR yam)) 
    22242224#endif 
    22252225{ 
     
    22302230  { 
    22312231    G->LowMemSituation = TRUE; 
    2232     W(DBF_FOLDER, "low memory situation, flushing folder indexes"); 
    2233     // restart the index flush timer 
    2234     RestartTimer(TIMER_WRINDEX, 0, 1, FALSE); 
     2232    // signal the application 
     2233    Signal(yam, SIGBREAKF_CTRL_E); 
    22352234  } 
    22362235 
     
    25532552    if((G->lowMemHandler = AllocSysObjectTags(ASOT_INTERRUPT, 
    25542553      ASOINTR_Code, LowMemHandler, 
     2554      ASOINTR_Data, FindTask(NULL), 
    25552555      TAG_DONE)) != NULL) 
    25562556    { 
     
    27012701      if(signals != 0) 
    27022702      { 
    2703         signals = Wait(signals | SIGBREAKF_CTRL_C | SIGBREAKF_CTRL_D | SIGBREAKF_CTRL_F | timerSig | rexxSig | appSig | applibSig | writeWinNotifySig | threadSig | wakeupSig | methodStackSig); 
     2703        signals = Wait(signals | SIGBREAKF_CTRL_C | SIGBREAKF_CTRL_D | SIGBREAKF_CTRL_E | SIGBREAKF_CTRL_F | timerSig | rexxSig | appSig | applibSig | writeWinNotifySig | threadSig | wakeupSig | methodStackSig); 
    27042704 
    27052705        if(isFlagSet(signals, SIGBREAKF_CTRL_C)) 
     
    27132713          ret = 0; 
    27142714          break; 
     2715        } 
     2716 
     2717        if(isFlagSet(signals, SIGBREAKF_CTRL_E)) 
     2718        { 
     2719          W(DBF_FOLDER, "low memory situation, flushing folder indexes"); 
     2720          DoMethod(G->App, MUIM_YAMApplication_FlushFolderIndexes, TRUE); 
     2721          G->LowMemSituation = FALSE; 
    27152722        } 
    27162723 
Note: See TracChangeset for help on using the changeset viewer.