process.c File Reference

#include "frontier.h"
#include "standard.h"
#include "memory.h"
#include "dialogs.h"
#include "error.h"
#include "file.h"
#include "launch.h"
#include "kb.h"
#include "ops.h"
#include "strings.h"
#include "threads.h"
#include "timedate.h"
#include "lang.h"
#include "langinternal.h"
#include "shell.h"
#include "shellmenu.h"
#include "shellprivate.h"
#include "shellhooks.h"
#include "command.h"
#include "about.h"
#include "shell.rsrc.h"
#include "scripts.h"
#include "tablestructure.h"
#include "cancoon.h"
#include "process.h"
#include "processinternal.h"
#include "tableinternal.h"
#include "frontierdebug.h"
#include "oplist.h"
#include "langsystem7.h"

Include dependency graph for process.c:

Go to the source code of this file.

Data Structures

struct  tythreadlist

Defines

#define _entercriticalprocesssection()
#define _leavecriticalprocesssection()
#define threadpoolsize   2
#define getthreadglobals(hthread)   hthread
#define flprofile

Typedefs

typedef tythreadlist ** hdlthreadlist

Functions

boolean setagentsenable (boolean flagents)
boolean pushprocess (register hdlprocessrecord hp)
boolean popprocess (void)
void disposeprocess (hdlprocessrecord hprocess)
boolean newprocess (hdltreenode hcode, boolean floneshot, langerrorcallback errorcallback, long errorrefcon, hdlprocessrecord *hprocess)
static boolean deletefromprocesslist (hdlprocessrecord hprocess)
static boolean deleteprocess (hdlprocessrecord hprocess)
boolean newprocesslist (hdlprocesslist *hlist)
void setcurrentprocesslist (hdlprocesslist hlist)
boolean disposeprocesslist (hdlprocesslist hprocesslist)
boolean processfindcode (hdltreenode hcode, hdlprocessrecord *hprocess)
static boolean visitprocessthreads (pascal boolean(*visit)(hdlthreadglobals, long), long refcon)
boolean processkill (hdlprocessrecord hprocess)
static pascal boolean codedisposedvisit (hdlthreadglobals hthread, long refcon)
void processcodedisposed (long refcon)
boolean processreplacecode (hdltreenode holdcode, hdltreenode hnewcode)
boolean processdisposecode (hdltreenode hcode)
boolean processagentsleep (long ctseconds)
boolean processisoneshot (boolean flnilok)
static boolean processbackgroundtask (boolean flresting)
boolean debuggingcurrentprocess (void)
boolean processstartprofiling (boolean fltimesliced)
boolean processstopprofiling (void)
boolean profilingcurrentprocess (void)
static boolean processdebugger (hdltreenode hnode)
static boolean processscriptkilled (boolean flchecknow)
static boolean processpushsourcecode (hdlhashtable htable, hdlhashnode hnode, bigstring bsname)
static boolean processpopsourcecode (void)
static boolean processpushtable (hdlhashtable *htable)
static boolean processpoptable (hdlhashtable htable)
boolean goodthread (hdlprocessthread hthread)
boolean ingoodthread (void)
boolean inmainthread (void)
boolean infrontierthread (void)
boolean processsleep (hdlprocessthread hthread, unsigned long timeout)
boolean processissleeping (hdlprocessthread hthread)
boolean processwake (hdlprocessthread hthread)
boolean processyield (void)
boolean processyieldtoagents (void)
void disposethreadglobals (hdlthreadglobals hglobals)
boolean newthreadglobals (hdlthreadglobals *hglobals)
hdlthreadglobals getcurrentthreadglobals (void)
void copythreadglobals (hdlthreadglobals hglobals)
void swapinthreadglobals (hdlthreadglobals hglobals)
boolean getprocesstimeslice (unsigned long *ticks)
boolean setprocesstimeslice (unsigned long ticks)
boolean getdefaulttimeslice (unsigned long *ticks)
boolean setdefaulttimeslice (unsigned long ticks)
boolean processtimesliceelapsed (void)
static pascal boolean maimprocessvisit (hdlthreadglobals hthread, long hcancoon)
void killdependentprocesses (long hcancoon)
static boolean gettracebacklist (Handle herrorstack, tyvaluerecord *v)
static boolean getstatsvisit (hdlthreadglobals hthread, long refcon)
boolean processgetstats (hdlhashtable ht)
static pascal boolean findlatest1shotvisit (hdlthreadglobals hthread, long refcon)
boolean abort1shotprocess (void)
static void setprocesslangcallbacks (void)
static boolean findthreadvisit (bigstring bs, hdlhashnode hnode, tyvaluerecord val, ptrvoid refcon)
boolean initprocessthread (bigstring bsname)
void exitprocessthread (void)
hdlprocessthread getcurrentthread (void)
boolean processpsuedothread (tythreadmaincallback threadmain, tythreadmainparams threadparams)
static void disposeprocessthread (hdlthreadglobals htread)
boolean newprocessthread (tythreadmaincallback threadmain, tythreadmainparams threadparams, hdlthreadglobals *hthread)
short processthreadcount (void)
long getthreadid (hdlprocessthread hthread)
hdlprocessthread getprocessthread (long id)
hdlprocessthread nthprocessthread (long n)
static pascal boolean wakeupvisit (Handle hthread, long refcon)
boolean wakeprocessthread (hdlprocessthread hthread)
boolean killprocessthread (hdlprocessthread hthread)
static boolean initmainprocessthread (void)
boolean processruncode (hdlprocessrecord hprocess, tyvaluerecord *vreturned)
boolean processruntext (Handle htext)
boolean processrunstring (bigstring bs)
boolean processrunstringnoerrorclear (bigstring bs)
boolean processbusy (void)
boolean processnotbusy (void)
boolean processrunning (void)
unsigned long processstackspace (void)
static void postthreadsmessage (void)
boolean addnewprocess (hdltreenode hcode, boolean floneshot, langerrorcallback errorcallback, long errorrefcon)
boolean addprocess (hdlprocessrecord hprocess)
static boolean processtimeslice (hdlprocessrecord hprocess)
static pascal void * oneshotthreadmain (void *hprocess)
boolean scheduleprocess (hdlprocessrecord hprocess, hdlprocessthread *hnewthread)
static void oneshotscheduler (void)
static void postmemorymessage (void)
static void agentscheduler (void)
static pascal void * agentthreadmain (void *ignore)
void processscheduler (void)
static boolean processkeyboardhook (void)
void processchecktimeouts (void)
boolean processsymbolunlinking (hdlhashtable htable, hdlhashnode hnode)
void processclose (void)
boolean initprocess (void)

