changeset 443:42f9e12a9ced

os_sem_fl.c: os_SemInit() done
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 23 Jun 2014 00:55:22 +0000
parents 0dbc1795ff42
children caeff442faf1
files gsm-fw/gpf/osl/os_sem_fl.c
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gsm-fw/gpf/osl/os_sem_fl.c	Mon Jun 23 00:46:57 2014 +0000
+++ b/gsm-fw/gpf/osl/os_sem_fl.c	Mon Jun 23 00:55:22 2014 +0000
@@ -63,3 +63,16 @@
 		Current, SuspendType, TasksWaiting);
 	return(OS_OK);
 }
+
+GLOBAL LONG
+os_SemInit(void)
+{
+	USHORT i;
+
+	if (NU_Create_Semaphore(&SemSemCB, "SEMSEM", 1, NU_PRIORITY)
+			!= NU_SUCCESS)
+		return(OS_ERROR);
+	for (i = 1; i <= MaxSemaphores; i++)
+		bzero(&SemTable[i], sizeof(T_OS_SEM_TABLE_ENTRY));
+	return(OS_OK);
+}