From 5324e009c644c0adb0d215ebd8e0293d8cf0c37d Mon Sep 17 00:00:00 2001 From: William Lupton Date: Tue, 29 Feb 2000 20:41:49 +0000 Subject: [PATCH] used new threadOnce() routine --- src/libCom/error/errlog.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/libCom/error/errlog.c b/src/libCom/error/errlog.c index ad61e36b1..e453e6d77 100644 --- a/src/libCom/error/errlog.c +++ b/src/libCom/error/errlog.c @@ -295,13 +295,13 @@ epicsShareFunc void epicsShareAPIV errPrintf(long status, const char *pFileName, msgbufSetSize(totalChar); } -epicsShareFunc int epicsShareAPI errlogInit(int bufsize) -{ - static int errlogInitFlag=0; - void *pbuffer;; +typedef struct {int bufsize;} errlogInitArg; + +static void errlogInitPvt(void *arg) +{ + int bufsize = ((errlogInitArg *)arg)->bufsize; + void *pbuffer; - if(errlogInitFlag) return(0); - errlogInitFlag = 1; if(bufsize