diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2014-11-29 19:56:54 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2014-11-29 19:56:54 +0000 |
commit | 70e777c30d7eeeb28591ca7769100059808aada8 (patch) | |
tree | 0174dd2142fd091858129229492e470cb7daf0b0 | |
parent | 6b2676d33f2e6c25dc98eda57325e7185a6ff763 (diff) | |
download | netsurf-70e777c30d7eeeb28591ca7769100059808aada8.tar.gz netsurf-70e777c30d7eeeb28591ca7769100059808aada8.tar.bz2 |
Add some comments about timer.device.
-rw-r--r-- | amiga/libs.c | 13 | ||||
-rwxr-xr-x | amiga/schedule.c | 4 |
2 files changed, 14 insertions, 3 deletions
diff --git a/amiga/libs.c b/amiga/libs.c index c31e82ab1..cab02d265 100644 --- a/amiga/libs.c +++ b/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("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. * \todo These should be opened using OpenClass(), however as * 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("images/bevel.image", 50, Bevel, "main", 1, true) diff --git a/amiga/schedule.c b/amiga/schedule.c index b5a115d09..cab2beecd 100755 --- a/amiga/schedule.c +++ b/amiga/schedule.c @@ -282,7 +282,7 @@ static void ami_scheduler_run(struct MsgPort *nsmsgport) static struct MsgPort *ami_schedule_open_timer(void) { struct MsgPort *msgport = AllocSysObjectTags(ASOT_PORT, - ASO_NoTrack,FALSE, + ASO_NoTrack, FALSE, TAG_DONE); 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); 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; } |