enable trim_trailing_whitespace

This commit is contained in:
zimoch authored and Andrew Johnson committed 2026-02-18 10:34:08 -06:00
1 parent cd36c03da4
commit db693d4930
99 files changed
+515 -513

No files matched your search

+6 -6
View File
@@ -305,17 +305,17 @@ LIBCOM_API int epicsStdCall bucketFree (BUCKET *prb)
/*
* bucketAddItem()
*/
LIBCOM_API int epicsStdCall
LIBCOM_API int epicsStdCall
bucketAddItemUnsignedId(BUCKET *prb, const unsigned *pId, const void *pApp)
{
return bucketAddItem(prb, &BSET[bidtUnsigned], pId, pApp);
}
LIBCOM_API int epicsStdCall
LIBCOM_API int epicsStdCall
bucketAddItemPointerId(BUCKET *prb, void * const *pId, const void *pApp)
{
return bucketAddItem(prb, &BSET[bidtPointer], pId, pApp);
}
LIBCOM_API int epicsStdCall
LIBCOM_API int epicsStdCall
bucketAddItemStringId(BUCKET *prb, const char *pId, const void *pApp)
{
return bucketAddItem(prb, &BSET[bidtString], pId, pApp);
@@ -412,17 +412,17 @@ LIBCOM_API void * epicsStdCall bucketLookupAndRemoveItemStringId (BUCKET *prb, c
/*
* bucketRemoveItem()
*/
LIBCOM_API int epicsStdCall
LIBCOM_API int epicsStdCall
bucketRemoveItemUnsignedId (BUCKET *prb, const unsigned *pId)
{
return bucketLookupAndRemoveItem(prb, &BSET[bidtUnsigned], pId)?S_bucket_success:S_bucket_uknId;
}
LIBCOM_API int epicsStdCall
LIBCOM_API int epicsStdCall
bucketRemoveItemPointerId (BUCKET *prb, void * const *pId)
{
return bucketLookupAndRemoveItem(prb, &BSET[bidtPointer], pId)?S_bucket_success:S_bucket_uknId;
}
LIBCOM_API int epicsStdCall
LIBCOM_API int epicsStdCall
bucketRemoveItemStringId (BUCKET *prb, const char *pId)
{
return bucketLookupAndRemoveItem(prb, &BSET[bidtString], pId)?S_bucket_success:S_bucket_uknId;
+1 -1
View File
@@ -17,7 +17,7 @@
* Provides routines for converting various numeric types into an ascii string.
* They off a combination of speed and convenience not available with sprintf().
*
* All functions return the number of characters in the output
* All functions return the number of characters in the output
*/
#ifndef INCcvtFasth
+1 -1
View File
@@ -394,7 +394,7 @@ epicsPrtEnvParams(void)
/*
* envGetInetPortConfigParam ()
*/
LIBCOM_API unsigned short epicsStdCall envGetInetPortConfigParam
LIBCOM_API unsigned short epicsStdCall envGetInetPortConfigParam
(const ENV_PARAM *pEnv, unsigned short defaultPort)
{
long longStatus;
+1 -1
View File
@@ -241,7 +241,7 @@ LIBCOM_API void errlogFlush(void);
* ::errVerbose determines if the filename and line number are shown.
*/
LIBCOM_API void errPrintf(
long status, const char *pFileName, int lineno,
long status, const char *pFileName, int lineno,
EPICS_PRINTF_FMT(const char *pformat), ...
) EPICS_PRINTF_STYLE(4,5);
+2 -2
View File
@@ -101,7 +101,7 @@ template class resTable<timerForOldFdmgr, chronIntId>;
# pragma warning ( pop )
#endif
LIBCOM_API fdRegForOldFdmgr::fdRegForOldFdmgr
LIBCOM_API fdRegForOldFdmgr::fdRegForOldFdmgr
(const SOCKET fdIn, const fdRegType typeIn,
const bool onceOnlyIn, fdManager &managerIn,
pCallBackFDMgr pFuncIn, void *pParamIn) :
@@ -322,7 +322,7 @@ extern "C" LIBCOM_API int epicsStdCall fdmgr_clear_fd (fdctx *pfdctx, SOCKET fd)
/*
* deprecated interface
*/
extern "C" LIBCOM_API int epicsStdCall fdmgr_add_fd (
extern "C" LIBCOM_API int epicsStdCall fdmgr_add_fd (
fdctx *pfdctx, SOCKET fd, void (*pfunc)(void *pParam), void *param)
{
return fdmgr_add_callback (pfdctx, fd, fdi_read, pfunc, param);
+1 -1
View File
@@ -54,7 +54,7 @@ typedef struct {
epicsMutexId lock;
}FREELISTPVT;
LIBCOM_API void epicsStdCall
LIBCOM_API void epicsStdCall
freeListInitPvt(void **ppvt,int size,int nmalloc)
{
FREELISTPVT *pfl;
+5 -5
View File
@@ -776,7 +776,7 @@ const iocshVarDef * epicsStdCall iocshFindVariable(const char *name)
/*
* Free storage created by iocshRegister/iocshRegisterVariable
*/
void epicsStdCall iocshFree(void)
void epicsStdCall iocshFree(void)
{
struct iocshCommand *pc;
struct iocshVariable *pv;
@@ -799,8 +799,8 @@ void epicsStdCall iocshFree(void)
/*
* Parse argument input based on the arg type specified.
* It is worth noting that depending on type this argument may
* be defaulted if a value is not specified. For example, a
* It is worth noting that depending on type this argument may
* be defaulted if a value is not specified. For example, a
* double/int with no value will default to 0 which may allow
* you to add optional arguments to the end of your argument list.
*/
@@ -948,7 +948,7 @@ static void helpCallFunc(const iocshArgBuf *args)
if (epicsStrGlobMatch(piocshFuncDef->name, argv[iarg]) != 0) {
if (! firstFunction) {
fprintf(epicsGetStdout(),
fprintf(epicsGetStdout(),
ANSI_UNDERLINE(" ")
"\n");
}
@@ -970,7 +970,7 @@ static void helpCallFunc(const iocshArgBuf *args)
if(piocshFuncDef->usage) {
fprintf(epicsGetStdout(), "\n%s", piocshFuncDef->usage);
}
firstFunction = false;
}
+69 -69
View File
@@ -68,28 +68,28 @@ extern "C" {
* ```
*/
typedef enum {
/** The argument is converted to an integer value. */
/** The argument is converted to an integer value. */
iocshArgInt,
/** The argument is converted to a double-precision floating point value. */
/** The argument is converted to a double-precision floating point value. */
iocshArgDouble,
/** The argument is left as a string.
*
* The memory used to hold the string is "owned" by iocsh
* and will be reused once the handler function returns.
*/
/** The argument is left as a string.
*
* The memory used to hold the string is "owned" by iocsh
* and will be reused once the handler function returns.
*/
iocshArgString,
/** The argument must be pdbbase. */
/** The argument must be pdbbase. */
iocshArgPdbbase,
/** An arbitrary number of arguments is expected.
*
* Subsequent iocshArg structures will be ignored.
*/
/** An arbitrary number of arguments is expected.
*
* Subsequent iocshArg structures will be ignored.
*/
iocshArgArgv,
/** A copy of the argument will be made and a pointer to the copy will be passed to the handler.
*
* The called function should eventually release this copy
* by using the pointer as an argument to free().
*/
/** A copy of the argument will be made and a pointer to the copy will be passed to the handler.
*
* The called function should eventually release this copy
* by using the pointer as an argument to free().
*/
iocshArgPersistentString,
/**
* Equivalent to iocshArgString with a hint for tab completion that the
@@ -118,41 +118,41 @@ typedef enum {
* ```
*/
typedef union iocshArgBuf {
/** The value as an integer.
*
* Corresponds to the @ref iocshArgInt type.
*/
/** The value as an integer.
*
* Corresponds to the @ref iocshArgInt type.
*/
int ival;
/** The value as a double-precision floating point.
*
* Corresponds to the @ref iocshArgDouble type.
*/
/** The value as a double-precision floating point.
*
* Corresponds to the @ref iocshArgDouble type.
*/
double dval;
/** The value as a string.
*
* Corresponds to the @ref iocshArgString and related types.
*/
/** The value as a string.
*
* Corresponds to the @ref iocshArgString and related types.
*/
char *sval;
/** The value as an untyped pointer.
*
* Can be used with the @ref iocshArgPdbbase type.
*/
/** The value as an untyped pointer.
*
* Can be used with the @ref iocshArgPdbbase type.
*/
void *vval;
/** The variadic arguments, for the @ref iocshArgArgv type. */
/** The variadic arguments, for the @ref iocshArgArgv type. */
struct {
/** Number of arguments passed to the IOC shell command.
*
* Provides the number of elements of the `av` array.
*/
/** Number of arguments passed to the IOC shell command.
*
* Provides the number of elements of the `av` array.
*/
int ac;
/** The arguments, as an array of strings. */
/** The arguments, as an array of strings. */
char **av;
}aval;
}iocshArgBuf;
/**
* @struct iocshVarDef
*
*
* This struct is used with the function iocshRegisterVariable. Each
* instance includes a name, a data type (see iocshArgType), and a
* pointer to the value.
@@ -187,9 +187,9 @@ typedef struct iocshVarDef {
* ```
*/
typedef struct iocshArg {
/** Used by the `help` command to print a synopsis for the command. */
/** Used by the `help` command to print a synopsis for the command. */
const char *name;
/** Data type of the argument. */
/** Data type of the argument. */
iocshArgType type;
}iocshArg;
@@ -211,19 +211,19 @@ typedef struct iocshArg {
* ```
*/
typedef struct iocshFuncDef {
/** Name of the command or function. */
/** Name of the command or function. */
const char *name;
/** Number of entries in the array of pointers to argument descriptions.
*
* If 0, `arg` can be `NULL`.
*/
/** Number of entries in the array of pointers to argument descriptions.
*
* If 0, `arg` can be `NULL`.
*/
int nargs;
/** Array of pointers to structs of type iocshArg.
*
* Can be `NULL` if `nargs` is 0.
*/
/** Array of pointers to structs of type iocshArg.
*
* Can be `NULL` if `nargs` is 0.
*/
const iocshArg * const *arg;
/** Text displayed when using running `help <command>`. */
/** Text displayed when using running `help <command>`. */
const char* usage;
}iocshFuncDef;
#define IOCSHFUNCDEF_HAS_USAGE
@@ -248,7 +248,7 @@ typedef void (*iocshCallFunc)(const iocshArgBuf *argBuf);
/**
* @struct
*
*
* This struct is used as a return value for the function iocshFindCommand.
*/
typedef struct iocshCmdDef {
@@ -268,10 +268,10 @@ LIBCOM_API void epicsStdCall iocshRegister(
const iocshFuncDef *piocshFuncDef, iocshCallFunc func);
/**
* @brief
*
* @param piocshVarDef
* @return void
* @brief
*
* @param piocshVarDef
* @return void
*/
LIBCOM_API void epicsStdCall iocshRegisterVariable (
const iocshVarDef *piocshVarDef);
@@ -280,8 +280,8 @@ LIBCOM_API void epicsStdCall iocshRegisterVariable (
* @brief Returns a struct of type iocshCmdDef whose element values are determined
* by the name parameter. This function calls the function registryFind, defined in
* Registry.h
*
* @param name
*
* @param name
* @return const iocshCmdDef*
*/
LIBCOM_API const iocshCmdDef * epicsStdCall iocshFindCommand(
@@ -291,8 +291,8 @@ LIBCOM_API const iocshCmdDef * epicsStdCall iocshFindCommand(
* @brief Returns a struct of type iocshVarDef whose element values are determined
* by the name parameter. This function calls the function registryFind, defined in
* Registry.h
*
* @param name
*
* @param name
* @return const iocshVarDef*
*/
LIBCOM_API const iocshVarDef * epicsStdCall iocshFindVariable(
@@ -302,8 +302,8 @@ LIBCOM_API const iocshVarDef * epicsStdCall iocshFindVariable(
/* This should only be called when iocsh is no longer needed*/
/**
* @brief Frees all memory allocated to registered commands and variables.
*
* @return void
*
* @return void
*/
LIBCOM_API void epicsStdCall iocshFree(void);
@@ -345,7 +345,7 @@ LIBCOM_API int epicsStdCall iocshCmd(const char *cmd);
* If `NULL`, commands are read from the standard input.
* @param[in] macros
* `NULL` or a comma separated list of macro definitions.
* eg. `"VAR1=x,VAR2=y"`
* eg. `"VAR1=x,VAR2=y"`
*
* @retval 0 on success
* @retval non-zero on error
@@ -377,7 +377,7 @@ LIBCOM_API int epicsStdCall iocshLoad(const char *pathname, const char* macros);
*/
LIBCOM_API int epicsStdCall iocshRun(const char *cmd, const char* macros);
/**
/**
* @brief Signal error from an IOC shell function.
*
* @param err 0 - success (no op), !=0 - error
@@ -389,11 +389,11 @@ LIBCOM_API int iocshSetError(int err);
/* Makes macros that shadow environment variables work correctly with epicsEnvSet */
/**
* @brief Unsets macro values.
*
* This function sets the values of all macros passed to either iocshLoad or
*
* This function sets the values of all macros passed to either iocshLoad or
* iocshRun to NULL.
*
* @param name
*
* @param name
* @return void
*/
LIBCOM_API void epicsStdCall iocshEnvClear(const char *name);
+13 -13
View File
@@ -19,7 +19,7 @@
*
* \brief Client on the IOC that forwards log messages to the log server
*
* Together with the program iocLogServer, a log client provides generic
* Together with the program iocLogServer, a log client provides generic
* support for logging text messages from an IOC or other program to the log
* server host machine.
*/
@@ -40,26 +40,26 @@ extern "C" {
typedef void *logClientId;
/** \brief Creates a new log client
*
* Starts a background thread to connect to server and returns immediately.
* If a connection cannot be established, an error message is
* printed on the console, but the log client will keep trying to connect in
* the background. This thread will also periodically (every 5 seconds) flush
* pending messages out to the server.
*
* Starts a background thread to connect to server and returns immediately.
* If a connection cannot be established, an error message is
* printed on the console, but the log client will keep trying to connect in
* the background. This thread will also periodically (every 5 seconds) flush
* pending messages out to the server.
*
* \param server_addr log server IP address
* \param server_port log server port
*
* \return log client handle.
* \return log client handle.
*/
LIBCOM_API logClientId epicsStdCall logClientCreate (
struct in_addr server_addr, unsigned short server_port);
/** \brief Log message
*
* Logs message to log server. Messages are not immediately sent to the log
* server. Instead they are sent periodically (every 5 seconds), when the cache
* overflows, or when logClientFlush() is called. If messages can't sent, an error
* Logs message to log server. Messages are not immediately sent to the log
* server. Instead they are sent periodically (every 5 seconds), when the cache
* overflows, or when logClientFlush() is called. If messages can't sent, an error
* message will be printed to stderr
*
* \param id log client handle
@@ -78,7 +78,7 @@ LIBCOM_API void epicsStdCall logClientSend (logClientId id, const char *message)
LIBCOM_API void epicsStdCall logClientShow (logClientId id, unsigned level);
/** \brief Flushes all outstanding messages
*
*
* Immediately sends all outstanding messages to the server
*
* \param id log client handle
@@ -95,7 +95,7 @@ LIBCOM_API void epicsStdCall logClientFlush (logClientId id);
LIBCOM_API void epicsStdCall iocLogPrefix(const char* prefix);
/** \brief DEPRECATED
* \deprecated deprecated interface; retained for backward compatibility
* \deprecated deprecated interface; retained for backward compatibility
*/
/* note: implementations are in iocLog.c, not logClient.c */
LIBCOM_API logClientId epicsStdCall logClientInit (void);
+1 -1
View File
@@ -72,7 +72,7 @@ static int initIPAddr ( struct in_addr ipAddr, unsigned port,
* "pAddrString" does not contain an address of the form
* "n.n.n.n:p or host:p"
*/
LIBCOM_API int epicsStdCall
LIBCOM_API int epicsStdCall
aToIPAddr( const char *pAddrString, unsigned short defaultPort,
struct sockaddr_in *pIP )
{
+44 -44
View File
@@ -13,17 +13,17 @@
#ifndef INC_epicsStdlib_H
#define INC_epicsStdlib_H
/**
/**
* \file epicsStdlib.h
* \brief Functions to convert strings to primitive types
*
* These routines convert a string into an integer of the indicated type and
* number base, or into a floating point type. The units pointer argument may
* be NULL, but if not it will be left pointing to the first non-whitespace
* character following the numeric string, or to the terminating zero byte.
*
* These routines convert a string into an integer of the indicated type and
* number base, or into a floating point type. The units pointer argument may
* be NULL, but if not it will be left pointing to the first non-whitespace
* character following the numeric string, or to the terminating zero byte.
*
* The return value from these routines is a status code, zero meaning OK.
* For the macro functions beginning with `epicsScan` the return code is 0
* For the macro functions beginning with `epicsScan` the return code is 0
* or 1 (0=failure or 1=success, similar to the sscanf() function).
*/
@@ -59,31 +59,31 @@ extern "C" {
* \param units Pointer to a char * (this will be set with the units string)
* \return Status code (0=OK, see macro definitions for possible errors)
*/
LIBCOM_API int
LIBCOM_API int
epicsParseLong(const char *str, long *to, int base, char **units);
/**
/**
* \brief Convert a string to a unsigned long type
* \copydetails epicsParseLong
* \copydetails epicsParseLong
*/
LIBCOM_API int
epicsParseULong(const char *str, unsigned long *to, int base, char **units);
/**
/**
* \brief Convert a string to a long long type
* \copydetails epicsParseLong
* \copydetails epicsParseLong
*/
LIBCOM_API int
epicsParseLLong(const char *str, long long *to, int base, char **units);
/**
/**
* \brief Convert a string to a unsigned long long type
* \copydetails epicsParseLong
* \copydetails epicsParseLong
*/
LIBCOM_API int
epicsParseULLong(const char *str, unsigned long long *to, int base, char **units);
/**
/**
* \brief Convert a string to a double type
*
* \param str Pointer to a constant character array
@@ -94,65 +94,65 @@ LIBCOM_API int
LIBCOM_API int
epicsParseDouble(const char *str, double *to, char **units);
/**
/**
* \brief Convert a string to a float type
* \copydetails epicsParseDouble
*/
LIBCOM_API int
epicsParseFloat(const char *str, float *to, char **units);
/**
/**
* \brief Convert a string to an epicsInt8 type
* \copydetails epicsParseLong
* \copydetails epicsParseLong
*/
LIBCOM_API int
epicsParseInt8(const char *str, epicsInt8 *to, int base, char **units);
/**
/**
* \brief Convert a string to an epicsUInt8 type
* \copydetails epicsParseLong
* \copydetails epicsParseLong
*/
LIBCOM_API int
epicsParseUInt8(const char *str, epicsUInt8 *to, int base, char **units);
/**
/**
* \brief Convert a string to an epicsInt16 type
* \copydetails epicsParseLong
* \copydetails epicsParseLong
*/
LIBCOM_API int
epicsParseInt16(const char *str, epicsInt16 *to, int base, char **units);
/**
/**
* \brief Convert a string to an epicsUInt16 type
* \copydetails epicsParseLong
* \copydetails epicsParseLong
*/
LIBCOM_API int
epicsParseUInt16(const char *str, epicsUInt16 *to, int base, char **units);
/**
/**
* \brief Convert a string to an epicsInt32 type
* \copydetails epicsParseLong
* \copydetails epicsParseLong
*/
LIBCOM_API int
epicsParseInt32(const char *str, epicsInt32 *to, int base, char **units);
/**
/**
* \brief Convert a string to an epicsUInt32 type
* \copydetails epicsParseLong
* \copydetails epicsParseLong
*/
LIBCOM_API int
epicsParseUInt32(const char *str, epicsUInt32 *to, int base, char **units);
/**
/**
* \brief Convert a string to an epicsInt64 type
* \copydetails epicsParseLong
* \copydetails epicsParseLong
*/
LIBCOM_API int
epicsParseInt64(const char *str, epicsInt64 *to, int base, char **units);
/**
/**
* \brief Convert a string to an epicsUInt64 type
* \copydetails epicsParseLong
* \copydetails epicsParseLong
*/
LIBCOM_API int
epicsParseUInt64(const char *str, epicsUInt64 *to, int base, char **units);
@@ -166,38 +166,38 @@ LIBCOM_API int
* This is analogous to the return value from sscanf()
*/
/**
* Macro utilizing ::epicsParseLong to convert
/**
* Macro utilizing ::epicsParseLong to convert
* \return 0=failure, 1=success
*/
#define epicsScanLong(str, to, base) (!epicsParseLong(str, to, base, NULL))
/**
* Macro utilizing ::epicsParseULong to convert
/**
* Macro utilizing ::epicsParseULong to convert
* \return 0=failure, 1=success
*/
#define epicsScanULong(str, to, base) (!epicsParseULong(str, to, base, NULL))
/**
* Macro utilizing ::epicsParseLLong to convert
/**
* Macro utilizing ::epicsParseLLong to convert
* \return 0=failure, 1=success
*/
#define epicsScanLLong(str, to, base) (!epicsParseLLong(str, to, base, NULL))
/**
* Macro utilizing ::epicsParseULLong to convert
/**
* Macro utilizing ::epicsParseULLong to convert
* \return 0=failure, 1=success
*/
#define epicsScanULLong(str, to, base) (!epicsParseULLong(str, to, base, NULL))
/**
* Macro utilizing ::epicsParseFloat to convert
/**
* Macro utilizing ::epicsParseFloat to convert
* \return 0=failure, 1=success
*/
#define epicsScanFloat(str, to) (!epicsParseFloat(str, to, NULL))
/**
* Macro utilizing ::epicsParseDouble to convert
/**
* Macro utilizing ::epicsParseDouble to convert
* \return 0=failure, 1=success
*/
#define epicsScanDouble(str, to) (!epicsParseDouble(str, to, NULL))
+27 -27
View File
@@ -31,26 +31,26 @@ extern "C" {
#endif
/** \brief Converts C-style escape sequences to their binary form
*
* Copies characters from string to an output buffer and converts C-style escape sequences to
* their binary form. Since the output string can never be longer than the source, it is legal for
*
* Copies characters from string to an output buffer and converts C-style escape sequences to
* their binary form. Since the output string can never be longer than the source, it is legal for
* \p inbuf and \p outbuf to point to the same buffer and \p outsize and \p inlen
* be equal, thus performing the character translation in-place.
*
* \param outbuf buffer to copy string to. The resulting string will be zero-terminated as long as
* \p outsize is non-zero.
* \param outsize length of output buffer not including the null-terminator.
*
* \param outbuf buffer to copy string to. The resulting string will be zero-terminated as long as
* \p outsize is non-zero.
* \param outsize length of output buffer not including the null-terminator.
* \param inbuf buffer to copy from. Null byte terminates the string.
* \param inlen maximum number of characters to copy from input buffer.
*
* \return number of characters that were written into output buffer, not counting the null terminator.
* \return number of characters that were written into output buffer, not counting the null terminator.
**/
LIBCOM_API int epicsStrnRawFromEscaped(char *outbuf, size_t outsize,
const char *inbuf, size_t inlen);
/** \brief Converts non-printable characters into C-style escape sequences
*
* Copies characters from the string into a output buffer converting non-printable characters into C-style
* Copies characters from the string into a output buffer converting non-printable characters into C-style
* escape sequences. In-place translations are not allowed since the escaped results will usually be larger
* than the input string.
*
@@ -59,14 +59,14 @@ LIBCOM_API int epicsStrnRawFromEscaped(char *outbuf, size_t outsize,
* All other non-printable characters appear in form `\xHH` where HH are two hex digits.
* Non-printable characters are determined by the C runtime library’s isprint() function.
*
* \param outbuf buffer to copy string to. The resulting string will be zero-terminated as long as
* @p outsize is non-zero.
* \param outbuf buffer to copy string to. The resulting string will be zero-terminated as long as
* @p outsize is non-zero.
* \param outsize length of output buffer not including the null-terminator.
* \param inbuf buffer to copy from. Null byte will not terminates the string.
* \param inlen Number of characters to copy from input buffer.
*
* \return number of characters that would have been stored in the output buffer if it were large enough,
* or a negative value if \p outbuf == \p inbuf.
* \return number of characters that would have been stored in the output buffer if it were large enough,
* or a negative value if \p outbuf == \p inbuf.
*
*/
LIBCOM_API int epicsStrnEscapedFromRaw(char *outbuf, size_t outsize,
@@ -74,16 +74,16 @@ LIBCOM_API int epicsStrnEscapedFromRaw(char *outbuf, size_t outsize,
/** \brief Scans string and returns size of output buffer needed to escape that string
*
* Scans up to \p len characters of the string that may contain non-printable characters, and returns
* the size of the output buffer that would be needed to escape that string.
* This routine is faster than calling epicsStrnEscapedFromRaw() with a zero length output buffer; both
* Scans up to \p len characters of the string that may contain non-printable characters, and returns
* the size of the output buffer that would be needed to escape that string.
* This routine is faster than calling epicsStrnEscapedFromRaw() with a zero length output buffer; both
* should return the same result.
*
*\param buf string to scan
*\param len length of input string
*
*\return size of the output buffer that would be needed for converting to escape characters, not
* including the null terminator.
*\return size of the output buffer that would be needed for converting to escape characters, not
* including the null terminator.
*/
LIBCOM_API size_t epicsStrnEscapedFromRawSize(const char *buf, size_t len);
@@ -113,7 +113,7 @@ LIBCOM_API char * epicsStrnDup(const char *s, size_t len);
/** \brief Prints escaped version of string
*
* Prints the contents of its input buffer to given file descriptor, substituting escape sequences
* Prints the contents of its input buffer to given file descriptor, substituting escape sequences
* for non-printable characters.
*
* \param fp File descriptor to print to
@@ -121,12 +121,12 @@ LIBCOM_API char * epicsStrnDup(const char *s, size_t len);
* \param n Length of string
*/
LIBCOM_API int epicsStrPrintEscaped(FILE *fp, const char *s, size_t n);
#define epicsStrSnPrintEscaped epicsStrnEscapedFromRaw
/** \brief Calculates length of string
*
* Implements strnlen from the C standard library.
* Implements strnlen from the C standard library.
*/
LIBCOM_API size_t epicsStrnLen(const char *s, size_t maxlen);
@@ -154,14 +154,14 @@ LIBCOM_API int epicsStrGlobMatch(const char *str, const char *pattern);
LIBCOM_API int epicsStrnGlobMatch(const char *str, size_t len, const char *pattern);
/** \brief Extract tokens from string
*
*
* Implements strtok_r from the C standard library
*/
LIBCOM_API char * epicsStrtok_r(char *s, const char *delim, char **lasts);
/** \brief Calculates a hash of a null-terminated string
*
* Calculates a hash of a null-terminated string. Initial seed may be provided which
* Calculates a hash of a null-terminated string. Initial seed may be provided which
* permits multiple strings to be combined into a single hash result.
*
*\param str null-terminated string
@@ -169,12 +169,12 @@ LIBCOM_API char * epicsStrtok_r(char *s, const char *delim, char **lasts);
* set to 0.
*
*\return Hash value for string
*/
*/
LIBCOM_API unsigned int epicsStrHash(const char *str, unsigned int seed);
/** \brief Calculates a hash of a memory buffer
*
* Calculates a hash of a memory buffer that may contain null values. Initial seed may be provided which
* Calculates a hash of a memory buffer that may contain null values. Initial seed may be provided which
* permits multiple buffers to be combined into a single hash result.
*
*\param str buffer
@@ -183,7 +183,7 @@ LIBCOM_API unsigned int epicsStrHash(const char *str, unsigned int seed);
* set to 0.
*
*\return Hash value for buffer
*/
*/
LIBCOM_API unsigned int epicsMemHash(const char *str, size_t length,
unsigned int seed);
/** \brief Compare two strings and return a number in the range [0.0, 1.0] or -1.0 on error.
@@ -198,7 +198,7 @@ LIBCOM_API unsigned int epicsMemHash(const char *str, size_t length,
LIBCOM_API double epicsStrSimilarity(const char *A, const char *B);
/** \brief DEPRECATED
* \deprecated dbTranslateEscape is deprecated, use epicsStrnRawFromEscaped() instead
* \deprecated dbTranslateEscape is deprecated, use epicsStrnRawFromEscaped() instead
*/
LIBCOM_API int dbTranslateEscape(char *s, const char *ct);
+2 -2
View File
@@ -11,7 +11,7 @@
/**
* \file epicsTypes.h
* \author: Jeff Hill
*
*
* \brief The core data types used by epics
*/
@@ -37,7 +37,7 @@ typedef enum {
/**
* \name epicsTypes
* Architecture Independent Data Types
*
*
* These are sufficient for all our current archs
* @{
*/
+23 -23
View File
@@ -13,19 +13,19 @@
*
* \brief OS independent interface to perform atomic operations
*
* This is an operating system and compiler independent interface to an operating system and or compiler
* This is an operating system and compiler independent interface to an operating system and or compiler
* dependent implementation of several atomic primitives.
*
* These primitives can be safely used in a multithreaded programs on symmetric multiprocessing (SMP)
* systems. Where possible the primitives are implemented with compiler intrinsic wrappers for architecture
* These primitives can be safely used in a multithreaded programs on symmetric multiprocessing (SMP)
* systems. Where possible the primitives are implemented with compiler intrinsic wrappers for architecture
* specific instructions. Otherwise they are implemented with OS specific functions and otherwise, when lacking
* a sufficently capable OS specific interface, then in some rare situations a mutual exclusion primitive is
* a sufficently capable OS specific interface, then in some rare situations a mutual exclusion primitive is
* used for synchronization.
*
* In operating systems environments which allow C code to run at interrupt level the implementation must
* In operating systems environments which allow C code to run at interrupt level the implementation must
* use interrupt level invocable CPU instruction primitives.
*
* All C++ functions are implemented in the namespace atomics which is nested inside of namespace epics.
* All C++ functions are implemented in the namespace atomics which is nested inside of namespace epics.
*/
/*
* Author Jeffrey O. Hill
@@ -48,15 +48,15 @@ extern "C" {
/** Argument type for atomic operations on pointers*/
typedef void * EpicsAtomicPtrT;
/** \brief load target into cache
/** \brief load target into cache
*
* load target into cache
* load target into cache
**/
EPICS_ATOMIC_INLINE void epicsAtomicReadMemoryBarrier (void);
/** \brief push cache version of target into target
/** \brief push cache version of target into target
*
* push cache version of target into target
* push cache version of target into target
*/
EPICS_ATOMIC_INLINE void epicsAtomicWriteMemoryBarrier (void);
@@ -121,7 +121,7 @@ EPICS_ATOMIC_INLINE int epicsAtomicDecrIntT ( int * pTarget );
*
* \param pTarget pointer to target
* \param delta value to add to target
*
*
* \return New value of target
*/
EPICS_ATOMIC_INLINE size_t epicsAtomicAddSizeT ( size_t * pTarget, size_t delta );
@@ -135,7 +135,7 @@ EPICS_ATOMIC_INLINE size_t epicsAtomicAddSizeT ( size_t * pTarget, size_t delta
*
* \param pTarget pointer to target
* \param delta value to subtract from target
*
*
* \return New value of target
*/
EPICS_ATOMIC_INLINE size_t epicsAtomicSubSizeT ( size_t * pTarget, size_t delta );
@@ -149,7 +149,7 @@ EPICS_ATOMIC_INLINE size_t epicsAtomicSubSizeT ( size_t * pTarget, size_t delta
*
* \param pTarget pointer to target
* \param delta value to add to target
*
*
* \return New value of target
*/
EPICS_ATOMIC_INLINE int epicsAtomicAddIntT ( int * pTarget, int delta );
@@ -181,32 +181,32 @@ EPICS_ATOMIC_INLINE void epicsAtomicSetIntT ( int * pTarget, int newValue );
*/
EPICS_ATOMIC_INLINE void epicsAtomicSetPtrT ( EpicsAtomicPtrT * pTarget, EpicsAtomicPtrT newValue );
/** \brief atomically load and return size_t value
/** \brief atomically load and return size_t value
*
* fetch target into cache, return new value of target
*
* \param pTarget pointer to target
*
*
* \return value of target
*/
EPICS_ATOMIC_INLINE size_t epicsAtomicGetSizeT ( const size_t * pTarget );
/** \brief atomically load and return int value
/** \brief atomically load and return int value
*
* fetch target into cache, return new value of target
*
* \param pTarget pointer to target
*
*
* \return value of target
*/
EPICS_ATOMIC_INLINE int epicsAtomicGetIntT ( const int * pTarget );
/** \brief atomically load and return pointer value
/** \brief atomically load and return pointer value
*
* fetch target into cache, return new value of target
*
* \param pTarget pointer to target
*
*
* \return value of target
*/
EPICS_ATOMIC_INLINE EpicsAtomicPtrT epicsAtomicGetPtrT ( const EpicsAtomicPtrT * pTarget );
@@ -286,7 +286,7 @@ namespace atomic {
/** \brief C++ API for atomic size_t increment
*
* C++ API for atomic size_t increment.
* C++ API for atomic size_t increment.
*
* \param v variable to increment
*
@@ -469,7 +469,7 @@ EPICS_ATOMIC_INLINE EpicsAtomicPtrT get ( const EpicsAtomicPtrT & v )
/** \brief C++ API for atomic size_t compare-and-swap
*
* C++ API for atomic size_t compare-and-swap. Atomic operation that compares \p v with \p oldVal
* C++ API for atomic size_t compare-and-swap. Atomic operation that compares \p v with \p oldVal
* and if \p v == \v oldVal, sets \p v to \v newVal
*
* \param v variable to compare and swap
@@ -486,7 +486,7 @@ EPICS_ATOMIC_INLINE size_t compareAndSwap ( size_t & v,
/** \brief C++ API for atomic int compare-and-swap
*
* C++ API for atomic size_t compare-and-swap. Atomic operation that compares \p v with \p oldVal
* C++ API for atomic size_t compare-and-swap. Atomic operation that compares \p v with \p oldVal
* and if \p v == \v oldVal, sets \p v to \v newVal
*
* \param v variable to compare and swap
@@ -502,7 +502,7 @@ EPICS_ATOMIC_INLINE int compareAndSwap ( int & v, int oldVal, int newVal )
/** \brief C++ API for atomic pointer compare-and-swap
*
* C++ API for atomic size_t compare-and-swap. Atomic operation that compares \p v with \p oldVal
* C++ API for atomic size_t compare-and-swap. Atomic operation that compares \p v with \p oldVal
* and if \p v == \v oldVal, sets \p v to \v newVal
*
* \param v variable to compare and swap
+9 -9
View File
@@ -12,7 +12,7 @@
*
* \brief OS independent interface for creating spin locks
*
* OS independent interface for creating spin locks. Implemented using the
* OS independent interface for creating spin locks. Implemented using the
* OS-specific spinlock interface if available. Otherwise uses epicsMutexLock.
*/
#ifndef epicsSpinh
@@ -32,20 +32,20 @@ typedef struct epicsSpin *epicsSpinId;
*
* Creates a spin lock
*
* \return Handle to spinlock or NULL if failed
* \return Handle to spinlock or NULL if failed
* to create the lock
*/
LIBCOM_API epicsSpinId epicsSpinCreate(void);
/** \brief Creates a spin lock
*
* Creates a spin lock. Calls cantProceed() if unable
* Creates a spin lock. Calls cantProceed() if unable
* to create lock
*/
LIBCOM_API epicsSpinId epicsSpinMustCreate(void);
/** \brief Destroys spin lock
*
*
* Destroys the spin lock
*
* \param lockId identifies the spinlock
@@ -53,20 +53,20 @@ LIBCOM_API epicsSpinId epicsSpinMustCreate(void);
LIBCOM_API void epicsSpinDestroy(epicsSpinId lockId);
/** \brief Acquires the spin lock
*
* Acquires the lock. Blocks if lock is unavailable
*
* Acquires the lock. Blocks if lock is unavailable
*
* \param lockId identifies the spinlock
*/
LIBCOM_API void epicsSpinLock(epicsSpinId lockId);
/** \brief Tries to acquire the spin lock
/** \brief Tries to acquire the spin lock
*
* Tries to acquire the lock. If failed, return immediately
* with non-zero error code.
*
* \param lockId identifies the spinlock
*
*
* \return 0 if lock was acquired. 1 if failed because acquired by another thread.
* Otherwise returns non-zero OS specific return code if failed for any other reason
*/
@@ -75,7 +75,7 @@ LIBCOM_API int epicsSpinTryLock(epicsSpinId lockId);
/** \brief Releases spin lock
*
* Releases spin lock
*
*
* \param lockId identifies the spinlock
*/
LIBCOM_API void epicsSpinUnlock(epicsSpinId lockId);
+3 -3
View File
@@ -44,13 +44,13 @@ LIBCOM_API void epicsStackTrace(void);
/** Bit mask to check if stack trace is able to lookup local symbols */
#define EPICS_STACKTRACE_LCL_SYMBOLS (1<<3)
/** \brief Get supported stacktrace features
/** \brief Get supported stacktrace features
*
* Returns an ORed bitset of supported features. Use the EPICS_STACKTRACE_ masks to
* Returns an ORed bitset of supported features. Use the EPICS_STACKTRACE_ masks to
* check if a feature is supported.
*
* \return 0 if getting the stack trace is unsupported. Otherwise
* returns an ORed bitset of supported features.
* returns an ORed bitset of supported features.
*/
LIBCOM_API int epicsStackTraceGetFeatures(void);
@@ -1,6 +1,6 @@
#ifdef RTEMS_LEGACY_STACK
#include "os/RTEMS-score/devLibVMEOSD.c"
#else
#pragma message "\n VME Support requires the RTEMS Legacy stack\n"
#pragma message "\n VME Support requires the RTEMS Legacy stack\n"
#include "os/default/devLibVMEOSD.c"
#endif
@@ -62,12 +62,12 @@ LIBCOM_API void epicsStdCall epicsMessageQueueDestroy(
{
int rv;
rv = mq_close(id->id);
if( rv ) {
if( rv ) {
fprintf(stderr, "epicsMessageQueueDestroy mq_close failed: %s\n",
strerror(rv));
}
rv = mq_unlink(id->name);
if( rv ) {
if( rv ) {
fprintf(stderr,"epicsMessageQueueDestroy mq_unlink %s failed: %s\n",
id->name, strerror(rv));
}
@@ -5,7 +5,7 @@
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/*
* Author W. Eric Norum
@@ -5,7 +5,7 @@
* Operator of Los Alamos National Laboratory.
* EPICS BASE Versions 3.13.7
* and higher are distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#include <rtems.h>
#include <rtems/malloc.h>
@@ -39,7 +39,7 @@ int select(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, str
#ifndef IPPORT_USERRESERVED
#define IPPORT_USERRESERVED 5000
#endif
#endif
typedef int SOCKET;
#define INVALID_SOCKET (-1)
@@ -104,7 +104,7 @@ int epicsThreadGetOssPriorityValue(unsigned int osiPriority)
/*
* epicsThreadLowestPriorityLevelAbove ()
*/
LIBCOM_API epicsThreadBooleanStatus epicsThreadLowestPriorityLevelAbove
LIBCOM_API epicsThreadBooleanStatus epicsThreadLowestPriorityLevelAbove
(unsigned int priority, unsigned *pPriorityJustAbove)
{
unsigned newPriority = priority + 1;
@@ -120,7 +120,7 @@ LIBCOM_API epicsThreadBooleanStatus epicsThreadLowestPriorityLevelAbove
/*
* epicsThreadHighestPriorityLevelBelow ()
*/
LIBCOM_API epicsThreadBooleanStatus epicsThreadHighestPriorityLevelBelow
LIBCOM_API epicsThreadBooleanStatus epicsThreadHighestPriorityLevelBelow
(unsigned int priority, unsigned *pPriorityJustBelow)
{
unsigned newPriority = priority - 1;
+6 -6
View File
@@ -55,7 +55,7 @@ LIBCOM_API epicsEventId epicsEventCreate (
/*
* epicsEventDestroy ()
*/
LIBCOM_API void epicsEventDestroy ( epicsEventId pSem )
LIBCOM_API void epicsEventDestroy ( epicsEventId pSem )
{
CloseHandle ( pSem->handle );
free ( pSem );
@@ -64,7 +64,7 @@ LIBCOM_API void epicsEventDestroy ( epicsEventId pSem )
/*
* epicsEventTrigger ()
*/
LIBCOM_API epicsEventStatus epicsEventTrigger ( epicsEventId pSem )
LIBCOM_API epicsEventStatus epicsEventTrigger ( epicsEventId pSem )
{
BOOL status;
status = SetEvent ( pSem->handle );
@@ -74,7 +74,7 @@ LIBCOM_API epicsEventStatus epicsEventTrigger ( epicsEventId pSem )
/*
* epicsEventWait ()
*/
LIBCOM_API epicsEventStatus epicsEventWait ( epicsEventId pSem )
LIBCOM_API epicsEventStatus epicsEventWait ( epicsEventId pSem )
{
DWORD status;
status = WaitForSingleObject (pSem->handle, INFINITE);
@@ -106,7 +106,7 @@ LIBCOM_API epicsEventStatus epicsEventWaitWithTimeout (
}
else if ( timeout >= INFINITE / mSecPerSec ) {
/* we need to apply a maximum wait time to stop an overflow. We choose (INFINITE - 1) milliseconds,
to be compatible with previous WaitForSingleObject() implementation */
to be compatible with previous WaitForSingleObject() implementation */
nIvals = (LONGLONG)(INFINITE - 1) * (ivalPerSec / mSecPerSec);
tmo.QuadPart = -nIvals; /* negative value means a relative time offset for timer */
}
@@ -143,7 +143,7 @@ LIBCOM_API epicsEventStatus epicsEventWaitWithTimeout (
/*
* epicsEventTryWait ()
*/
LIBCOM_API epicsEventStatus epicsEventTryWait ( epicsEventId pSem )
LIBCOM_API epicsEventStatus epicsEventTryWait ( epicsEventId pSem )
{
DWORD status;
@@ -162,6 +162,6 @@ LIBCOM_API epicsEventStatus epicsEventTryWait ( epicsEventId pSem )
/*
* epicsEventShow ()
*/
LIBCOM_API void epicsEventShow ( epicsEventId id, unsigned level )
LIBCOM_API void epicsEventShow ( epicsEventId id, unsigned level )
{
}
+1 -1
View File
@@ -47,7 +47,7 @@ LIBCOM_API osiGetUserNameReturn epicsStdCall osiGetUserName (char *pBuf, unsigne
return osiGetUserNameSuccess;
}
LIBCOM_API osiSpawnDetachedProcessReturn epicsStdCall osiSpawnDetachedProcess
LIBCOM_API osiSpawnDetachedProcessReturn epicsStdCall osiSpawnDetachedProcess
( const char *pProcessName, const char *pBaseExecutableName )
{
BOOL silent = pProcessName && pProcessName[0]=='!';
+3 -3
View File
@@ -113,7 +113,7 @@ LIBCOM_API void epicsStdCall osiSockRelease()
}
}
LIBCOM_API SOCKET epicsStdCall epicsSocketCreate (
LIBCOM_API SOCKET epicsStdCall epicsSocketCreate (
int domain, int type, int protocol )
{
return socket ( domain, type, protocol );
@@ -140,7 +140,7 @@ LIBCOM_API void epicsStdCall epicsSocketDestroy ( SOCKET s )
/*
* ipAddrToHostName
*/
LIBCOM_API unsigned epicsStdCall ipAddrToHostName
LIBCOM_API unsigned epicsStdCall ipAddrToHostName
(const struct in_addr *pAddr, char *pBuf, unsigned bufSize)
{
struct hostent *ent;
@@ -161,7 +161,7 @@ LIBCOM_API unsigned epicsStdCall ipAddrToHostName
/*
* hostToIPAddr ()
*/
LIBCOM_API int epicsStdCall hostToIPAddr
LIBCOM_API int epicsStdCall hostToIPAddr
(const char *pHostName, struct in_addr *pIPA)
{
struct hostent *phe;
+14 -14
View File
@@ -39,7 +39,7 @@
/* Windows Vista and higher supports fibre functions, but the
* prototypes only appear in the windows SDK 8 and above.
* VS2010 supplies sdk 7, but can be upgraded to later SDK
* VS2010 supplies sdk 7, but can be upgraded to later SDK
* To accommodate this we supply prototypes on, for XP
* fall back to Tls*() which will build and run
@@ -407,7 +407,7 @@ static unsigned epicsThreadGetOsiPriorityValue ( int osdPriority )
/*
* epicsThreadLowestPriorityLevelAbove ()
*/
LIBCOM_API epicsThreadBooleanStatus epicsStdCall epicsThreadLowestPriorityLevelAbove
LIBCOM_API epicsThreadBooleanStatus epicsStdCall epicsThreadLowestPriorityLevelAbove
( unsigned int priority, unsigned * pPriorityJustAbove )
{
const DWORD priorityClass = GetPriorityClass ( GetCurrentProcess () );
@@ -437,7 +437,7 @@ LIBCOM_API epicsThreadBooleanStatus epicsStdCall epicsThreadLowestPriorityLevelA
/*
* epicsThreadHighestPriorityLevelBelow ()
*/
LIBCOM_API epicsThreadBooleanStatus epicsStdCall epicsThreadHighestPriorityLevelBelow
LIBCOM_API epicsThreadBooleanStatus epicsStdCall epicsThreadHighestPriorityLevelBelow
( unsigned int priority, unsigned * pPriorityJustBelow )
{
const DWORD priorityClass = GetPriorityClass ( GetCurrentProcess () );
@@ -467,7 +467,7 @@ LIBCOM_API epicsThreadBooleanStatus epicsStdCall epicsThreadHighestPriorityLevel
/*
* epicsThreadGetStackSize ()
*/
LIBCOM_API unsigned int epicsStdCall
LIBCOM_API unsigned int epicsStdCall
epicsThreadGetStackSize ( epicsThreadStackSizeClass stackSizeClass )
{
#define STACK_SIZE(f) (f * 0x10000 * sizeof(void *))
@@ -778,7 +778,7 @@ LIBCOM_API void epicsStdCall epicsThreadResume ( epicsThreadId id )
/*
* epicsThreadGetPriority ()
*/
LIBCOM_API unsigned epicsStdCall epicsThreadGetPriority (epicsThreadId id)
LIBCOM_API unsigned epicsStdCall epicsThreadGetPriority (epicsThreadId id)
{
win32ThreadParam * pParm = ( win32ThreadParam * ) id;
return pParm->epicsPriority;
@@ -787,8 +787,8 @@ LIBCOM_API unsigned epicsStdCall epicsThreadGetPriority (epicsThreadId id)
/*
* epicsThreadGetPrioritySelf ()
*/
LIBCOM_API unsigned epicsStdCall epicsThreadGetPrioritySelf ()
{
LIBCOM_API unsigned epicsStdCall epicsThreadGetPrioritySelf ()
{
win32ThreadParam * pParm = getMyWin32ThreadParam ( NULL );
if ( pParm ) {
@@ -805,7 +805,7 @@ LIBCOM_API unsigned epicsStdCall epicsThreadGetPrioritySelf ()
/*
* epicsThreadSetPriority ()
*/
LIBCOM_API void epicsStdCall epicsThreadSetPriority ( epicsThreadId id, unsigned priority )
LIBCOM_API void epicsStdCall epicsThreadSetPriority ( epicsThreadId id, unsigned priority )
{
win32ThreadParam * pParm = ( win32ThreadParam * ) id;
BOOL stat = SetThreadPriority ( pParm->handle, epicsThreadGetOsdPriorityValue (priority) );
@@ -815,7 +815,7 @@ LIBCOM_API void epicsStdCall epicsThreadSetPriority ( epicsThreadId id, unsigned
/*
* epicsThreadIsEqual ()
*/
LIBCOM_API int epicsStdCall epicsThreadIsEqual ( epicsThreadId id1, epicsThreadId id2 )
LIBCOM_API int epicsStdCall epicsThreadIsEqual ( epicsThreadId id1, epicsThreadId id2 )
{
win32ThreadParam * pParm1 = ( win32ThreadParam * ) id1;
win32ThreadParam * pParm2 = ( win32ThreadParam * ) id2;
@@ -825,7 +825,7 @@ LIBCOM_API int epicsStdCall epicsThreadIsEqual ( epicsThreadId id1, epicsThreadI
/*
* epicsThreadIsSuspended ()
*/
LIBCOM_API int epicsStdCall epicsThreadIsSuspended ( epicsThreadId id )
LIBCOM_API int epicsStdCall epicsThreadIsSuspended ( epicsThreadId id )
{
win32ThreadParam *pParm = ( win32ThreadParam * ) id;
DWORD exitCode;
@@ -874,9 +874,9 @@ LIBCOM_API void epicsStdCall epicsThreadSleep ( double seconds )
if ( seconds <= 0.0 ) {
tmo.QuadPart = 0u;
}
else if ( seconds >= INFINITE / mSecPerSec ) {
else if ( seconds >= INFINITE / mSecPerSec ) {
/* we need to apply a maximum wait time to stop an overflow. We choose (INFINITE - 1) milliseconds,
to be compatible with previous WaitForSingleObject() implementation */
to be compatible with previous WaitForSingleObject() implementation */
nIvals = (LONGLONG)(INFINITE - 1) * (ivalPerSec / mSecPerSec);
tmo.QuadPart = -nIvals; /* negative value means a relative time offset for timer */
}
@@ -935,7 +935,7 @@ double epicsStdCall epicsThreadSleepQuantum ()
/*
* epicsThreadGetIdSelf ()
*/
LIBCOM_API epicsThreadId epicsStdCall epicsThreadGetIdSelf (void)
LIBCOM_API epicsThreadId epicsStdCall epicsThreadGetIdSelf (void)
{
win32ThreadParam * pParm = getMyWin32ThreadParam ( NULL );
assert ( pParm ); /* Don't return a NULL thread id */
@@ -988,7 +988,7 @@ LIBCOM_API const char * epicsStdCall epicsThreadGetNameSelf (void)
/*
* epicsThreadGetName ()
*/
LIBCOM_API void epicsStdCall epicsThreadGetName (
LIBCOM_API void epicsStdCall epicsThreadGetName (
epicsThreadId id, char * pName, size_t size )
{
win32ThreadParam * pParm = ( win32ThreadParam * ) id;
@@ -60,7 +60,7 @@ static void setThreadNameVS( DWORD dwThreadID, LPCSTR szThreadName )
#if _MSC_VER >= 1300 && defined ( _DEBUG )
// This was copied directly from an MSDN example
// It sets the thread name by throwing a special exception that is caught by Visual Sudio
// It requires the debugger to be already attached to the process
// It requires the debugger to be already attached to the process
// when the exception is thrown for the name to be registered
static const DWORD MS_VC_EXCEPTION = 0x406D1388;
#pragma pack(push,8)
@@ -16,7 +16,7 @@ extern "C" {
/*
* epicsStrtod() for systems with broken strtod() routine
*/
LIBCOM_API double epicsStrtod(const char *str, char **endp);
LIBCOM_API double epicsStrtod(const char *str, char **endp);
#ifdef __cplusplus
}
@@ -19,7 +19,7 @@
#include "osiSock.h"
#include "errlog.h"
LIBCOM_API void epicsStdCall
LIBCOM_API void epicsStdCall
epicsSocketEnableAddressReuseDuringTimeWaitState ( SOCKET s )
{
#ifdef _WIN32
+1 -1
View File
@@ -59,7 +59,7 @@ LIBCOM_API osiGetUserNameReturn epicsStdCall osiGetUserName (char *pBuf, unsigne
}
}
LIBCOM_API osiSpawnDetachedProcessReturn epicsStdCall osiSpawnDetachedProcess
LIBCOM_API osiSpawnDetachedProcessReturn epicsStdCall osiSpawnDetachedProcess
(const char *pProcessName, const char *pBaseExecutableName)
{
int status;
@@ -53,5 +53,5 @@ LIBCOM_API void epicsStdCall epicsSignalInstallSigPipeIgnore (void)
/* Disabled */
LIBCOM_API void epicsStdCall epicsSignalInstallSigAlarmIgnore ( void ) {}
LIBCOM_API void epicsStdCall epicsSignalRaiseSigAlarm
LIBCOM_API void epicsStdCall epicsSignalRaiseSigAlarm
( struct epicsThreadOSD * /* threadId */ ) {}
+3 -3
View File
@@ -87,7 +87,7 @@ void osiSockRelease()
* the socket will be closed if the user uses exec()
* as is the case with third party tools such as TCL/TK
*/
LIBCOM_API SOCKET epicsStdCall epicsSocketCreate (
LIBCOM_API SOCKET epicsStdCall epicsSocketCreate (
int domain, int type, int protocol )
{
static unsigned char warnAttached;
@@ -177,7 +177,7 @@ LIBCOM_API void epicsStdCall epicsSocketDestroy ( SOCKET s )
* On many systems, gethostbyaddr must be protected by a
* mutex since the routine is not thread-safe.
*/
LIBCOM_API unsigned epicsStdCall ipAddrToHostName
LIBCOM_API unsigned epicsStdCall ipAddrToHostName
(const struct in_addr *pAddr, char *pBuf, unsigned bufSize)
{
struct hostent *ent;
@@ -203,7 +203,7 @@ LIBCOM_API unsigned epicsStdCall ipAddrToHostName
* On many systems, gethostbyname must be protected by a
* mutex since the routine is not thread-safe.
*/
LIBCOM_API int epicsStdCall hostToIPAddr
LIBCOM_API int epicsStdCall hostToIPAddr
(const char *pHostName, struct in_addr *pIPA)
{
struct hostent *phe;
+1 -1
View File
@@ -31,7 +31,7 @@
#endif
#if USE_MEMLOCK
#include <sys/mman.h>
#include <sys/mman.h>
#endif
/* epicsStdio uses epicsThreadOnce(), require explicit use to avoid unexpected recursion */
@@ -16,7 +16,7 @@ extern "C" {
/*
* epicsStrtod() for systems with broken strtod() routine
*/
LIBCOM_API double epicsStrtod(const char *str, char **endp);
LIBCOM_API double epicsStrtod(const char *str, char **endp);
#ifdef __cplusplus
}
+2 -2
View File
@@ -34,7 +34,7 @@ void osiSockRelease()
{
}
LIBCOM_API SOCKET epicsStdCall epicsSocketCreate (
LIBCOM_API SOCKET epicsStdCall epicsSocketCreate (
int domain, int type, int protocol )
{
SOCKET sock = socket ( domain, type, protocol );
@@ -70,7 +70,7 @@ LIBCOM_API void epicsStdCall epicsSocketDestroy ( SOCKET s )
/*
* ipAddrToHostName
*/
LIBCOM_API unsigned epicsStdCall ipAddrToHostName
LIBCOM_API unsigned epicsStdCall ipAddrToHostName
(const struct in_addr *pAddr, char *pBuf, unsigned bufSize)
{
int status;
+4 -4
View File
@@ -38,11 +38,11 @@ typedef enum osiGetUserNameReturn {
* and copy the name into the provided buffer
*
* \param pBuf buffer where user name is copied into
* \param bufSize size of input buffer.
* \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);
/** Return code for osiSpawnDetachedProcess() */
@@ -55,13 +55,13 @@ typedef enum 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
LIBCOM_API osiSpawnDetachedProcessReturn epicsStdCall osiSpawnDetachedProcess
(const char *pProcessName, const char *pBaseExecutableName);
#ifdef __cplusplus
+5 -5
View File
@@ -31,7 +31,7 @@
* sockAddrAreIdentical()
* (returns true if addresses are identical)
*/
int epicsStdCall sockAddrAreIdentical
int epicsStdCall sockAddrAreIdentical
( const osiSockAddr *plhs, const osiSockAddr *prhs )
{
int match;
@@ -58,7 +58,7 @@ int epicsStdCall sockAddrAreIdentical
* sockAddrToA()
* (convert socket address to ASCII host name)
*/
unsigned epicsStdCall sockAddrToA (
unsigned epicsStdCall sockAddrToA (
const struct sockaddr * paddr, char * pBuf, unsigned bufSize )
{
if ( bufSize < 1 ) {
@@ -89,7 +89,7 @@ unsigned epicsStdCall sockAddrToA (
* ipAddrToA()
* (convert IP address to ASCII host name)
*/
unsigned epicsStdCall ipAddrToA (
unsigned epicsStdCall ipAddrToA (
const struct sockaddr_in * paddr, char * pBuf, unsigned bufSize )
{
unsigned len = ipAddrToHostName (
@@ -115,7 +115,7 @@ unsigned epicsStdCall ipAddrToA (
/*
* sockAddrToDottedIP ()
*/
unsigned epicsStdCall sockAddrToDottedIP (
unsigned epicsStdCall sockAddrToDottedIP (
const struct sockaddr * paddr, char * pBuf, unsigned bufSize )
{
if ( paddr->sa_family != AF_INET ) {
@@ -141,7 +141,7 @@ unsigned epicsStdCall sockAddrToDottedIP (
/*
* ipAddrToDottedIP ()
*/
unsigned epicsStdCall ipAddrToDottedIP (
unsigned epicsStdCall ipAddrToDottedIP (
const struct sockaddr_in *paddr, char *pBuf, unsigned bufSize )
{
static const char * pErrStr = "<IPA>";
+9 -9
View File
@@ -44,7 +44,7 @@ struct in_addr;
* \param protocol Typically unused and set to 0.
* \return A file descriptor referring to the socket, or -1 on error.
*/
LIBCOM_API SOCKET epicsStdCall epicsSocketCreate (
LIBCOM_API SOCKET epicsStdCall epicsSocketCreate (
int domain, int type, int protocol );
/*!
@@ -70,7 +70,7 @@ LIBCOM_API SOCKET epicsStdCall epicsSocketAccept (
*
* Close and free resources held by a SOCKET object.
*/
LIBCOM_API void epicsStdCall epicsSocketDestroy (
LIBCOM_API void epicsStdCall epicsSocketDestroy (
SOCKET );
/*!
* \brief Allows a socket to bind ignoring other sockets in TIME_WAIT state.
@@ -88,7 +88,7 @@ LIBCOM_API void epicsStdCall epicsSocketDestroy (
*
* \param s The socket to ignore other TIME_WAIT sockets when binding
*/
LIBCOM_API void epicsStdCall
LIBCOM_API void epicsStdCall
epicsSocketEnableAddressReuseDuringTimeWaitState ( SOCKET s );
/*!
* \brief Allows multiple sockets to use the same family, local address, and local
@@ -106,7 +106,7 @@ LIBCOM_API void epicsStdCall
*
* \param s The socket to put in "Fanout" mode (aka REUSEPORT mode)
*/
LIBCOM_API void epicsStdCall
LIBCOM_API void epicsStdCall
epicsSocketEnableAddressUseForDatagramFanout ( SOCKET s );
/*!
@@ -138,7 +138,7 @@ enum epicsSocketSystemCallInterruptMechanismQueryInfo {
* \return enum representing whether to call close() or shutdown(RW) to
* interrupt blocking socket syscalls.
*/
LIBCOM_API enum epicsSocketSystemCallInterruptMechanismQueryInfo
LIBCOM_API enum epicsSocketSystemCallInterruptMechanismQueryInfo
epicsSocketSystemCallInterruptMechanismQuery ();
#ifdef EPICS_PRIVATE_API
@@ -206,7 +206,7 @@ LIBCOM_API unsigned epicsStdCall ipAddrToA (
* null termination, but always writes at least a null terminator in the string
* (if bufSize >= 1)
*/
LIBCOM_API unsigned epicsStdCall sockAddrToDottedIP (
LIBCOM_API unsigned epicsStdCall sockAddrToDottedIP (
const struct sockaddr * paddr, char * pBuf, unsigned bufSize );
/*!
@@ -222,7 +222,7 @@ LIBCOM_API unsigned epicsStdCall sockAddrToDottedIP (
* null termination, but always writes at least a null terminator in the string
* (if bufSize >= 1)
*/
LIBCOM_API unsigned epicsStdCall ipAddrToDottedIP (
LIBCOM_API unsigned epicsStdCall ipAddrToDottedIP (
const struct sockaddr_in * paddr, char * pBuf, unsigned bufSize );
/*!
@@ -266,7 +266,7 @@ LIBCOM_API int epicsStdCall aToIPAddr
* \param[out] pIPA Pointer to the in_addr structure where the hostname information will be stored
* \return 0 on success, negative on error.
*/
LIBCOM_API int epicsStdCall hostToIPAddr
LIBCOM_API int epicsStdCall hostToIPAddr
(const char *pHostName, struct in_addr *pIPA);
/*!
* \brief attach to BSD socket library
@@ -342,7 +342,7 @@ typedef struct osiSockAddrNode {
*
* \return true if addresses are identical, false otherwise.
*/
LIBCOM_API int epicsStdCall sockAddrAreIdentical
LIBCOM_API int epicsStdCall sockAddrAreIdentical
( const osiSockAddr * plhs, const osiSockAddr * prhs );
/*!
+6 -6
View File
@@ -109,7 +109,7 @@ void epicsTimerQueuePassiveForC::destroy ()
delete this;
}
LIBCOM_API epicsTimerNotify::expireStatus::expireStatus ( restart_t restart ) :
LIBCOM_API epicsTimerNotify::expireStatus::expireStatus ( restart_t restart ) :
delay ( - DBL_MAX )
{
if ( restart != noRestart ) {
@@ -118,7 +118,7 @@ LIBCOM_API epicsTimerNotify::expireStatus::expireStatus ( restart_t restart ) :
}
}
LIBCOM_API epicsTimerNotify::expireStatus::expireStatus
LIBCOM_API epicsTimerNotify::expireStatus::expireStatus
( restart_t restartIn, const double & expireDelaySec ) :
delay ( expireDelaySec )
{
@@ -163,13 +163,13 @@ extern "C" epicsTimerQueuePassiveId epicsStdCall
}
}
extern "C" void epicsStdCall
extern "C" void epicsStdCall
epicsTimerQueuePassiveDestroy ( epicsTimerQueuePassiveId pQueue )
{
pQueue->destroy ();
}
extern "C" double epicsStdCall
extern "C" double epicsStdCall
epicsTimerQueuePassiveProcess ( epicsTimerQueuePassiveId pQueue )
{
try {
@@ -191,7 +191,7 @@ extern "C" epicsTimerId epicsStdCall epicsTimerQueuePassiveCreateTimer (
}
}
extern "C" LIBCOM_API void epicsStdCall epicsTimerQueuePassiveDestroyTimer (
extern "C" LIBCOM_API void epicsStdCall epicsTimerQueuePassiveDestroyTimer (
epicsTimerQueuePassiveId /* pQueue */, epicsTimerId pTmr )
{
pTmr->destroy ();
@@ -240,7 +240,7 @@ extern "C" void epicsStdCall epicsTimerQueueShow (
pQueue->show ( level );
}
extern "C" void epicsStdCall epicsTimerQueueDestroyTimer (
extern "C" void epicsStdCall epicsTimerQueueDestroyTimer (
epicsTimerQueueId /* pQueue */, epicsTimerId pTmr )
{
pTmr->destroy ();
+14 -14
View File
@@ -137,14 +137,14 @@ typedef void ( *epicsTimerCallback ) ( void *pPrivate );
typedef struct epicsTimerQueueActiveForC * epicsTimerQueueId;
LIBCOM_API epicsTimerQueueId epicsStdCall
epicsTimerQueueAllocate ( int okToShare, unsigned int threadPriority );
LIBCOM_API void epicsStdCall
LIBCOM_API void epicsStdCall
epicsTimerQueueRelease ( epicsTimerQueueId );
LIBCOM_API epicsTimerId epicsStdCall
LIBCOM_API epicsTimerId epicsStdCall
epicsTimerQueueCreateTimer ( epicsTimerQueueId queueid,
epicsTimerCallback callback, void *arg );
LIBCOM_API void epicsStdCall
LIBCOM_API void epicsStdCall
epicsTimerQueueDestroyTimer ( epicsTimerQueueId queueid, epicsTimerId id );
LIBCOM_API void epicsStdCall
LIBCOM_API void epicsStdCall
epicsTimerQueueShow ( epicsTimerQueueId id, unsigned int level );
/* passive timer queue */
@@ -154,28 +154,28 @@ typedef double ( * epicsTimerQueueNotifyQuantum ) ( void * pPrivate );
LIBCOM_API epicsTimerQueuePassiveId epicsStdCall
epicsTimerQueuePassiveCreate ( epicsTimerQueueNotifyReschedule,
epicsTimerQueueNotifyQuantum, void *pPrivate );
LIBCOM_API void epicsStdCall
LIBCOM_API void epicsStdCall
epicsTimerQueuePassiveDestroy ( epicsTimerQueuePassiveId );
LIBCOM_API epicsTimerId epicsStdCall
LIBCOM_API epicsTimerId epicsStdCall
epicsTimerQueuePassiveCreateTimer (
epicsTimerQueuePassiveId queueid, epicsTimerCallback pCallback, void *pArg );
LIBCOM_API void epicsStdCall
LIBCOM_API void epicsStdCall
epicsTimerQueuePassiveDestroyTimer ( epicsTimerQueuePassiveId queueid, epicsTimerId id );
LIBCOM_API double epicsStdCall
LIBCOM_API double epicsStdCall
epicsTimerQueuePassiveProcess ( epicsTimerQueuePassiveId );
LIBCOM_API void epicsStdCall
LIBCOM_API void epicsStdCall
epicsTimerQueuePassiveShow ( epicsTimerQueuePassiveId id, unsigned int level );
/* timer */
LIBCOM_API void epicsStdCall
LIBCOM_API void epicsStdCall
epicsTimerStartTime ( epicsTimerId id, const epicsTimeStamp *pTime );
LIBCOM_API void epicsStdCall
LIBCOM_API void epicsStdCall
epicsTimerStartDelay ( epicsTimerId id, double delaySeconds );
LIBCOM_API void epicsStdCall
LIBCOM_API void epicsStdCall
epicsTimerCancel ( epicsTimerId id );
LIBCOM_API double epicsStdCall
LIBCOM_API double epicsStdCall
epicsTimerGetExpireDelay ( epicsTimerId id );
LIBCOM_API void epicsStdCall
LIBCOM_API void epicsStdCall
epicsTimerShow ( epicsTimerId id, unsigned int level );
#ifdef __cplusplus
+1 -1
View File
@@ -132,7 +132,7 @@ void timer::privateStart ( epicsTimerNotify & notify, const epicsTime & expire )
debugPrintf ( ("Start of \"%s\" with delay %f at %p preempting %u\n",
typeid ( this->pNotify ).name (),
expire - epicsTime::getCurrent (),
expire - epicsTime::getCurrent (),
this, preemptCount ) );
}