Variables

hdlprocessrecord currentprocess = nil
hdlprocessrecord newlyaddedprocess = nil
unsigned short fldisableyield = 0
boolean flthreadkilled = false
boolean flcanusethreads = false
static hdlthreadlist processthreadlist
static hdlprocessthread agentthread = 0
static boolean agentthreadsleeping = false
static short ctprocessthreads = 0
static hdlprocesslist processlist = nil
static hdlprocesslist agentprocesslist = nil
static boolean flprocesscodedisposed = false
static hdltreenode honeshotcode = nil
static boolean flagentsenabled = true
static int flagentsdisabled = 0
static boolean flpostedmemorymessage = false
static hdlthreadglobals hthreadglobals = nil
static typrocessstack processstack = {0}
static boolean flpostedthreadsmessage = false
static boolean flcreatedagentprocess = false
static boolean flexitingthread = false
static boolean flinhibiterrorclear = false
static long processonehottimeslice = 6
static long processagenttimeslice = 4
static boolean flvisitingthreads = false
static unsigned long totalticksin = 0
static unsigned long totalticksout = 0
static unsigned long lastswapticks = 0
static unsigned long latesttime
static hdlthreadglobals hlatest1shot


Define Documentation

 
#define _entercriticalprocesssection  ) 
 

Definition at line 110 of file process.c.

Referenced by addprocess(), deletefromprocesslist(), and setcurrentprocesslist().

 
#define _leavecriticalprocesssection  ) 
 

Definition at line 112 of file process.c.

Referenced by addprocess(), deletefromprocesslist(), and setcurrentprocesslist().

#define flprofile
 

Definition at line 1488 of file process.c.

#define getthreadglobals hthread   )     hthread
 

Definition at line 140 of file process.c.

Referenced by codedisposedvisit(), findlatest1shotvisit(), getstatsvisit(), goodthread(), and maimprocessvisit().

#define threadpoolsize   2
 

Definition at line 129 of file process.c.


Typedef Documentation

typedef struct tythreadlist ** hdlthreadlist
 


Function Documentation

boolean abort1shotprocess void   ) 
 

Definition at line 2084 of file process.c.

References findlatest1shotvisit(), hlatest1shot, killprocessthread(), nil, and visitprocessthreads().

Referenced by processkeyboardhook().

Here is the call graph for this function:

boolean addnewprocess hdltreenode  hcode,
boolean  floneshot,
langerrorcallback  errorcallback,
long  errorrefcon
 

Definition at line 2846 of file process.c.

References addprocess(), hcode, hnewnode, and newprocess().

Referenced by newprocessvisit(), processruntext(), scriptcompiler(), and threadcallscriptverb().

Here is the call graph for this function:

boolean addprocess hdlprocessrecord  hprocess  ) 
 

Definition at line 2863 of file process.c.

References _entercriticalprocesssection, _leavecriticalprocesssection, typrocessrecord::hnextprocess, typrocessrecord::hprocesslist, newlyaddedprocess, nil, processlist, and shellforcebackgroundtask().

Referenced by addnewprocess(), fwsruncallback(), langipcrunitem(), meuserselected(), newprocessvisit(), and scriptnewprocess().

Here is the call graph for this function:

static void agentscheduler void   )  [static]
 

Definition at line 3092 of file process.c.

References assert, deleteprocess(), disposeprocesslist(), flprocesscodedisposed, typrocessrecord::hnextprocess, nil, processlist, processtimeslice(), typrocessrecord::sleepuntil, and timenow().

Referenced by agentthreadmain().

Here is the call graph for this function:

static pascal void* agentthreadmain void *  ignore  )  [static]
 

Definition at line 3171 of file process.c.

References agentscheduler(), agentthread, agentthreadsleeping, BIGSTRING, exitprocessthread(), flagentsdisabled, flagentsenabled, flshellclosingall, idagentsenabledscript, ingoodthread(), initprocessthread(), langgetuserflag(), nil, processagenttimeslice, setprocesstimeslice(), and threadsleep().

Referenced by processscheduler().

Here is the call graph for this function:

static pascal boolean codedisposedvisit hdlthreadglobals  hthread,
long  refcon
[static]
 

Definition at line 596 of file process.c.

References getthreadglobals, nil, and tyerrorstack::toperror.

Referenced by processcodedisposed().

void copythreadglobals hdlthreadglobals  hglobals  ) 
 

Definition at line 1495 of file process.c.

References aboutsetthreadstring(), assert, cancoonglobals, cterrorhooks, ctoutlinestack, ctscanchars, ctscanlines, currenthashtable, currentprocess, errorhooks, flbreak, flcominitialized, flcontinue, fldisableyield, fllangerror, flreturn, flscriptresting, flscriptrunning, flthreadkilled, flvisitingthreads, globalsstack, hashtablestack, herrornode, hthreadglobals, landgetglobals(), langcallbacks, langerrordisable, maxerrorhooks, moveleft(), nil, outlinedata, outlinestack, processstack, shellwindow, sizeof(), topoutlinestack, tryerror, and tryerrorstack.

