TaskManager


Contents


Introduction and Overview

The Task Manager module provides various facilities to ease the management of tasks. These are:

  • a SWI to find the name of a task, given its handle
  • a SWI to enumerate all the currently active tasks
  • a SWI to initiate a desktop shutdown
  • a * Command to change the size of various system areas.

The Task Manager module is not available in RISC OS 2.


SWI calls


TaskManager_TaskNameFromHandle
(SWI &42680)

Finds the name of a task
On entry
R0=task handle
On exit
R0=pointer to task name
Interrupts
Interrupts are undefined
Fast interrupts are enabled
Processor mode
Processor is in SVC mode
Re-entrancy
SWI is re-entrant
Use

This call returns the name of a task, given its task handle. If you wish to keep the name, you must copy it into your own workspace.

Related SWIs
TaskManager_EnumerateTasks

TaskManager_EnumerateTasks
(SWI &42681)

Enumerates all the currently active tasks
On entry
R0=0 for first call, or value from previous call
R1=pointer to word aligned buffer
R2=buffer length (in bytes)
On exit
R0=value to pass to next call, or < 0 if no more entries
R1=pointer to first unused word in buffer
R2=number of unused bytes in buffer
Interrupts
Interrupts are undefined
Fast interrupts are enabled
Processor mode
Processor is in SVC mode
Re-entrancy
SWI is not re-entrant
Use

This call enumerates all the currently active tasks. On exit the buffer is filled with entries of the form:

OffsetContents
+0task handle
+4pointer to task name (should be copied away and not used in place)
+8amount of memory (in K) used by the task
+12flags:
Bit(s)Meaning
0module task, otherwise application task
1slot bar is draggable, otherwise slot bar cannot be dragged
2-3Reserved, must be zero

Related SWIs
TaskManager_TaskNameFromHandle

TaskManager_Shutdown
(SWI &42682)

Initiates a desktop shutdown
On entry
R0=shutdown flags :
Bit(s)Meaning
0don't display restart dialogue (equivalent to Exit menu option)
1don't broadcast Message_PreQuit
2flag in CMOS as portable power-down
3send Message_Shutdown
4reject OS_UpCall 1 and 2 (see OS_UpCall 1 and 2)
5-31Reserved, must be zero
On exit
None
Interrupts
Interrupts are undefined
Fast interrupts are enabled
Processor mode
Processor is in SVC mode
Re-entrancy
SWI is not re-entrant
Use

This call initiates a desktop shutdown. The actions performed are controlled by the shutdown flags held in R0.

Related APIs
None

* Commands


*ChangeDynamicArea

Changes the size of the font cache, system sprite area and/or RAM disc
Syntax
*ChangeDynamicArea [-FontSize <n>[K]] [-SpriteSize <n>[K]] [-RamFSSize <n>[K]]
Parameters
<n>-Size of the area to be set, in kilobytes
Use

*ChangeDynamicArea changes the size of the font cache, system sprite area and/or RAM disc. It generates an error if it is unable to do so. Its main use is in desktop boot files.

Example
*ChangeDynamicArea -SpriteSize 32K -RamFsSize 100K
Related SWIs
OS_ChangeDynamicArea, OS_UpCall 257

Document information

Maintainer(s): RISCOS Ltd <developer@riscos.com>
History:
RevisionDateAuthorChanges
1ROLInitial version
Disclaimer:

Copyright © Pace Micro Technolgy plc, 2002.
Portions copyright © RISCOS Ltd, 2002.
Published by RISCOS Limited.
No part of this publication may be reproduced or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, or stored in any retrieval system of any nature, without the written permission of the copyright holder and the publisher, application for which shall be made to the publisher.