FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/services/ffs/task.c @ 219:2beb88a3d528
gsm-fw links with FFS included
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Mon, 06 Jan 2014 20:24:53 +0000 |
parents | fee45482aa2a |
children | 842c9fd828fd |
comparison
equal
deleted
inserted
replaced
218:fee45482aa2a | 219:2beb88a3d528 |
---|---|
11 #include "../../include/config.h" | 11 #include "../../include/config.h" |
12 #include "ffs.h" | 12 #include "ffs.h" |
13 #include "core.h" | 13 #include "core.h" |
14 #include "task.h" | 14 #include "task.h" |
15 #include "ffstrace.h" | 15 #include "ffstrace.h" |
16 #include "intctl.h" | |
16 #include "../../riviera/rvm/rvm_use_id_list.h" | 17 #include "../../riviera/rvm/rvm_use_id_list.h" |
17 | 18 |
18 /****************************************************************************** | 19 /****************************************************************************** |
19 * Globals and function prototypes | 20 * Globals and function prototypes |
20 ******************************************************************************/ | 21 ******************************************************************************/ |
111 * Target Platform Abstraction Functions | 112 * Target Platform Abstraction Functions |
112 ******************************************************************************/ | 113 ******************************************************************************/ |
113 | 114 |
114 req_id_t request_id_get(void) | 115 req_id_t request_id_get(void) |
115 { | 116 { |
116 extern uint32 int_disable(void); | 117 uint32 cpsr; |
117 extern void int_enable(uint32 tmp); | |
118 uint32 cprs; | |
119 | 118 |
120 // We disable interrupt to avoid any other tasks to get the same id. | 119 // We disable interrupt to avoid any other tasks to get the same id. |
121 cprs = int_disable(); | 120 cpsr = int_disable(); |
122 request_id_last++; | 121 request_id_last++; |
123 | 122 |
124 if (request_id_last < 0) | 123 if (request_id_last < 0) |
125 request_id_last = 0; | 124 request_id_last = 0; |
126 | 125 |
127 int_enable(cprs); | 126 int_enable(cpsr); |
128 | 127 |
129 return request_id_last; | 128 return request_id_last; |
130 } | 129 } |
131 | 130 |
132 void *target_malloc(unsigned int size) | 131 void *target_malloc(unsigned int size) |