FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/gpf/osx/osx.c @ 507:8fdcb8e01bbf
osx.c: _osx_open() done
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Tue, 01 Jul 2014 19:46:44 +0000 |
parents | 65c9bd2eed85 |
children | e3b597f858ce |
comparison
equal
deleted
inserted
replaced
506:65c9bd2eed85 | 507:8fdcb8e01bbf |
---|---|
11 #include "vsi.h" | 11 #include "vsi.h" |
12 #include "cust_os.h" | 12 #include "cust_os.h" |
13 | 13 |
14 int osx_config = 2; | 14 int osx_config = 2; |
15 int _caller; | 15 int _caller; |
16 T_OSX_REGISTER _osx_registry[7]; | 16 T_OSX_REGISTER _osx_registry[MAX_OSX_QUEUE]; |
17 | 17 |
18 void | 18 void |
19 int_osx_send_sig(int caller, unsigned long opc, void *signal_ptr, | 19 int_osx_send_sig(int caller, unsigned long opc, void *signal_ptr, |
20 int queue_handle) | 20 int queue_handle) |
21 { | 21 { |
178 void * | 178 void * |
179 osx_alloc_mem(unsigned long len) | 179 osx_alloc_mem(unsigned long len) |
180 { | 180 { |
181 return int_osx_alloc_mem(_caller, len); | 181 return int_osx_alloc_mem(_caller, len); |
182 } | 182 } |
183 | |
184 int | |
185 _osx_open(int caller, unsigned short queue_type, int queue_handle) | |
186 { | |
187 if (!queue_type && !queue_handle) { | |
188 _caller = caller; | |
189 return(OSX_ERROR); | |
190 } | |
191 if (queue_type >= MAX_OSX_QUEUE) | |
192 return(OSX_ERROR); | |
193 if (_osx_registry[queue_type].queue_handle != queue_handle && | |
194 _osx_registry[queue_type].queue_handle != -1) | |
195 return(OSX_ERROR); | |
196 _osx_registry[queue_type].queue_handle = queue_handle; | |
197 _osx_registry[queue_type].caller = caller; | |
198 return(OSX_OK); | |
199 } |