Update bbox_lib.cpp

This commit is contained in:
Eao3piq4e 2022-08-02 18:05:36 +08:00
parent 58d5c900c9
commit cf8e1541b1
1 changed files with 19 additions and 2 deletions

View File

@ -326,8 +326,14 @@ struct PIPE_ID* bbox_GetFreePid(void)
}
/*
* Release the occupied pipeid
*/
function name: bbox_PutPid
description: Release the occupied pipe.
arguments: A pointer of type struct PIPE_ID*.
return value: void
note: If the argument pointer is null, then there is no need to free the storage, the function ends.
date: 2022/8/2
contact tel: same
*/
void bbox_PutPid(struct PIPE_ID* pstPid)
{
struct PIPE_IDS* pstPids = NULL;
@ -344,6 +350,17 @@ void bbox_PutPid(struct PIPE_ID* pstPid)
/*
* find available pipe id by file handle
*/
/*
function name: bbox_FindPid
description: In all occupied pipes, the function search the flag pipe through compare all structure
array elements's member variable stPid's member variable iFd with the function
argument iFd, if they are equal, then return the addres of this array elements.
arguments: An integer that indicates a file's file handle.
return value: A pointer of type struct PIPE_ID* or NULL.
note: none
date: 2022/8/2
contact tel: same
*/
struct PIPE_ID* bbox_FindPid(int iFd)
{
u32 i;