Referenced by initmainprocessthread(), odbaccesswindow(), odbclosefile(), odbcountitems(), odbdefined(), odbdelete(), odbdisposevalue(), odbgetmoddate(), odbgetnthitem(), odbgettype(), odbgetvalue(), odbnewfile(), odbnewtable(), odbopenfile(), odbsavefile(), odbsetvalue(), osapopfastcontext(), osapushfastcontext(), processpsuedothread(), and visitprocessthreads().

Here is the call graph for this function:

boolean debuggingcurrentprocess void   ) 
 

Definition at line 860 of file process.c.

References currentprocess, and nil.

Referenced by langdialogitemhit(), langrunmodeless(), opafterstrucchange(), opmoveto(), osadebugger(), processdebugger(), processpoptable(), processpushtable(), scriptpopsourcecode(), scriptpushsourcecode(), tableverbgettargetdata(), and xmlcompile().

static boolean deletefromprocesslist hdlprocessrecord  hprocess  )  [static]
 

Definition at line 404 of file process.c.

References _entercriticalprocesssection, _leavecriticalprocesssection, fl, listunlink(), and nil.

Referenced by deleteprocess().

Here is the call graph for this function:

static boolean deleteprocess hdlprocessrecord  hprocess  )  [static]
 

Definition at line 429 of file process.c.

References deletefromprocesslist(), and disposeprocess().

Referenced by agentscheduler(), oneshotthreadmain(), processkill(), and scheduleprocess().

Here is the call graph for this function:

void disposeprocess hdlprocessrecord  hprocess  ) 
 

Definition at line 268 of file process.c.

References assert, disposehandle(), disposevaluerecord(), langdisposetree(), nil, and setexternalvalue().

Referenced by cmdiconhit(), cmdthreadmain(), deleteprocess(), disposeprocesslist(), langipcruncode(), langwinipcruncode(), newprocess(), osahandlerunscript(), and runprocessvisit().

Here is the call graph for this function:

boolean disposeprocesslist hdlprocesslist  hprocesslist  ) 
 

Definition at line 455 of file process.c.

References typrocesslist::ctrunning, disposehandle(), disposeprocess(), typrocessrecord::fldisposewhenidle, typrocessrecord::hnextprocess, and nil.

Referenced by agentscheduler(), disposecancoonrecord(), and oneshotthreadmain().

Here is the call graph for this function:

static void disposeprocessthread hdlthreadglobals  htread  )  [static]
 

Definition at line 2335 of file process.c.

References ctprocessthreads, and disposethreadglobals().

Referenced by initmainprocessthread().

Here is the call graph for this function:

void disposethreadglobals hdlthreadglobals  hglobals  ) 
 

Definition at line 1376 of file process.c.

References assert, disposehandle(), flcominitialized, flvisitingthreads, hashtablestack, hthreadglobals, listunlink(), nil, processthreadlist, and shutdownCOM().

Referenced by disposecomponentglobals(), disposeprocessthread(), newprocessthread(), and processpsuedothread().

Here is the call graph for this function:

void exitprocessthread void   ) 
 

Definition at line 2238 of file process.c.

References bigstring, currentprocess, findthreadvisit(), flexitingthread, hashinversesearch(), hashtabledelete(), nil, threadshutdown(), and threadtable.

Referenced by agentthreadmain(), cmdthreadmain(), eventthreadmain(), and oneshotthreadmain().

Here is the call graph for this function:

static pascal boolean findlatest1shotvisit hdlthreadglobals  hthread,
long  refcon
[static]
 

Definition at line 2056 of file process.c.

References getthreadglobals, hlatest1shot, and nil.

Referenced by abort1shotprocess().

static boolean findthreadvisit bigstring  bs,
hdlhashnode  hnode,
tyvaluerecord  val,
ptrvoid  refcon
[static]
 

Definition at line 2149 of file process.c.

References tyvaluerecord::data, and tyvaluedata::longvalue.

Referenced by exitprocessthread().

hdlprocessthread getcurrentthread void   ) 
 

Definition at line 2296 of file process.c.

References getcurrentthreadglobals().

Referenced by getpagetableaddressverb(), getprocesstimeslice(), inetdaddtoerrorlog(), ingoodthread(), landsystem7send(), logtofile(), processtimesliceelapsed(), setprocesstimeslice(), threadfunctionvalue(), webserverserver(), and xmlcompile().

Here is the call graph for this function:

hdlthreadglobals getcurrentthreadglobals void   ) 
 

Definition at line 1483 of file process.c.

References hthreadglobals.

Referenced by fwsNetEventCloseStream(), getcurrentthread(), langreleasesemaphores(), locksemaphoreverb(), odbaccesswindow(), odbclosefile(), odbcountitems(), odbdefined(), odbdelete(), odbdisposevalue(), odbgetmoddate(), odbgetnthitem(), odbgettype(), odbgetvalue(), odbnewfile(), odbnewtable(), odbopenfile(), odbsavefile(), odbsetvalue(), osapushfastcontext(), scriptdebuggereventloop(), and threadfunctionvalue().

boolean getdefaulttimeslice unsigned long ticks  ) 
 

Definition at line 1800 of file process.c.

References processonehottimeslice.

Referenced by threadfunctionvalue().

hdlprocessthread getprocessthread long  id  ) 
 

Definition at line 2426 of file process.c.

References tythreadglobals::hnextglobals, and nil.

Referenced by getthreadvalue(), processsymbolunlinking(), and threadfunctionvalue().

boolean getprocesstimeslice unsigned long ticks  ) 
 

Definition at line 1767 of file process.c.

References getcurrentthread(), nil, processagenttimeslice, processisoneshot(), and processonehottimeslice.

Referenced by threadfunctionvalue().

Here is the call graph for this function:

static boolean getstatsvisit hdlthreadglobals  hthread,
long  refcon
[static]
 

Definition at line 1947 of file process.c.

References BIGSTRING, bigstring, copystring(), exemptfromtmpstack(), getthreadglobals, gettracebacklist(), hashtableassign(), langassignstringvalue(), langsuretablevalue(), long, nil, pushchar(), pushlong(), and setemptystring.

