Replace epicsThreadOptsDefaults() with EPICS_THREAD_OPTS_INIT

The epicsThreadCreate() routines now interpose calls to
epicsThreadGetStackSize() if an enum value is passed.
This commit is contained in:
Andrew Johnson
2019-07-02 17:27:27 -05:00
parent 4b77d5e1c9
commit fbf62189cb
10 changed files with 95 additions and 86 deletions

View File

@@ -35,7 +35,7 @@ epicsThreadId epicsShareAPI epicsThreadCreate (
const char * name, unsigned int priority, unsigned int stackSize,
EPICSTHREADFUNC funptr,void * parm )
{
epicsThreadOpts opts;
epicsThreadOpts opts = EPICS_THREAD_OPTS_INIT;
opts.priority = priority;
opts.stackSize = stackSize;
opts.joinable = 0;
@@ -202,11 +202,10 @@ epicsThread::epicsThread (
epicsThreadRunable & runableIn, const char * pName,
unsigned stackSize, unsigned priority ) :
runable ( runableIn ), id ( 0 ), pThreadDestroyed ( 0 ),
begin ( false ), cancel ( false ), terminated ( false )
, joined(false)
begin ( false ), cancel ( false ), terminated ( false ),
joined ( false )
{
epicsThreadOpts opts;
epicsThreadOptsDefaults(&opts);
epicsThreadOpts opts = EPICS_THREAD_OPTS_INIT;
opts.stackSize = stackSize;
opts.priority = priority;
opts.joinable = 1;