make the window layout a little tidier.
[AROS.git] / arch / .unmaintained / m68k-emul / forbid.c
blobcd831b9559c068272703da8874801a45ff1bf56e
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <exec/execbase.h>
8 /******************************************************************************
10 NAME
11 #include <proto/exec.h>
13 AROS_LH0(void, Forbid,
15 LOCATION
16 struct ExecBase *, SysBase, 22, Exec)
18 FUNCTION
19 Forbid any further taskswitches until a matching call to Permit().
20 Naturally disabling taskswitches means:
22 THIS CALL IS DANGEROUS
24 Do not use it without thinking very well about it or better do not
25 use it at all. Most of the time you can live without it by using
26 semaphores or similar.
28 Calls to Forbid() nest, i.e. for each call to Forbid() you need one
29 call to Enable().
31 INPUTS
32 None.
34 RESULT
35 None.
37 NOTES
38 To prevent deadlocks calling Wait() in forbidden state breaks the
39 forbid - thus taskswitches may happen again.
41 EXAMPLE
43 BUGS
45 SEE ALSO
46 Permit(), Disable(), Enable(), Wait()
48 INTERNALS
50 HISTORY
52 ******************************************************************************/
54 /* The real function is written in assembler as stub which calls me */
55 void _Forbid (struct ExecBase * SysBase)
57 ++SysBase->TDNestCnt;
58 } /* _Forbid */