h6. [[Programmer's Reference Manuals]] h6(. » [[Service Calls]] h6((. » Service_StartFiler h2. Service_StartFiler h5. (Service &4B) |_<^{width:4em}. Entry | | |<^. R0 |<^. Task handle of Filer| |<^. R1 |<^. 75 (&4B)| |_<^{width:4em}. Exit | | |<^. R0 |<^. Pointer to command start module, else preserved to pass on| |<^. R1 |<^. 0 to claim service, else preserved to pass on| h4. Use This service is issued by the Filer to start up resident filer module tasks by passing the returned command to [[Wimp_StartTask]]. h4. Notes Module tasks which wish to start should claim this service, passing their start command in R0. The Filer will re-issue this service until no more modules claim it. To prevent infinite loops if an error occurs in starting a task, modules should: # Set their taskhandle to 0 on; ** Initialise (see [[Module Initialisation Code]]) ** [[Service_PostReset]] ** [[Service_StartedFiler]] # Only claim this service if their taskhandle is zero (i.e. they are not already running, and not attempting to re-start) # Set their taskhandle to a flag value (-1) when they claim this service # Do either; ** Set their taskhandle based on the return result of [[Wimp_Initialise]] if their command is called, ** or set their taskhandle back to 0 on [[Service_StartedFiler]] (failed to initialise) # Set their taskhandle back to 0 when they quit using [[Wimp_CloseDown]] Filer tasks should also check for [[Service_FilerDying]], and close down if they receive it. h4. See also * [[Module Initialisation Code]] * [[Service Calls]] * [[Service_FilerDying]] * [[Service_PostReset]] * [[Service_StartedFiler]] * [[Wimp_CloseDown]] * [[Wimp_Initialise]]