•  Back 
  •  The MagiC Mac cookie 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : TOS - The Operating System
Author      : 
Version     : tos.hyp (December 19, 2008)
Subject     : Programmieren/Atari
Nodes       : 3010
Index Size  : 93790
HCP-Version : 5
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Title
@help       : 
@options    : +g -i -s +x +zz -t4
@width      : 70
View Ref-File12.1.11.9  intrLock                                                TOS

This must be called before switching to Atari-mode from a Macintosh 
routine that could run in an interrupt. In addition, one has to count 
on the fact that before the switch a foreign stack is active which 
does not belong to the address space of the Atari-mode.

Therefore one has to switch beforehand to a stack (see minStackSize) 
from the Atari address space. After switching back to the Macinntosh- 
mode one has to call intrUnlock, of course.

With the aid of these intr-semaphores one can recognize when the CPU 
executes commands under MagiC in a non-interrupt state. This state has 
to be recognized, because only then can the Macintosh background 
processes and other Macintosh routines be called without risk by the 
MagiC Mac kernel through its interrupt control routines. (While the 
interrupt routines or Macintosh routines are being processed, no Mac 
routines may be called by the MagiC Mac kernel, because the MacOS is 
not reentrant. During this time no Mac events are handled; even 
[Command]-[W]/[Q] do not function at that time).

See also: The MagiC Mac cookie   System-Cookies