Sleep Requests
Sleep Requests
A sleep request informs a routine that the Power Manager would like to
put the Macintosh Portable computer into the sleep state. The routine then has
the option of denying the sleep request. If any routine in the sleep queue denies
the sleep request, the Power Manager sends a sleep-request revocation to
each routine that it has already called with a sleep request, and the Macintosh
Portable does not enter the sleep state. If every routine in the sleep queue
accepts the sleep request, then the Power Manager sends a sleep demand to
each routine in the sleep queue. After every routine has processed the sleep
demand, the Power Manager puts the Macintosh Portable into the sleep
state.
The following figure illustrates the sequence of events that occurs when the
Power Manager issues a sleep request.
Before calling any of the routines in the sleep queue with a sleep request, the
Power Manager calls a built-in sleep queue entry that checks the status of
certain network services, as summarized in the table below. Only if all of the
network services permit sleep does the Power Manager continue to send
sleep requests to the routines in the sleep queue. The network services in the
following Table are described in the AppleTalk Manager description.
The Power Manager issues a sleep request when a sleep timeout occurs
(that is, when the period of inactivity set by the user in the Portable control
panel has expired).
Table Response of network services to sleep requests and demands
Response to Response to
Network service Response to conditional unconditional
in use sleep request sleep demand sleep demand
.MPP low-level Close driver if Close driver if user Close driver
protocol (DDP, NBP, Macintosh Por table gives okay; else deny
RTMP, AEP) is on battery; else request
deny request
.XPP extended Close driver if Close driver if Close driver
protocol (ASP, AFP); Macintosh Portable user gives okay;
no server volume is on battery; else else deny request
mounted deny request
.XPP; server volume Deny request Close server sessions Close server
mounted Íand close driver if sessions and
user gives okay; close driver
else deny request
An application is Deny request Close server sessions Close server
currently using Íand close driver if sessions and
AppleTalk Íuser gives okay; close driver
else deny request