Referenced by processgetstats().

Here is the call graph for this function:

long getthreadid hdlprocessthread  hthread  ) 
 

Definition at line 2417 of file process.c.

References idnullthread, and nil.

Referenced by getpagetableaddressverb(), inetdaddtoerrorlog(), threadcallscriptverb(), and threadfunctionvalue().

static boolean gettracebacklist Handle  herrorstack,
tyvaluerecord v
[static]
 

Definition at line 1885 of file process.c.

References anomynousthreadstring, bigstring, langexternalgetquotedpath(), langgetstringlist(), nil, opnewlist(), setnilvalue(), and v.

Referenced by getstatsvisit().

Here is the call graph for this function:

boolean goodthread hdlprocessthread  hthread  ) 
 

Definition at line 1025 of file process.c.

References flthreadkilled, getthreadglobals, and nil.

Referenced by ingoodthread(), and processsleep().

boolean infrontierthread void   ) 
 

Definition at line 1075 of file process.c.

References hthreadglobals, and tythreadglobals::idthread.

Referenced by processstackspace(), and processyield().

boolean ingoodthread void   ) 
 

Definition at line 1040 of file process.c.

References getcurrentthread(), and goodthread().

Referenced by agentthreadmain(), htmlrunmacro(), inetdsupervisor(), processyield(), webservercallfilters(), webservercallresponder(), and webserverlocateresponder().

Here is the call graph for this function:

static boolean initmainprocessthread void   )  [static]
 

Definition at line 2518 of file process.c.

References copythreadglobals(), tythreadcallbacks::disposecallback, disposeprocessthread(), flcanusethreads, hthreadglobals, idapplicationthread, tythreadglobals::idthread, initmainthread(), initthreads(), newthreadglobals(), tythreadcallbacks::swapincallback, swapinthreadglobals(), tythreadcallbacks::swapoutcallback, and threadcallbacks.

Referenced by initprocess().

Here is the call graph for this function:

boolean initprocess void   ) 
 

Definition at line 3457 of file process.c.

References initmainprocessthread(), newclearhandle(), processkeyboardhook(), processthreadlist, and shellpushkeyboardhook().

Here is the call graph for this function:

boolean initprocessthread bigstring  bsname  ) 
 

Definition at line 2156 of file process.c.

References assert, bigstring, clearbytes(), copystring(), globalsstack, hashinsert(), hashsymbolexists(), nil, pophashtable(), pushchar(), pushhashtable(), pushlong(), setlongvalue(), setprocesslangcallbacks(), setstringlength, shellwindow, stringlength, threadstartup(), and threadtable.

Referenced by agentthreadmain(), cmdthreadmain(), eventthreadmain(), and oneshotthreadmain().

Here is the call graph for this function:

boolean inmainthread void   ) 
 

Definition at line 1048 of file process.c.

References hthreadglobals, idapplicationthread, and tythreadglobals::idthread.

void killdependentprocesses long  hcancoon  ) 
 

Definition at line 1869 of file process.c.

References flagentsdisabled, maimprocessvisit(), processyield(), and visitprocessthreads().

Referenced by ccdisposerecord().

Here is the call graph for this function:

boolean killprocessthread hdlprocessthread  hthread  ) 
 

Definition at line 2494 of file process.c.

References flthreadkilled, tythreadglobals::flthreadkilled, hthreadglobals, nil, processkill(), and wakeprocessthread().

Referenced by abort1shotprocess(), processscheduler(), processsymbolunlinking(), and threadfunctionvalue().

Here is the call graph for this function:

static pascal boolean maimprocessvisit hdlthreadglobals  hthread,
long  hcancoon
[static]
 

Definition at line 1828 of file process.c.

References agentthread, getthreadglobals, idapplicationthread, nil, and wakeprocessthread().

Referenced by killdependentprocesses().

Here is the call graph for this function:

boolean newprocess hdltreenode  hcode,
boolean  floneshot,
langerrorcallback  errorcallback,
long  errorrefcon,
hdlprocessrecord hprocess
 

Definition at line 315 of file process.c.

References anomynousthreadstring, bigstring, copystring(), disposehandle(), disposeprocess(), flcreatedagentprocess, hcode, isemptystring, langerrordialog(), langgetstringlist(), langpusherrorcallback(), newclearhandle(), nil, popprocess(), pushprocess(), setemptystring, and truenoop().

Referenced by addnewprocess(), cmdiconhit(), langipcruncode(), langwinipcruncode(), meuserselected(), newprocessvisit(), osahandlerunscript(), runprocessvisit(), and scriptnewprocess().

Here is the call graph for this function:

boolean newprocesslist hdlprocesslist hlist  ) 
 

Definition at line 439 of file process.c.

References newclearhandle().

Referenced by newcancoonrecord().

Here is the call graph for this function:

boolean newprocessthread tythreadmaincallback  threadmain,
tythreadmainparams  threadparams,
hdlthreadglobals hthread
 

Definition at line 2343 of file process.c.

References ctprocessthreads, disposethreadglobals(), flcanusethreads, newthread(), newthreadglobals(), and shellforcebackgroundtask().

Referenced by cmdiconhit(), landsystem7handleevent(), processscheduler(), and scheduleprocess().

Here is the call graph for this function:

boolean newthreadglobals hdlthreadglobals hglobals  ) 
 

Definition at line 1433 of file process.c.

References disposehandle(), landsystem7defaultcreate(), landsystem7defaultsend(), langcallbacks, listlink(), newclearhandle(), processonehottimeslice, and processthreadlist.

Referenced by initmainprocessthread(), newcomponentglobals(), newprocessthread(), and processpsuedothread().

Here is the call graph for this function:

hdlprocessthread nthprocessthread long  n  ) 
 

Definition at line 2440 of file process.c.

References tythreadglobals::hnextglobals, idapplicationthread, and nil.

Referenced by threadfunctionvalue().

