comparison gsm-fw/gpf/osl/os_sem_fl.c @ 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
comparison
equal deleted inserted replaced
442:0dbc1795ff42 443:42f9e12a9ced
61 return(OS_ERROR); 61 return(OS_ERROR);
62 sprintf(Buffer, "Semname:%s Count:%ld Suspend:%d Waiting:%ld", Name, 62 sprintf(Buffer, "Semname:%s Count:%ld Suspend:%d Waiting:%ld", Name,
63 Current, SuspendType, TasksWaiting); 63 Current, SuspendType, TasksWaiting);
64 return(OS_OK); 64 return(OS_OK);
65 } 65 }
66
67 GLOBAL LONG
68 os_SemInit(void)
69 {
70 USHORT i;
71
72 if (NU_Create_Semaphore(&SemSemCB, "SEMSEM", 1, NU_PRIORITY)
73 != NU_SUCCESS)
74 return(OS_ERROR);
75 for (i = 1; i <= MaxSemaphores; i++)
76 bzero(&SemTable[i], sizeof(T_OS_SEM_TABLE_ENTRY));
77 return(OS_OK);
78 }