From cf8e1541b1d4675cda53e6d60323b988d4c0048d Mon Sep 17 00:00:00 2001 From: Eao3piq4e Date: Tue, 2 Aug 2022 18:05:36 +0800 Subject: [PATCH] Update bbox_lib.cpp --- src/gausskernel/cbb/bbox/bbox_lib.cpp | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/gausskernel/cbb/bbox/bbox_lib.cpp b/src/gausskernel/cbb/bbox/bbox_lib.cpp index 41f522373..cdb2520e2 100644 --- a/src/gausskernel/cbb/bbox/bbox_lib.cpp +++ b/src/gausskernel/cbb/bbox/bbox_lib.cpp @@ -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;