static void oneshotscheduler void   )  [static]
 

Definition at line 3042 of file process.c.

References typrocessrecord::hnextprocess, nil, processlist, and scheduleprocess().

Referenced by processscheduler().

Here is the call graph for this function:

static pascal void* oneshotthreadmain void *  hprocess  )  [static]
 

Definition at line 2951 of file process.c.

References anomynousthreadstring, bigstring, copystring(), deleteprocess(), disposeprocesslist(), exitprocessthread(), initprocessthread(), isemptystring, langgetstringlist(), nil, processtimeslice(), and setemptystring.

Referenced by scheduleprocess().

Here is the call graph for this function:

boolean popprocess void   ) 
 

Definition at line 244 of file process.c.

References assert, currentprocess, typrocessstackrecord::debugerrormessagecallback, typrocessstackrecord::errormessagecallback, tylangcallbacks::errormessagecallback, hashtablestack, typrocessstackrecord::herrorstack, typrocessstackrecord::hprocess, typrocessstackrecord::htablestack, langcallbacks, processstack, tylangcallbacks::scripterrorstack, typrocessstack::stack, and typrocessstack::top.

static void postmemorymessage void   )  [static]
 

Definition at line 3073 of file process.c.

References bigstring, flpostedmemorymessage, outofmemorystring, shellfrontrootwindowmessage(), and shellgetstring().

Referenced by processscheduler().

Here is the call graph for this function:

static void postthreadsmessage void   )  [static]
 

Definition at line 2806 of file process.c.

References alertstring(), alertstringlistnumber, bigstring, bstrue, equalstrings(), flpostedthreadsmessage, getstringlist(), getsystemtablescript(), idisfirsttimescript, langrunstringnoerror(), needthreadmanagerstring, and setwindowmessage().

Referenced by processscheduler(), and scheduleprocess().

Here is the call graph for this function:

boolean processagentsleep long  ctseconds  ) 
 

Definition at line 777 of file process.c.

References currentprocess, nil, now, and timenow().

Here is the call graph for this function:

static boolean processbackgroundtask boolean  flresting  )  [static]
 

Definition at line 842 of file process.c.

References flagentsenabled, langerrorenabled(), processisoneshot(), and scriptbackgroundtask().

Referenced by setprocesslangcallbacks().

Here is the call graph for this function:

boolean processbusy void   ) 
 

Definition at line 2714 of file process.c.

References honeshotcode, and nil.

void processchecktimeouts void   ) 
 

Definition at line 3377 of file process.c.

References tythreadglobals::hnextglobals, nil, shellforcebackgroundtask(), and wakeprocessthread().

Here is the call graph for this function:

void processclose void   ) 
 

Definition at line 3452 of file process.c.

void processcodedisposed long  refcon  ) 
 

Definition at line 644 of file process.c.

References codedisposedvisit(), and visitprocessthreads().

Referenced by opverbdisposecode(), and scriptcompiler().

Here is the call graph for this function:

static boolean processdebugger hdltreenode  hnode  )  [static]
 

Definition at line 940 of file process.c.

References debuggingcurrentprocess(), hnode, and scriptdebugger().

Referenced by setprocesslangcallbacks().

Here is the call graph for this function:

boolean processdisposecode hdltreenode  hcode  ) 
 

Definition at line 717 of file process.c.

References flprocesscodedisposed, hcode, typrocessrecord::hnextprocess, hsearch, nil, processkill(), and processlist.

Here is the call graph for this function:

boolean processfindcode hdltreenode  hcode,
hdlprocessrecord hprocess
 

Definition at line 490 of file process.c.

References hcode, typrocessrecord::hnextprocess, hsearch, nil, and processlist.

Referenced by ccagentselectvisit().

boolean processgetstats hdlhashtable  ht  ) 
 

Definition at line 2040 of file process.c.

References getstatsvisit(), and visitprocessthreads().

Referenced by threadstatsverb().

Here is the call graph for this function:

boolean processisoneshot boolean  flnilok  ) 
 

Definition at line 823 of file process.c.

References currentprocess, and nil.

Referenced by ccmsgverb(), getprocesstimeslice(), langfunctionvalue(), processbackgroundtask(), processscriptkilled(), processyieldtoagents(), and scriptgettargetdata().

boolean processissleeping hdlprocessthread  hthread  ) 
 

Definition at line 1146 of file process.c.

References agentthread, agentthreadsleeping, and nil.

Referenced by processsleep(), processwake(), and threadfunctionvalue().

static boolean processkeyboardhook void   )  [static]
 

Definition at line 3346 of file process.c.

References abort1shotprocess(), chescape, tykeystrokerecord::chkb, tykeystrokerecord::flcmdkey, keyboardstatus, nil, and processlist.

Referenced by initprocess().

Here is the call graph for this function:

boolean processkill hdlprocessrecord  hprocess  ) 
 

Definition at line 566 of file process.c.

References deleteprocess(), typrocessrecord::fldisposewhenidle, nil, and wakeprocessthread().

Referenced by killprocessthread(), langipcrunitem(), processdisposecode(), and scriptkillbutton().

Here is the call graph for this function:

boolean processnotbusy void   ) 
 

Definition at line 2726 of file process.c.

References honeshotcode, nil, and shellforcemenuadjust().

Referenced by langipcmenuprocessstarted(), langipcprocessstarted(), langrunmodeless(), langwinipcprocessstarted(), osaprocessstarted(), processruncode(), scriptdebuggereventloop(), and threadverbprocessstarted().

Here is the call graph for this function:

static boolean processpopsourcecode void   )  [static]
 

Definition at line 1001 of file process.c.

References scriptpopsourcecode().

Referenced by setprocesslangcallbacks().

Here is the call graph for this function:

static boolean processpoptable hdlhashtable  htable  )  [static]
 

Definition at line 1016 of file process.c.

References debuggingcurrentprocess(), langdefaultpoptable(), and scriptpoptable().

Referenced by setprocesslangcallbacks().

Here is the call graph for this function:

boolean processpsuedothread tythreadmaincallback  threadmain,
tythreadmainparams  threadparams
 

Definition at line 2302 of file process.c.

References copythreadglobals(), disposethreadglobals(), hthreadglobals, idapplicationthread, tythreadglobals::idthread, newthreadglobals(), and swapinthreadglobals().

Referenced by landsystem7handleevent(), and scheduleprocess().

Here is the call graph for this function:

static boolean processpushsourcecode hdlhashtable  htable,
hdlhashnode  hnode,
bigstring  bsname
[static]
 

Definition at line 995 of file process.c.

References hnode, and scriptpushsourcecode().

Referenced by setprocesslangcallbacks().

Here is the call graph for this function:

static boolean processpushtable hdlhashtable htable  )  [static]
 

Definition at line 1007 of file process.c.

References debuggingcurrentprocess(), langdefaultpushtable(), and scriptpushtable().

Referenced by setprocesslangcallbacks().

Here is the call graph for this function:

boolean processreplacecode hdltreenode  holdcode,
hdltreenode  hnewcode
 

Definition at line 664 of file process.c.

References tylangcallbacks::codereplacedcallback, typrocessrecord::hnextprocess, typrocessrecord::holdcode, hsearch, langcallbacks, langdisposetree(), nil, and processlist.

Referenced by scriptcompiler().

Here is the call graph for this function:

boolean processruncode hdlprocessrecord  hprocess,
tyvaluerecord vreturned
 

Definition at line 2577 of file process.c.

References fifcloseallfiles(), fl, typrocessrecord::floneshot, hcode, honeshotcode, langdisposetree(), langreleasesemaphores(), langruncode(), nil, popprocess(), processbusy(), processnotbusy(), and pushprocess().

Referenced by cmdiconhit(), cmdthreadmain(), langipcruncode(), langwinipcruncode(), osahandlerunscript(), processtimeslice(), and runprocessvisit().

Here is the call graph for this function:

boolean processrunning void   ) 
 

Definition at line 2749 of file process.c.

References ctprocessthreads, nil, and processlist.

boolean processrunstring bigstring  bs  ) 
 

Definition at line 2675 of file process.c.

References newtexthandle(), nil, processlist, and processruntext().

Referenced by ccloadspecialfile(), ccrunurlscript(), processrunstringnoerrorclear(), and runurlscript().

Here is the call graph for this function:

boolean processrunstringnoerrorclear bigstring  bs  ) 
 

Definition at line 2695 of file process.c.

References fl, flinhibiterrorclear, and processrunstring().

Referenced by fwsrunstring(), scriptrunresumescripts(), and scriptrunsuspendscripts().

Here is the call graph for this function:

boolean processruntext Handle  htext  ) 
 

Definition at line 2649 of file process.c.

References addnewprocess(), flinhibiterrorclear, hcode, langbuildtree(), langdisposetree(), langerrorclear(), and nil.

Referenced by langfunctionvalue(), processrunstring(), and threadfunctionvalue().

Here is the call graph for this function:

void processscheduler void   ) 
 

Definition at line 3222 of file process.c.

References agentprocesslist, agentthread, agentthreadmain(), agentthreadsleeping, currentprocess, flagentsdisabled, flagentsenabled, flcanusethreads, flcreatedagentprocess, flpostedmemorymessage, haveheapspace(), idagentsenabledscript, killprocessthread(), langgetuserflag(), macmemoryconfig, tymemoryconfig::minstacksize, newprocessthread(), nil, oneshotscheduler(), postmemorymessage(), postthreadsmessage(), processlist, processwake(), processyield(), shellforcebackgroundtask(), shellfrontrootwindowmessage(), specialoneshotscriptsrunning(), and zerostring.

Referenced by ccbackground().

Here is the call graph for this function:

static boolean processscriptkilled boolean  flchecknow  )  [static]
 

Definition at line 954 of file process.c.

References currentprocess, fldisableyield, flthreadkilled, keyboardclearescape(), keyboardescape(), nil, and processisoneshot().

Referenced by setprocesslangcallbacks().

Here is the call graph for this function:

boolean processsleep hdlprocessthread  hthread,
unsigned long  timeout
 

Definition at line 1086 of file process.c.

References agentthread, agentthreadsleeping, fl, goodthread(), hthreadglobals, nil, processissleeping(), processlist, and threadsleep().

Referenced by extThreadSleep(), landsystem7send(), langrunmodeless(), scriptdebuggereventloop(), threadfunctionvalue(), webserverserver(), and xmlcompile().

Here is the call graph for this function:

unsigned long processstackspace void   ) 
 

Definition at line 2769 of file process.c.

References flcanusethreads, infrontierthread(), and noErr.

Here is the call graph for this function:

boolean processstartprofiling boolean  fltimesliced  ) 
 

Definition at line 874 of file process.c.

References currentprocess, typrocessrecord::flprofiling, gettablevariable(), idtableprocessor, langexternalnewvalue(), langstartprofiling(), and nil.

Referenced by opstartprofileverb().

Here is the call graph for this function:

boolean processstopprofiling void   ) 
 

Definition at line 909 of file process.c.

References currentprocess, typrocessrecord::flprofiling, and langstopprofiling().

Referenced by opstopprofileverb().

Here is the call graph for this function:

boolean processsymbolunlinking hdlhashtable  htable,
hdlhashnode  hnode
 

Definition at line 3432 of file process.c.

References flexitingthread, getprocessthread(), killprocessthread(), and threadtable.

Referenced by ccstart().

Here is the call graph for this function:

short processthreadcount void   ) 
 

Definition at line 2407 of file process.c.

References ctprocessthreads.

Referenced by ccupdatestatistics(), frontierfunctionvalue(), scriptbackgroundtask(), threadfunctionvalue(), and webservermaintainstats().

static boolean processtimeslice hdlprocessrecord  hprocess  )  [static]
 

Definition at line 2929 of file process.c.

References disposetmpvalue(), fl, and processruncode().

Referenced by agentscheduler(), and oneshotthreadmain().

Here is the call graph for this function:

boolean processtimesliceelapsed void   ) 
 

Definition at line 1818 of file process.c.

References assert, getcurrentthread(), and nil.

Referenced by scriptbackgroundtask().

Here is the call graph for this function:

boolean processwake hdlprocessthread  hthread  ) 
 

Definition at line 1165 of file process.c.

References agentthread, fl, nil, processissleeping(), processlist, THREADS_ASSERT_1, and threadwake().

Referenced by landsystem7checktimeouts(), landsystem7replyroutine(), processscheduler(), sleepingthreadvisit(), and wakeprocessthread().

Here is the call graph for this function:

boolean processyield void   ) 
 

Definition at line 1235 of file process.c.

References assert, BIGSTRING, DebugStr(), flcanusethreads, fldisableyield, flscriptresting, flscriptrunning, infrontierthread(), ingoodthread(), nil, processlist, shellwindow, and threadyield().

Here is the call graph for this function:

boolean processyieldtoagents void   ) 
 

Definition at line 1318 of file process.c.

References agentthread, fl, flagentsdisabled, fldisableyield, nil, processisoneshot(), processyield(), and wakeprocessthread().

Referenced by ccdisposerecord(), opcompileverb(), and opuncompileverb().

Here is the call graph for this function:

boolean profilingcurrentprocess void   ) 
 

Definition at line 929 of file process.c.

References currentprocess, and nil.

boolean pushprocess register hdlprocessrecord  hp  ) 
 

Definition at line 191 of file process.c.

References BIGSTRING, ctprocesses, currentprocess, typrocessstackrecord::debugerrormessagecallback, tylangcallbacks::errormessagecallback, typrocessstackrecord::errormessagecallback, hashtablestack, typrocessstackrecord::herrorstack, typrocessstackrecord::hprocess, typrocessstackrecord::htablestack, idprocessstackfull, langcallbacks, nil, processstack, tylangcallbacks::scripterrorstack, shellinternalerror, typrocessstack::stack, and typrocessstack::top.

boolean scheduleprocess hdlprocessrecord  hprocess,
hdlprocessthread hnewthread
 

Definition at line 2999 of file process.c.

References deleteprocess(), flcanusethreads, newprocessthread(), nil, oneshotthreadmain(), postthreadsmessage(), and processpsuedothread().

Referenced by oneshotscheduler(), threadcallscriptverb(), and threadfunctionvalue().

Here is the call graph for this function:

boolean setagentsenable boolean  flagents  ) 
 

Definition at line 176 of file process.c.

References flagentsenabled, idagentsenabledscript, and langsetuserflag().

Referenced by frontierfunctionvalue().

Here is the call graph for this function:

void setcurrentprocesslist hdlprocesslist  hlist  ) 
 

Definition at line 445 of file process.c.

References _entercriticalprocesssection, _leavecriticalprocesssection, and processlist.

Referenced by ccinstalltablestructure(), clearcancoonglobals(), and setcancoonglobals().

boolean setdefaulttimeslice unsigned long  ticks  ) 
 

Definition at line 1808 of file process.c.

References max, processagenttimeslice, and processonehottimeslice.

Referenced by threadfunctionvalue().

static void setprocesslangcallbacks void   )  [static]
 

Definition at line 2111 of file process.c.

References tylangcallbacks::backgroundtaskcallback, tylangcallbacks::debuggercallback, langcallbacks, tylangcallbacks::popsourcecodecallback, tylangcallbacks::poptablecallback, processbackgroundtask(), processdebugger(), processpopsourcecode(), processpoptable(), processpushsourcecode(), processpushtable(), processscriptkilled(), tylangcallbacks::pushsourcecodecallback, tylangcallbacks::pushtablecallback, and tylangcallbacks::scriptkilledcallback.

Referenced by initprocessthread().

Here is the call graph for this function:

boolean setprocesstimeslice unsigned long  ticks  ) 
 

Definition at line 1787 of file process.c.

References getcurrentthread(), and nil.

Referenced by agentthreadmain(), and threadfunctionvalue().

Here is the call graph for this function:

void swapinthreadglobals hdlthreadglobals  hglobals  ) 
 

Definition at line 1621 of file process.c.

References aboutsetthreadstring(), assert, cancoonglobals, cterrorhooks, ctoutlinestack, ctscanchars, ctscanlines, currenthashtable, currentprocess, errorhooks, flbreak, flcontinue, fldisableyield, fllangerror, flreturn, flscriptresting, flscriptrunning, flthreadkilled, flvisitingthreads, globalsstack, hashtablestack, herrornode, hthreadglobals, landgetglobals(), langcallbacks, langerrordisable, maxerrorhooks, moveleft(), nil, outlinedata, outlinestack, processstack, setcancoonglobals(), shellsetglobals(), shellwindow, sizeof(), topoutlinestack, tryerror, and tryerrorstack.

Referenced by initmainprocessthread(), odbaccesswindow(), odbclosefile(), odbcountitems(), odbdefined(), odbdelete(), odbdisposevalue(), odbgetmoddate(), odbgetnthitem(), odbgettype(), odbgetvalue(), odbnewfile(), odbnewtable(), odbopenfile(), odbsavefile(), odbsetvalue(), osapopfastcontext(), osapushfastcontext(), processpsuedothread(), and visitprocessthreads().

Here is the call graph for this function:

static boolean visitprocessthreads pascal boolean(*)(hdlthreadglobals, long visit,
long  refcon
[static]
 

Definition at line 522 of file process.c.

References copythreadglobals(), fl, flvisitingthreads, tythreadglobals::hnextglobals, hthreadglobals, landvisitsleepingthreads(), nil, NULL, and swapinthreadglobals().

Referenced by abort1shotprocess(), killdependentprocesses(), processcodedisposed(), and processgetstats().

Here is the call graph for this function:

boolean wakeprocessthread hdlprocessthread  hthread  ) 
 

