diff 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
line wrap: on
line diff
--- 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);
+}