changeset 373:5f7d723b9343

os_mem_fl.c: os_MemInit() done
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sun, 01 Jun 2014 00:46:47 +0000
parents 47391b5c15ff
children 3efb28578dad
files gsm-fw/gpf/osl/os_mem_fl.c
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gsm-fw/gpf/osl/os_mem_fl.c	Sun Jun 01 00:09:52 2014 +0000
+++ b/gsm-fw/gpf/osl/os_mem_fl.c	Sun Jun 01 00:46:47 2014 +0000
@@ -134,3 +134,21 @@
 		SuspendType);
 	return(OS_OK);
 }
+
+GLOBAL LONG
+os_MemInit(void)
+{
+	USHORT i;
+
+	if (NU_Create_Semaphore(&MemSemCB, "MEMSEM", 1, NU_PRIORITY)
+			!= NU_SUCCESS)
+		return(OS_ERROR);
+	for (i = 0; i <= MaxPoolGroups; i++) {
+		PoolBorder[i].Start = (char *)0xFFFFFFFF;
+		PoolBorder[i].End   = (char *)0;
+		PartGrpTable[i].grp_head = 0;
+		PartGrpTable[i].name[0] = 0;
+	}
+	MemPoolTable[0].pcb = &mem_pool_head;
+	return(OS_OK);
+}