# HG changeset patch # User Michael Spacefalcon # Date 1403486390 0 # Node ID 9eeeef3ff7db943777783eeca9a74bc0dbe1087e # Parent caeff442faf1fcdd7e23844abbd5ee9920fadbba os_sem_fl.c: os_QuerySemaphore() done diff -r caeff442faf1 -r 9eeeef3ff7db gsm-fw/gpf/osl/os_sem_fl.c --- a/gsm-fw/gpf/osl/os_sem_fl.c Mon Jun 23 01:10:51 2014 +0000 +++ b/gsm-fw/gpf/osl/os_sem_fl.c Mon Jun 23 01:19:50 2014 +0000 @@ -96,3 +96,19 @@ NU_Release_Semaphore(&SemSemCB); return(OS_OK); } + +GLOBAL LONG +os_QuerySemaphore(OS_HANDLE TaskHandle, OS_HANDLE SemHandle, USHORT *Count) +{ + OPTION SuspendType; + UNSIGNED SemCount, TasksWaiting; + NU_TASK *First; + CHAR Name[NU_MAX_NAME]; + + if (NU_Semaphore_Information(&SemTable[SemHandle].SemCB, Name, + &SemCount, &SuspendType, &TasksWaiting, + &First) != NU_SUCCESS) + return(OS_ERROR); + *Count = SemCount; + return(OS_OK); +}