 |
PK_SESSION_is_in_kernel |
|
PK_ERROR_code_t PK_SESSION_is_in_kernel
(
--- returned arguments ---
PK_LOGICAL_t *const is_in_kernel, --- whether called from within the kernel
PK_LOGICAL_t *const is_protected --- whether called from protected region
)
This function returns whether it has been called from within the kernel or
from outside the kernel.
NOTE: This function is deprecated and has been superseded by
PK_SESSION_is_in_kernel_2.
This function may be called at any time. Being only inside this function does
not constitute being inside the kernel. The argument 'is_protected' returns
whether kernel code being executed, if any, may change the model.
The action required for error recovery is indicated in the following table:
'is_in_kernel' 'is_protected'
-------------- --------------
PK_LOGICAL_false PK_LOGICAL_false execution is not within Parasolid.
No action required.
PK_LOGICAL_true PK_LOGICAL_false execution is within a lightweight PK
function, or an unprotected part of
a heavyweight PK function.
PK_SESSION_tidy should be called.
PK_LOGICAL_true PK_LOGICAL_true execution is within the protected part
of a heavyweight PK function or within
a KI function. Both PK_SESSION_tidy
and PK_SESSION_abort should be called.
Rollback must be used to regain a valid
model state.
PK_LOGICAL_false PK_LOGICAL_true Protection mechanism is corrupt or the
kernel interface has been by-passed.
PK_SESSION_abort may recover from this
condition.