comparison src/gpf2/osl/os_com_fl.c @ 488:ff91db8c9eb8

OSL: os_com_fl.c compiles
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 22 Jun 2018 06:38:03 +0000
parents 91e8dac34ada
children
comparison
equal deleted inserted replaced
487:91e8dac34ada 488:ff91db8c9eb8
4 */ 4 */
5 5
6 /* set of included headers from COFF symtab: */ 6 /* set of included headers from COFF symtab: */
7 #include <stdio.h> 7 #include <stdio.h>
8 #include <string.h> 8 #include <string.h>
9 #include "gpfconf.h" /* FreeCalypso addition */ 9 #include "nucleus.h"
10 #include "../../nucleus/nucleus.h"
11 #include "typedefs.h" 10 #include "typedefs.h"
12 #include "os.h" 11 #include "os.h"
13 #include "gdi.h" 12 #include "gdi.h"
14 #include "os_types.h" 13 #include "os_types.h"
15 #include "os_glob.h" 14 #include "os_glob.h"
150 for (i = 1; i <= MaxCommunications; i++) { 149 for (i = 1; i <= MaxCommunications; i++) {
151 if (!ComTable[i].Name[0]) 150 if (!ComTable[i].Name[0])
152 continue; 151 continue;
153 if (susp = ComTable[i].FreeSemCB.sm_suspension_list) { 152 if (susp = ComTable[i].FreeSemCB.sm_suspension_list) {
154 if (susp->sm_suspended_task == (NU_TASK*)tcb) 153 if (susp->sm_suspended_task == (NU_TASK*)tcb)
155 return(ComTable[i].FreeSemCB.sm_name + 1); 154 return((unsigned char *)
155 ComTable[i].FreeSemCB.sm_name + 1);
156 susp = (SM_SUSPEND *) susp->sm_suspend_link.cs_next; 156 susp = (SM_SUSPEND *) susp->sm_suspend_link.cs_next;
157 for (susp2 = susp; ; ) { 157 for (susp2 = susp; ; ) {
158 if (susp2->sm_suspended_task == (NU_TASK*)tcb) 158 if (susp2->sm_suspended_task == (NU_TASK*)tcb)
159 return(ComTable[i].FreeSemCB.sm_name+1); 159 return((unsigned char *)
160 ComTable[i].FreeSemCB.sm_name + 1);
160 susp2 = (SM_SUSPEND *) 161 susp2 = (SM_SUSPEND *)
161 susp2->sm_suspend_link.cs_next; 162 susp2->sm_suspend_link.cs_next;
162 if (susp2 == susp) 163 if (susp2 == susp)
163 break; 164 break;
164 } 165 }
165 } 166 }
166 if (susp = ComTable[i].UsedSemCB.sm_suspension_list) { 167 if (susp = ComTable[i].UsedSemCB.sm_suspension_list) {
167 if (susp->sm_suspended_task == (NU_TASK*)tcb) 168 if (susp->sm_suspended_task == (NU_TASK*)tcb)
168 return(ComTable[i].UsedSemCB.sm_name + 1); 169 return((unsigned char *)
170 ComTable[i].UsedSemCB.sm_name + 1);
169 susp = (SM_SUSPEND *) susp->sm_suspend_link.cs_next; 171 susp = (SM_SUSPEND *) susp->sm_suspend_link.cs_next;
170 for (susp2 = susp; ; ) { 172 for (susp2 = susp; ; ) {
171 if (susp2->sm_suspended_task == (NU_TASK*)tcb) 173 if (susp2->sm_suspended_task == (NU_TASK*)tcb)
172 return(ComTable[i].UsedSemCB.sm_name+1); 174 return((unsigned char *)
175 ComTable[i].UsedSemCB.sm_name + 1);
173 susp2 = (SM_SUSPEND *) 176 susp2 = (SM_SUSPEND *)
174 susp2->sm_suspend_link.cs_next; 177 susp2->sm_suspend_link.cs_next;
175 if (susp2 == susp) 178 if (susp2 == susp)
176 break; 179 break;
177 } 180 }
294 297
295 if (NU_Create_Semaphore(&ComSemCB, "COMSEM", 1, NU_PRIORITY) 298 if (NU_Create_Semaphore(&ComSemCB, "COMSEM", 1, NU_PRIORITY)
296 != NU_SUCCESS) 299 != NU_SUCCESS)
297 return(OS_ERROR); 300 return(OS_ERROR);
298 for (i = 1; i <= MaxCommunications; i++) 301 for (i = 1; i <= MaxCommunications; i++)
299 bzero(&ComTable[i], sizeof(T_OS_COM_TABLE_ENTRY)); 302 memset(&ComTable[i], 0, sizeof(T_OS_COM_TABLE_ENTRY));
300 return(OS_OK); 303 return(OS_OK);
301 } 304 }
302 305
303 GLOBAL LONG 306 GLOBAL LONG
304 os_CloseQueue(OS_HANDLE TaskHandle, OS_HANDLE ComHandle) 307 os_CloseQueue(OS_HANDLE TaskHandle, OS_HANDLE ComHandle)