From 340b61c47f11a8cfb9d1ce3661dec0a7b6f1cdcc Mon Sep 17 00:00:00 2001 From: Eao3piq4e Date: Wed, 3 Aug 2022 23:40:40 +0800 Subject: [PATCH] Update bbox_threads.cpp --- src/gausskernel/cbb/bbox/bbox_threads.cpp | 29 +++++++++++++---------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/gausskernel/cbb/bbox/bbox_threads.cpp b/src/gausskernel/cbb/bbox/bbox_threads.cpp index 6f368033e..4129973cf 100644 --- a/src/gausskernel/cbb/bbox/bbox_threads.cpp +++ b/src/gausskernel/cbb/bbox/bbox_threads.cpp @@ -481,15 +481,12 @@ void BBOX_PrintFailedLog(const char* pFileName) sys_close(iBboxLogFd); } -/* - * export thread information. - */ /* function name: BBOX_ListThread -description: Write log infomation into specific file, if errors arise, print the infomation about errors. -arguments: The only argument is a pointer of type const char* to a filename string, if this file doesn't - exist, we will creat a new file named it. -return value: An integer, if function work normally, the value is RET_OK, else is RET_ERR. +description: Export thread information. +arguments: The only argument is a structure pointer named pstArgs, its type is struct BBOX_ListParams*, + what matters is its member variable callback function pointer and thread infomation. +return value: void note: none date: 2022/8/3 contact tel: 18720816902 @@ -600,12 +597,18 @@ errout: } /* - * get return value of child process - * in : iClonePid - PID of child process - * pstArgs - parameter - * iCloneErrno - err code - * return 0 if success else failed. - */ +function name: BBOX_GetClonePidResult +description: The function get the status of child process at first, then according to it assign pstArgs's + member variables iError and iResult appropriate values. +arguments: The first argument is a integer named iClonePid, it represents the pid of child process. + The second argument is a structure pointer named pstArgs, its type is struct BBOX_ListParams*, + what matters is its member variable callback function pointer and thread infomation. + The third argument is a integer indicating error code. +return value: An integer, if function work normally, the value is RET_OK, else is RET_ERR. +note: none +date: 2022/8/3 +contact tel: 18720816902 +*/ s32 BBOX_GetClonePidResult(pid_t iClonePid, struct BBOX_ListParams* pstArgs, s32 iCloneErrno) { s32 iStatus = 0;