# HG changeset patch # User Michael Spacefalcon # Date 1401340379 0 # Node ID c72feb362ef1f7553548f26095789ad57574e12e # Parent 227bc7a1c30551c91ba052164fa26428ff25715e os_evt.c: got some bogus-looking code, decompiled as-is diff -r 227bc7a1c305 -r c72feb362ef1 gsm-fw/gpf/osl/os_evt.c --- a/gsm-fw/gpf/osl/os_evt.c Thu May 29 03:48:13 2014 +0000 +++ b/gsm-fw/gpf/osl/os_evt.c Thu May 29 05:12:59 2014 +0000 @@ -27,3 +27,37 @@ else return(OS_ERROR); } + +GLOBAL LONG +os_RetrieveEvents(OS_HANDLE evt_grp_handle, unsigned event_flags, char option, + unsigned *retrieved_events, unsigned suspend) +{ + if (!EvtGrpTable[evt_grp_handle].Name[0]) + return(OS_ERROR); + if (NU_Retrieve_Events(&EvtGrpTable[evt_grp_handle].EvtGrp, + event_flags, option, retrieved_events, suspend) + == NU_SUCCESS) + return(OS_OK); + else + return(OS_ERROR); +} + +GLOBAL LONG +os_GetEventGroupHandle(char *evt_grp_name, OS_HANDLE *evt_grp_handle) +{ + int idx; + + for (idx = 0; idx <= MaxEventGroups; idx++) { + if (!EvtGrpTable[idx].Name[0]) + break; + if (!strncmp(EvtGrpTable[idx].Name, evt_grp_name, + RESOURCE_NAMELEN)) + break; + } + if (idx > MaxEventGroups || !EvtGrpTable[idx].Name[0]) { + *evt_grp_handle = -1; + return(OS_ERROR); + } + *evt_grp_handle = idx; + return(OS_OK); +}