tools/genmodule: Fix error in tests/clib/execl; should also fix gcc
[AROS.git] / rom / timer / beginio.c
blobd30b542570de4c45aa60b0bb21915ad6753b9f1c
1 /*
2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: BeginIO - Start up a timer.device request, generic version for software timer emulation
6 Lang: english
7 */
9 #include <aros/libcall.h>
11 #include "timer_intern.h"
13 /*****************************************************************************
15 NAME */
16 #include <devices/timer.h>
17 #include <proto/timer.h>
18 AROS_LH1(void, BeginIO,
20 /* SYNOPSIS */
21 AROS_LHA(struct timerequest *, timereq, A1),
23 /* LOCATION */
24 struct TimerBase *, TimerBase, 5, Timer)
26 /* FUNCTION
27 BeginIO() will perform a timer.device command. It is normally
28 called from within DoIO() and SendIO().
30 INPUT
31 timereq - The request to process.
33 RESULT
34 The requested message will be processed.
36 NOTES
37 This function is safe to call from interrupts.
39 EXAMPLE
41 BUGS
43 SEE ALSO
44 exec.library/Abort(), exec.library/SendIO(), exec.library/DoIO()
46 INTERNALS
48 HISTORY
49 23-01-1998 iaint Implemented again.
51 ******************************************************************************/
54 AROS_LIBFUNC_INIT
57 * common_BeginIO() is called in the middle of BeginIO() implementation
58 * to provide support for time base correction.
59 * If we query TBC hardware before starting doing anything here, we can
60 * calculate how much time it took to do all processing and take this
61 * into account when programming hardware.
62 * See PowerPC native versions for working example.
65 common_BeginIO(timereq, TimerBase);
68 * common_BeginIO() returns TRUE if it wants us to re-adjust
69 * our hardware (if the request was added to the head of a queue
70 * and elapsed time changes).
71 * Real hardware version of timer.device needs to do this here.
74 AROS_LIBFUNC_EXIT