Skip to content
Snippets Groups Projects
Commit 85acc526 authored by Philip Mueller's avatar Philip Mueller
Browse files

Updated some runtime function.

They called the classical panic function if the runtime was not initialized.
This is in itself not a problem, since the panic function itself is able to detect this and call the quietPanic function.
However it is not good practice, so I decided to change it.
parent 601c0c20
No related branches found
No related tags found
No related merge requests found
......@@ -483,7 +483,7 @@ cLibSibylRT_errorSetError(
{
/* check if the runtime is initialized */
if(cLibSibylRT_isInit() != 0)
{cLibSibylRT_panic("Wanted to set the error, without an initailized runtime.");};
{ cLibSibylRT_quietPanic(); };
/* aquiere the lock */
CSIBYL_RT_GET_LOCK(cLibSibylRT_errorLock_var);
......@@ -539,11 +539,18 @@ cLibSibylRT_syncRetValueSet(
volatile Int_t* const retVal,
const Int_t desValue)
{
/* Test if the runtime system is initialized.
* No message possible */
if(cLibSibylRT_isInit() != 0)
{ cLibSibylRT_quietPanic(); };
/* Test if arguments are valid */
if(retVal == NULL) /* No variable is given */
{return -1;};
if(desValue == 0) /* this makes it a no-ops */
{return 1;};
/* aquiere the lock */
CSIBYL_RT_GET_LOCK(cLibSibylRT_errorLock_var);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment