comparison gsm-fw/gpf/osl/os_sem_fl.c @ 442:0dbc1795ff42

os_sem_fl.c: os_SemaphoreInformation() done
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 23 Jun 2014 00:46:57 +0000
parents b23743555ca8
children 42f9e12a9ced
comparison
equal deleted inserted replaced
441:b23743555ca8 442:0dbc1795ff42
41 *Handle = Idx; 41 *Handle = Idx;
42 return(OS_OK); 42 return(OS_OK);
43 } else 43 } else
44 return(OS_ERROR); 44 return(OS_ERROR);
45 } 45 }
46
47 GLOBAL LONG
48 os_SemaphoreInformation(USHORT Index, char *Buffer)
49 {
50 OS_HANDLE Handle;
51 OPTION SuspendType;
52 UNSIGNED Current, TasksWaiting;
53 NU_TASK *First;
54 CHAR Name[NU_MAX_NAME];
55
56 if (os_GetSemaphoreEntry(Index, &Handle) < 0)
57 return(OS_ERROR);
58 if (NU_Semaphore_Information(&SemTable[Handle].SemCB, Name, &Current,
59 &SuspendType, &TasksWaiting, &First)
60 != NU_SUCCESS)
61 return(OS_ERROR);
62 sprintf(Buffer, "Semname:%s Count:%ld Suspend:%d Waiting:%ld", Name,
63 Current, SuspendType, TasksWaiting);
64 return(OS_OK);
65 }