thread pool: epicsThreadPoolGetShared accepts NULL as defaults

This commit is contained in:
Michael Davidsaver
2014-07-24 14:44:28 -04:00
parent fd2edfe94c
commit fc4119094f

View File

@@ -323,10 +323,13 @@ epicsShareFunc epicsThreadPool* epicsThreadPoolGetShared(epicsThreadPoolConfig *
{
ELLNODE *node;
epicsThreadPool *cur;
epicsThreadPoolConfig defopts;
size_t N=epicsThreadGetCPUs();
if(!opts)
return NULL;
if(!opts) {
epicsThreadPoolConfigDefaults(&defopts);
opts = &defopts;
}
/* shared pools must have a minimum allowed number of workers.
* Use the number of CPU cores
*/