Definition at line 2468 of file process.c.

References fl, landvisitsleepingthreads(), processwake(), shellcallwakeuphooks(), shellforcebackgroundtask(), and wakeupvisit().

Referenced by killprocessthread(), maimprocessvisit(), processchecktimeouts(), processkill(), processyieldtoagents(), and threadfunctionvalue().

Here is the call graph for this function:

static pascal boolean wakeupvisit Handle  hthread,
long  refcon
[static]
 

Definition at line 2457 of file process.c.

Referenced by wakeprocessthread().


Variable Documentation

hdlprocesslist agentprocesslist = nil [static]
 

Definition at line 147 of file process.c.

Referenced by processscheduler().

hdlprocessthread agentthread = 0 [static]
 

Definition at line 136 of file process.c.

Referenced by agentthreadmain(), maimprocessvisit(), processissleeping(), processscheduler(), processsleep(), processwake(), and processyieldtoagents().

boolean agentthreadsleeping = false [static]
 

Definition at line 138 of file process.c.

Referenced by agentthreadmain(), processissleeping(), processscheduler(), and processsleep().

short ctprocessthreads = 0 [static]
 

Definition at line 142 of file process.c.

Referenced by disposeprocessthread(), newprocessthread(), processrunning(), and processthreadcount().

hdlprocessrecord currentprocess = nil
 

Definition at line 73 of file process.c.

int flagentsdisabled = 0 [static]
 

Definition at line 155 of file process.c.

Referenced by agentthreadmain(), killdependentprocesses(), processscheduler(), and processyieldtoagents().

boolean flagentsenabled = true [static]
 

Definition at line 153 of file process.c.

Referenced by agentthreadmain(), processbackgroundtask(), processscheduler(), and setagentsenable().

boolean flcanusethreads = false
 

Definition at line 81 of file process.c.

Referenced by ccmenuroutine(), initmainprocessthread(), langdialogclose(), langrunmodeless(), newprocessthread(), processscheduler(), processstackspace(), processyield(), scheduleprocess(), and scriptdebuggereventloop().

boolean flcreatedagentprocess = false [static]
 

Definition at line 165 of file process.c.

Referenced by newprocess(), and processscheduler().

unsigned short fldisableyield = 0
 

Definition at line 77 of file process.c.

boolean flexitingthread = false [static]
 

Definition at line 167 of file process.c.

Referenced by exitprocessthread(), and processsymbolunlinking().

boolean flinhibiterrorclear = false [static]
 

Definition at line 169 of file process.c.

Referenced by processrunstringnoerrorclear(), and processruntext().

boolean flpostedmemorymessage = false [static]
 

Definition at line 157 of file process.c.

Referenced by postmemorymessage(), and processscheduler().

boolean flpostedthreadsmessage = false [static]
 

Definition at line 163 of file process.c.

Referenced by postthreadsmessage().

boolean flprocesscodedisposed = false [static]
 

Definition at line 149 of file process.c.

Referenced by agentscheduler(), and processdisposecode().

boolean flthreadkilled = false
 

Definition at line 79 of file process.c.

Referenced by callosafunction(), copythreadglobals(), goodthread(), killprocessthread(), processscriptkilled(), and swapinthreadglobals().

boolean flvisitingthreads = false [static]
 

Definition at line 520 of file process.c.

Referenced by copythreadglobals(), disposethreadglobals(), swapinthreadglobals(), and visitprocessthreads().

hdlthreadglobals hlatest1shot [static]
 

Definition at line 2054 of file process.c.

Referenced by abort1shotprocess(), and findlatest1shotvisit().

hdltreenode honeshotcode = nil [static]
 

Definition at line 151 of file process.c.

Referenced by processbusy(), processnotbusy(), and processruncode().

hdlthreadglobals hthreadglobals = nil [static]
 

Definition at line 159 of file process.c.

Referenced by copythreadglobals(), disposethreadglobals(), getcurrentthreadglobals(), infrontierthread(), initmainprocessthread(), inmainthread(), killprocessthread(), newcomponentglobals(), processpsuedothread(), processsleep(), swapinthreadglobals(), and visitprocessthreads().

unsigned long lastswapticks = 0 [static]
 

Definition at line 1492 of file process.c.

unsigned long latesttime [static]
 

Definition at line 2052 of file process.c.

hdlprocessrecord newlyaddedprocess = nil
 

Definition at line 75 of file process.c.

Referenced by addprocess(), langipcrunitem(), threadcallscriptverb(), and threadfunctionvalue().

long processagenttimeslice = 4 [static]
 

Definition at line 173 of file process.c.

Referenced by agentthreadmain(), getprocesstimeslice(), and setdefaulttimeslice().

hdlprocesslist processlist = nil [static]
 

Definition at line 145 of file process.c.

Referenced by addprocess(), agentscheduler(), oneshotscheduler(), processdisposecode(), processfindcode(), processkeyboardhook(), processreplacecode(), processrunning(), processrunstring(), processscheduler(), processsleep(), processwake(), processyield(), and setcurrentprocesslist().

long processonehottimeslice = 6 [static]
 

Definition at line 171 of file process.c.

Referenced by getdefaulttimeslice(), getprocesstimeslice(), newthreadglobals(), and setdefaulttimeslice().

typrocessstack processstack = {0} [static]
 

Definition at line 161 of file process.c.

Referenced by copythreadglobals(), popprocess(), pushprocess(), and swapinthreadglobals().

hdlthreadlist processthreadlist [static]
 

Definition at line 123 of file process.c.

Referenced by disposethreadglobals(), initprocess(), and newthreadglobals().

unsigned long totalticksin = 0 [static]
 

Definition at line 1490 of file process.c.

unsigned long totalticksout = 0 [static]
 

Definition at line 1491 of file process.c.


Generated on Sat Jun 10 01:15:59 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6