Fix IO memory access .. SB128 driver makes noises in VMWare - CMI is untested (Curren...
[AROS.git] / rom / graphics / waittof.c
blobd398b1a986c277cb4c9b8b014fd6b650490603fb
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 Lang: english
7 */
9 #include <proto/exec.h>
10 #include <exec/tasks.h>
11 #include <graphics/gfxbase.h>
13 /*****************************************************************************
15 NAME */
17 AROS_LH0(VOID, WaitTOF,
19 /* SYNOPSIS */
21 /* LOCATION */
22 struct GfxBase *, GfxBase, 45, Graphics)
24 /* FUNCTION
26 Wait for vertical blank.
28 INPUTS
30 RESULT
32 Adds the task to the TOF queue; it will be signalled when the vertical
33 blank interrupt occurs.
35 NOTES
37 EXAMPLE
39 BUGS
41 SEE ALSO
43 INTERNALS
45 HISTORY
47 *****************************************************************************/
49 AROS_LIBFUNC_INIT
51 struct Node wait; /* We cannot use the task's node here as that is
52 used to queue the task in Wait() */
54 wait.ln_Name = (char *)FindTask(NULL);
55 SetSignal(0, SIGF_SINGLE);
57 Disable();
59 AddTail((struct List *)&GfxBase->TOF_WaitQ, (struct Node *)&wait);
60 Wait(SIGF_SINGLE);
61 Remove((struct Node *)&wait);
63 Enable();
65 AROS_LIBFUNC_EXIT
67 } /* WaitTOF */