 |
PK_DEBUG_try_error_handler_o_t |
|
struct PK_DEBUG_try_error_handler_o_s
{
int o_t_version; --- version number
--- of options structure
PK_LOGICAL_t use_protected; --- Call from protected code
--- (PK_LOGICAL_true)
PK_DEBUG_try_smp_t smp; --- SMP style
--- (PK_DEBUG_try_smp_no_c)
PK_LOGICAL_t call_from_one; --- Call from just one SMP
--- thread (PK_LOGICAL_true)
PK_LOGICAL_t use_locks; --- With SMP lock(s) on
--- (PK_LOGICAL_false)
};
typedef struct PK_DEBUG_try_error_handler_o_s PK_DEBUG_try_error_handler_o_t;
This option structure contains the optional controls for
PK_DEBUG_try_error_handler.
Used in:
PK_DEBUG_try_error_handler
Description of fields:
'use_protected' If this is PK_LOGICAL_true, the call will be made from
"protected" code. See the Signal Handling
chapter of the Functional Description for the differences
between protected and unprotected code. If the call is made
from unprotected code and no application error handler has
been registered via PK_ERROR_register_callbacks, then
Parasolid will return PK_ERROR_unhandleable_condition.
'smp' The kind of SMP to use. If this is PK_DEBUG_try_smp_no_c,
the function passed to PK_DEBUG_try_error_handler is
called from the same thread as the application used to call
PK_DEBUG_try_error_handler. If SMP has been enabled with
PK_SESSION_set_smp and this value is PK_DEBUG_try_smp_A_c
or PK_DEBUG_try_smp_B_c, the function passed to
PK_DEBUG_try_error_handler is called from one or more (see
'call_from_one') of the threads used by that SMP method.
The timing of the calls is influenced by the 'use_locks'
value, described below.
'call_from_one' This value is only considered if the 'smp' argument is
not PK_DEBUG_try_smp_no_c. If that is the case, and
'call_from_one' is PK_LOGICAL_true, then the call will
be made from only one of the SMP worker threads, randomly
selected. If 'call_from_one' is PK_LOGICAL_false,
then the call will be made from all of the SMP worker
threads, with timing controlled by the 'use_locks' value,
described below. The former case is more representative
of "typical" run-time error situations; the latter is
a stricter test of the error handler.
'use_locks' This value is only considered if the 'smp' argument is
not PK_DEBUG_try_smp_no_c. If that is the case, and
'use_locks' is PK_LOGICAL_true, then the SMP worker
threads will acquire one of Parasolid's internal SMP
locks before they call the function passed to
PK_DEBUG_try_error_handler. Since only one thread at
a time can hold a lock, the threads will call the
function one at a time: once the function has been
called, there will not be a subsequent call to it
until the function has returned, called PK_SESSION_abort,
or generated a run-time error, any of which will cause
the lock to be released. If 'use_locks' is
PK_LOGICAL_false, the worker threads will call the
function approximately simultaneously, with no
coordination between them.
Generated on: Fri, 04 Oct 2024 12:18:03 GMT