add NOWARN_SIZEOF_POINTER_MEMACCESS
[AROS.git] / rom / graphics / waittof.c
blob248d936aada7372639dd2679429eabe58fb2c23f
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 #include "graphics_intern.h"
15 /*****************************************************************************
17 NAME */
19 AROS_LH0(VOID, WaitTOF,
21 /* SYNOPSIS */
23 /* LOCATION */
24 struct GfxBase *, GfxBase, 45, Graphics)
26 /* FUNCTION
28 Wait for vertical blank.
30 INPUTS
32 RESULT
34 Adds the task to the TOF queue; it will be signalled when the vertical
35 blank interrupt occurs.
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
45 INTERNALS
47 HISTORY
49 *****************************************************************************/
51 AROS_LIBFUNC_INIT
53 struct Node wait; /* We cannot use the task's node here as that is
54 used to queue the task in Wait() */
56 wait.ln_Name = (char *)FindTask(NULL);
57 SetSignal(0, SIGF_SINGLE);
59 Disable();
61 AddTail((struct List *)&GfxBase->TOF_WaitQ, (struct Node *)&wait);
62 Wait(SIGF_SINGLE);
63 Remove((struct Node *)&wait);
65 Enable();
67 AROS_LIBFUNC_EXIT
69 } /* WaitTOF */