FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/gpf/osl/os_evt.c @ 367:c72feb362ef1
os_evt.c: got some bogus-looking code, decompiled as-is
| author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
|---|---|
| date | Thu, 29 May 2014 05:12:59 +0000 |
| parents | 227bc7a1c305 |
| children | 43ca9d5e30cb |
comparison
equal
deleted
inserted
replaced
| 366:227bc7a1c305 | 367:c72feb362ef1 |
|---|---|
| 25 NU_OR) == NU_SUCCESS) | 25 NU_OR) == NU_SUCCESS) |
| 26 return(OS_OK); | 26 return(OS_OK); |
| 27 else | 27 else |
| 28 return(OS_ERROR); | 28 return(OS_ERROR); |
| 29 } | 29 } |
| 30 | |
| 31 GLOBAL LONG | |
| 32 os_RetrieveEvents(OS_HANDLE evt_grp_handle, unsigned event_flags, char option, | |
| 33 unsigned *retrieved_events, unsigned suspend) | |
| 34 { | |
| 35 if (!EvtGrpTable[evt_grp_handle].Name[0]) | |
| 36 return(OS_ERROR); | |
| 37 if (NU_Retrieve_Events(&EvtGrpTable[evt_grp_handle].EvtGrp, | |
| 38 event_flags, option, retrieved_events, suspend) | |
| 39 == NU_SUCCESS) | |
| 40 return(OS_OK); | |
| 41 else | |
| 42 return(OS_ERROR); | |
| 43 } | |
| 44 | |
| 45 GLOBAL LONG | |
| 46 os_GetEventGroupHandle(char *evt_grp_name, OS_HANDLE *evt_grp_handle) | |
| 47 { | |
| 48 int idx; | |
| 49 | |
| 50 for (idx = 0; idx <= MaxEventGroups; idx++) { | |
| 51 if (!EvtGrpTable[idx].Name[0]) | |
| 52 break; | |
| 53 if (!strncmp(EvtGrpTable[idx].Name, evt_grp_name, | |
| 54 RESOURCE_NAMELEN)) | |
| 55 break; | |
| 56 } | |
| 57 if (idx > MaxEventGroups || !EvtGrpTable[idx].Name[0]) { | |
| 58 *evt_grp_handle = -1; | |
| 59 return(OS_ERROR); | |
| 60 } | |
| 61 *evt_grp_handle = idx; | |
| 62 return(OS_OK); | |
| 63 } |
