Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Processes

Figures and Listings

Preface About This Book xi

Chapter 1 Introduction to Processes and Tasks 1-1

Figure 1-1 The desktop with several applications open 1-4

Chapter 2 Process Manager 2-1

Listing 2-1 Searching for a specific process 2-6

Listing 2-2 Launching an application 2-10

Listing 2-3 Terminating an application 2-12

Chapter 3 Time Manager 3-1

Figure 3-1 Original and revised Time Managers (drifting, unpredictable frequency) 3-7

Figure 3-2 The extended Time Manager (drift-free, fixed frequency) 3-7

Listing 3-1 Installing and activating a Time Manager task 3-10

Listing 3-2 Passing the address of the application's A5 world to a Time Manager task 3-12

Listing 3-3 Defining a Time Manager task that can manipulate global variables 3-13

Listing 3-4 Defining a periodic Time Manager task 3-14

Listing 3-5 Calculating the time required to install and activate a Time Manager task 3-15

Listing 3-6 Calculating the time consumed by a 1-tick delay 3-16

Chapter 4 Vertical Retrace Manager 4-1

Listing 4-1 Checking whether you can use slot-based VBL routines 4-11

Listing 4-2 Determining the slot number of the main graphics device 4-11

Listing 4-3 Initializing and installing a task record 4-12

Listing 4-4 Finding the address of the task record from within a VBL task 4-12

Listing 4-5 Resetting a VBL task so that it executes again 4-13

Listing 4-6 Storing the value of the A5 register directly after the task record in memory 4-14

Listing 4-7 Saving the value of the A5 register when installing a VBL task 4-14

Listing 4-8 Setting up the A5 register and modifying a global variable in a VBL task 4-15

Listing 4-9 Modifying application global variables in a VBL task 4-15

Listing 4-10 Setting up and restoring the A5 register in a VBL task 4-16

Listing 4-11 Defining a cursor information record 4-17

Listing 4-12 Changing the cursor within a VBL task 4-17

Listing 4-13 Installing the cursor-spinning task into a vertical retrace queue 4-18

Listing 4-14 Removing the cursor-spinning task from its vertical retrace queue 4-19

Listing 4-15 Installing a persistent VBL task 4-20

Chapter 5 Notification Manager 5-1

Figure 5-1 A notification in the Application menu 5-4

Figure 5-2 A notification alert box 5-5

Listing 5-1 Setting up a notification record 5-8

Chapter 6 Deferred Task Manager 6-1

Listing 6-1 Checking for the availability of the Deferred Task Manager 6-6

Listing 6-2 Installing a task into the deferred task queue 6-7

Listing 6-3 Finding the value of the A1 register 6-8

Listing 6-4 Defining a deferred task 6-8

Listing 6-5 Deferring cursor updating to noninterrupt time 6-9

Chapter 7 Segment Manager 7-1

Figure 7-1 The location of the jump table 7-5

Figure 7-2 The structure of segment 0 7-6

Figure 7-3 Format of an MPW jump table entry when the segment is unloaded 7-7

Figure 7-4 Format of an MPW jump table entry when the segment is loaded 7-8

Chapter 8 Shutdown Manager 8-1

Figure 8-1 A shutdown alert box 8-6

Listing 8-1 Sending a Shutdown event 8-8

Listing 8-2 A sample custom shutdown procedure 8-10

Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUN 1996