From 5b64eaac73ecf2d69208c33d3b72a34474e1bd3a Mon Sep 17 00:00:00 2001 From: Elaine Chandler Date: Tue, 10 May 2022 11:52:38 -0500 Subject: [PATCH] add doxygen comments for osiProcess.h --- modules/libcom/src/osi/osiProcess.h | 49 +++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/modules/libcom/src/osi/osiProcess.h b/modules/libcom/src/osi/osiProcess.h index 69f1303d4..a58e04df0 100644 --- a/modules/libcom/src/osi/osiProcess.h +++ b/modules/libcom/src/osi/osiProcess.h @@ -11,11 +11,13 @@ #ifndef INC_osiProcess_H #define INC_osiProcess_H +/** + * \file osiProcess.h + * + * \brief Operating System Independent Interface to Process Environment + */ /* - * Operating System Independent Interface to Process Environment - * * Author: Jeff Hill - * */ #include "libComAPI.h" @@ -23,21 +25,42 @@ extern "C" { #endif + +/** Return code for osiGetUserName() */ typedef enum osiGetUserNameReturn { - osiGetUserNameFail, - osiGetUserNameSuccess} osiGetUserNameReturn; + osiGetUserNameFail, /**< Failed*/ + osiGetUserNameSuccess /**< Succeeded*/ +} osiGetUserNameReturn; + +/** \brief get user name + * + * Get the name of the user associated with the current process + * and copy the name into the provided buffer + * + * \param pBuf buffer where user name is copied into + * \param bufSize size of input buffer. + * + * \return return failed if unable to get user name or user name is too large + * to fit in buffer. Otherwise return success + */ LIBCOM_API osiGetUserNameReturn epicsStdCall osiGetUserName (char *pBuf, unsigned bufSize); -/* - * Spawn detached process with named executable, but return - * osiSpawnDetachedProcessNoSupport if the local OS does not - * support heavy weight processes. - */ + /** Return code for osiSpawnDetachedProcess() */ typedef enum osiSpawnDetachedProcessReturn { - osiSpawnDetachedProcessFail, - osiSpawnDetachedProcessSuccess, - osiSpawnDetachedProcessNoSupport} osiSpawnDetachedProcessReturn; + osiSpawnDetachedProcessFail, /**< Failed*/ + osiSpawnDetachedProcessSuccess, /**< Succeeded */ + osiSpawnDetachedProcessNoSupport /**< Not supported by OS*/ +} osiSpawnDetachedProcessReturn; + /** \brief Spawn detached process + * + * Spawn detached process with named executable. + * + * \param pProcessName process name to be displayed. Not used in all OSs + * \param pBaseExecutableName path to executable + * + * \return return code indicating success or failure + */ LIBCOM_API osiSpawnDetachedProcessReturn epicsStdCall osiSpawnDetachedProcess (const char *pProcessName, const char *pBaseExecutableName);