FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/gpf/osl/os_pro_ir.c @ 344:c51d6b3748c3
OSL: os_SuspendTask() done
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sat, 03 May 2014 19:20:05 +0000 |
parents | e3a2e6e875de |
children | 460ed6748e4c |
rev | line source |
---|---|
343
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 /* |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 * This C module is a reconstruction based on the disassembly of |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 * os_pro.obj in frame_na7_db_ir.lib from the Leonardo package. |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 */ |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 /* set of included headers from COFF symtab: */ |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 #include <stdio.h> |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 #include <string.h> |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 #include "gpfconf.h" /* FreeCalypso addition */ |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 #include "../../nucleus/nucleus.h" |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 #include "typedefs.h" |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 #include "os.h" |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 #include "gdi.h" |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 #include "os_types.h" |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 #include "os_glob.h" |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 typedef unsigned char u_char; |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 extern VOID *TCD_Current_Thread; |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 extern T_OS_TASK_TABLE_ENTRY TaskTable[]; |
344
c51d6b3748c3
OSL: os_SuspendTask() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
343
diff
changeset
|
21 extern unsigned os_time_to_tick_multiplier; |
343
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 VOID |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 os_TaskEntry(UNSIGNED TaskHandle, VOID *argv) |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 { |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 TaskTable[TaskHandle].TaskEntry(TaskHandle, 0); |
e3a2e6e875de
OSL reconstruction: beginning of os_pro_ir.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 } |
344
c51d6b3748c3
OSL: os_SuspendTask() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
343
diff
changeset
|
28 |
c51d6b3748c3
OSL: os_SuspendTask() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
343
diff
changeset
|
29 GLOBAL LONG |
c51d6b3748c3
OSL: os_SuspendTask() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
343
diff
changeset
|
30 os_SuspendTask(OS_HANDLE Caller, ULONG Time) |
c51d6b3748c3
OSL: os_SuspendTask() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
343
diff
changeset
|
31 { |
c51d6b3748c3
OSL: os_SuspendTask() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
343
diff
changeset
|
32 UNSIGNED SuspendTicks; |
c51d6b3748c3
OSL: os_SuspendTask() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
343
diff
changeset
|
33 |
c51d6b3748c3
OSL: os_SuspendTask() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
343
diff
changeset
|
34 SuspendTicks = TIME_TO_SYSTEM_TICKS(Time); |
c51d6b3748c3
OSL: os_SuspendTask() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
343
diff
changeset
|
35 if (!SuspendTicks) |
c51d6b3748c3
OSL: os_SuspendTask() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
343
diff
changeset
|
36 SuspendTicks = 1; |
c51d6b3748c3
OSL: os_SuspendTask() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
343
diff
changeset
|
37 NU_Sleep(SuspendTicks); |
c51d6b3748c3
OSL: os_SuspendTask() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
343
diff
changeset
|
38 return (OS_OK); |
c51d6b3748c3
OSL: os_SuspendTask() done
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
343
diff
changeset
|
39 } |