Andrew Johnson 6cd22d4efe Don't call errlogPrintf() in epicsThreadGetOsiPriorityValue()
This is a partial fix of a WIN32-only problem Mark Rivers reported.
A WIN32 thread created by a manufacturer's library is used to call one
of his callback routines, which tries to use an epics facility that has
an epicsThreadOnce().  The new version of epicsThreadOnce() uses
epicsThreadGetIdSelf() to detect recursive initialization; the thread
doesn't have an epicsThreadId yet, so epicsThreadImplicitCreate() is
asked to make one.  It calls epicsThreadGetOsiPriorityValue(), but
osdPriority is 15 which is not known by that code, so it reports an
error by calling errlogPrintf().  That checks epicsThreadIsOkToBlock()
which calls epicsThreadOnce() but that needs our epicsThreadId...

This doesn't solve the issue of the unknown osdPriority value 15
(priorityClass = 32), but it allows the IOC to continue working with
just a warning message at init time.

It also points out that calling epicsThreadGetIdSelf() every time we
check an epicsThreadOnce() is probably not good for performance.
2010-05-14 16:49:32 -05:00
2006-12-19 16:50:54 +00:00
2007-03-29 18:45:51 +00:00

---------------------------------------------------------
EPICS Base - the central core of a control system toolkit
---------------------------------------------------------

Copyright (c) 1991-2003 The University of Chicago, as Operator
of Argonne National Laboratory.
Copyright (c) 1991-2003 The Regents of the University of
California, as Operator of Los Alamos National Laboratory.

EPICS Base Versions 3.13.7 and higher are distributed
subject to a Software License Agreement found in the
file LICENSE that is included with this distribution.

---------------------------------------------------------

Installation and release information can be found in the
various files in the documentation subdirectory.

Additional information about EPICS including mailing list
archives and subscription instructions, documentation and
training materials, additional components, links to other
websites etc. is available on the EPICS home page at
	http://www.aps.anl.gov/epics/

Languages
C++ 81.9%
C 8.6%
HTML 7.9%
Makefile 1.1%
DIGITAL Command Language 0.5%