1 #include <dos/dosextens.h>
2 #include <dos/dostags.h>
4 #include <proto/exec.h>
11 #include "aros_stuff.h"
13 void SAVEDS
Prefs_Process (void)
16 struct CDVDBase
*global
;
20 mp
= &((struct Process
*)FindTask(NULL
))->pr_MsgPort
;
23 global
= (APTR
)msg
->mn_Node
.ln_Name
;
25 BUG(dbprintf(global
, "Prefs handler process started for CDVDBase %p\n", global
);)
31 * Init character set translation only from within here
32 * because this can trigger loading some files from disk,
33 * which in turn can trigger new requests to our handler.
39 * 1. In future this process will be responsible for reading
40 * preferences file from disk.
41 * 2. For AROS we need some way to trigger late codesets.library
42 * initialization. CDVDFS is mounder before SYS: is available.
45 Sigset
= Wait(SIGBREAKF_CTRL_C
|SIGBREAKF_CTRL_D
);
46 } while (!(Sigset
& SIGBREAKF_CTRL_C
));
49 PutMsg(global
->Dback
,&global
->DummyMsg
); /* Kill handshake */
52 static struct TagItem
const PrefsProcTags
[] = {
53 {NP_Entry
, (IPTR
)Prefs_Process
},
54 {NP_Name
, (IPTR
)"CDVDFS prefs monitor"},
59 {NP_CodeType
, CODETYPE_PPC
},
64 void Prefs_Init (struct CDVDBase
*global
)
67 global
->PrefsProc
= (struct Task
*)CreateNewProc(PrefsProcTags
);
68 if (global
->PrefsProc
) {
69 global
->DummyMsg
.mn_ReplyPort
= global
->Dback
;
70 global
->DummyMsg
.mn_Node
.ln_Name
= (APTR
)global
;
71 PutMsg(&((struct Process
*)global
->PrefsProc
)->pr_MsgPort
, &global
->DummyMsg
);
72 WaitPort(global
->Dback
); /* handshake startup */
73 GetMsg(global
->Dback
); /* remove dummy msg */
77 void Prefs_Uninit (struct CDVDBase
*global
)
79 if (global
->PrefsProc
)
81 Signal(global
->PrefsProc
, SIGBREAKF_CTRL_C
);
82 WaitPort(global
->Dback
); /* He's dead jim! */
83 GetMsg(global
->Dback
);
84 Delay(100); /* ensure he's dead */