This source file includes following definitions.
- taskHook
- CreateTask_spytask
1 #include "lolevel.h"
2 #include "platform.h"
3 #include "core.h"
4 #include "dryos31.h"
5
6 #define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
7
8 const char * const new_sa = &_end;
9
10
11 void task_TouchPanel_my(void);
12
13 extern void task_CaptSeq();
14 extern void task_DvlpSeqTask();
15 extern void task_InitFileModules();
16 extern void task_TouchPanel();
17 extern void task_MovieRecord();
18 extern void task_ExpDrv();
19 extern void task_FileWrite();
20
21 void taskHook(context_t **context)
22 {
23 task_t *tcb=(task_t*)((char*)context-offsetof(task_t, context));
24
25
26 if(tcb->entry == (void*)task_CaptSeq) tcb->entry = (void*)capt_seq_task;
27 if(tcb->entry == (void*)task_DvlpSeqTask) tcb->entry = (void*)dvlp_seq_task;
28 if(tcb->entry == (void*)task_InitFileModules) tcb->entry = (void*)init_file_modules_task;
29 if(tcb->entry == (void*)task_TouchPanel) tcb->entry = (void*)task_TouchPanel_my;
30 if(tcb->entry == (void*)task_MovieRecord) tcb->entry = (void*)movie_record_task;
31 if(tcb->entry == (void*)task_ExpDrv) tcb->entry = (void*)exp_drv_task;
32 if(tcb->entry == (void*)task_FileWrite) tcb->entry = (void*)filewritetask;
33 }
34
35
36
37
38 void CreateTask_spytask()
39 {
40 _CreateTask("SpyTask", 0x19, 0x2000, core_spytask, 0);
41 }
42
43
44
45
46
47