FreeCalypso > hg > fc-magnetite
comparison src/gpf2/osl/os_com_ir.c @ 489:f89439ce0d45
OSL: os_com_ir.c compiles
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 22 Jun 2018 07:00:42 +0000 |
parents | 91e8dac34ada |
children | a996d0429c59 |
comparison
equal
deleted
inserted
replaced
488:ff91db8c9eb8 | 489:f89439ce0d45 |
---|---|
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 "../../nucleus/tc_extr.h" /* not seen in original, but needed */ | |
12 #include "typedefs.h" | 10 #include "typedefs.h" |
13 #include "os.h" | 11 #include "os.h" |
14 #include "gdi.h" | 12 #include "gdi.h" |
15 #include "os_types.h" | 13 #include "os_types.h" |
16 #include "os_glob.h" | 14 #include "os_glob.h" |
43 if (ret == OS_ERROR || ret == OS_TIMEOUT) | 41 if (ret == OS_ERROR || ret == OS_TIMEOUT) |
44 return(ret); | 42 return(ret); |
45 TCT_System_Protect(); | 43 TCT_System_Protect(); |
46 elem = pTable->pFreeElement; | 44 elem = pTable->pFreeElement; |
47 pTable->pFreeElement = elem->pNext; | 45 pTable->pFreeElement = elem->pNext; |
48 bcopy(Msg, &elem->Data, sizeof(OS_QDATA)); | 46 memcpy(&elem->Data, Msg, sizeof(OS_QDATA)); |
49 queue = &pTable->Queue[Priority - OS_MIN_PRIORITY]; | 47 queue = &pTable->Queue[Priority - OS_MIN_PRIORITY]; |
50 *queue->pWrite++ = &elem->Data; | 48 *queue->pWrite++ = &elem->Data; |
51 if (queue->pWrite - queue->pStart >= pTable->Entries + 1) | 49 if (queue->pWrite - queue->pStart >= pTable->Entries + 1) |
52 queue->pWrite = queue->pStart; | 50 queue->pWrite = queue->pStart; |
53 watmark = pTable->Entries - CBPtr->sm_semaphore_count; | 51 watmark = pTable->Entries - CBPtr->sm_semaphore_count; |
85 if (i < OS_MIN_PRIORITY) { | 83 if (i < OS_MIN_PRIORITY) { |
86 TCT_System_Unprotect(); | 84 TCT_System_Unprotect(); |
87 ReleaseSemaphoreCB(&pTable->FreeSemCB); | 85 ReleaseSemaphoreCB(&pTable->FreeSemCB); |
88 return(OS_ERROR); | 86 return(OS_ERROR); |
89 } | 87 } |
90 bcopy(*pQueue->pRead, Msg, sizeof(OS_QDATA)); | 88 memcpy(Msg, *pQueue->pRead, sizeof(OS_QDATA)); |
91 pElem = (T_QDATA_ELEMENT *)*pQueue->pRead++; | 89 pElem = (T_QDATA_ELEMENT *)*pQueue->pRead++; |
92 pElem->Data.data16 = 0; | 90 pElem->Data.data16 = 0; |
93 pElem->pNext = pTable->pFreeElement; | 91 pElem->pNext = pTable->pFreeElement; |
94 pTable->pFreeElement = pElem; | 92 pTable->pFreeElement = pElem; |
95 if (pQueue->pRead - pQueue->pStart >= pTable->Entries + 1) | 93 if (pQueue->pRead - pQueue->pStart >= pTable->Entries + 1) |