mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-17 01:33:16 +03:00
Add some comments about timer.device.
This commit is contained in:
parent
6b2676d33f
commit
70e777c30d
13
amiga/libs.c
13
amiga/libs.c
@ -105,10 +105,21 @@ bool ami_libs_open(void)
|
|||||||
AMINS_LIB_OPEN("Picasso96API.library", 0, P96, "main", 1, true)
|
AMINS_LIB_OPEN("Picasso96API.library", 0, P96, "main", 1, true)
|
||||||
AMINS_LIB_OPEN("workbench.library", 37, Workbench, "main", 1, true)
|
AMINS_LIB_OPEN("workbench.library", 37, Workbench, "main", 1, true)
|
||||||
|
|
||||||
|
/* NB: timer.device is opened in schedule.c (ultimately by the scheduler process).
|
||||||
|
* The library base and interface are obtained there, rather than here, due to
|
||||||
|
* the additional complexities of opening devices, which aren't important here
|
||||||
|
* (as we only need the library interface), but are important for the scheduler
|
||||||
|
* (as it also uses the device interface). We trust that the scheduler has
|
||||||
|
* initialised before any other code requires the timer's library interface
|
||||||
|
* (this is ensured by waiting for the scheduler to start up) and that it is
|
||||||
|
* OK to use a child process' timer interface, to avoid opening it twice.
|
||||||
|
*/
|
||||||
|
|
||||||
/* BOOPSI classes.
|
/* BOOPSI classes.
|
||||||
* \todo These should be opened using OpenClass(), however as
|
* \todo These should be opened using OpenClass(), however as
|
||||||
* the macros all use the deprecated _GetClass() functions,
|
* the macros all use the deprecated _GetClass() functions,
|
||||||
* we may as well just open them normally for now. */
|
* we may as well just open them normally for now.
|
||||||
|
*/
|
||||||
|
|
||||||
AMINS_LIB_OPEN("classes/arexx.class", 50, ARexx, "main", 1, true)
|
AMINS_LIB_OPEN("classes/arexx.class", 50, ARexx, "main", 1, true)
|
||||||
AMINS_LIB_OPEN("images/bevel.image", 50, Bevel, "main", 1, true)
|
AMINS_LIB_OPEN("images/bevel.image", 50, Bevel, "main", 1, true)
|
||||||
|
@ -282,7 +282,7 @@ static void ami_scheduler_run(struct MsgPort *nsmsgport)
|
|||||||
static struct MsgPort *ami_schedule_open_timer(void)
|
static struct MsgPort *ami_schedule_open_timer(void)
|
||||||
{
|
{
|
||||||
struct MsgPort *msgport = AllocSysObjectTags(ASOT_PORT,
|
struct MsgPort *msgport = AllocSysObjectTags(ASOT_PORT,
|
||||||
ASO_NoTrack,FALSE,
|
ASO_NoTrack, FALSE,
|
||||||
TAG_DONE);
|
TAG_DONE);
|
||||||
|
|
||||||
tioreq = (struct TimeRequest *)AllocSysObjectTags(ASOT_IOREQUEST,
|
tioreq = (struct TimeRequest *)AllocSysObjectTags(ASOT_IOREQUEST,
|
||||||
@ -294,7 +294,7 @@ static struct MsgPort *ami_schedule_open_timer(void)
|
|||||||
OpenDevice("timer.device", UNIT_WAITUNTIL, (struct IORequest *)tioreq, 0);
|
OpenDevice("timer.device", UNIT_WAITUNTIL, (struct IORequest *)tioreq, 0);
|
||||||
|
|
||||||
TimerBase = (struct Device *)tioreq->Request.io_Device;
|
TimerBase = (struct Device *)tioreq->Request.io_Device;
|
||||||
ITimer = (struct TimerIFace *)GetInterface((struct Library *)TimerBase,"main",1,NULL);
|
ITimer = (struct TimerIFace *)GetInterface((struct Library *)TimerBase, "main", 1, NULL);
|
||||||
|
|
||||||
return msgport;
|
return msgport;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user