Skip to content

Commit

Permalink
Use runtime abort-on-violation on the manual functions
Browse files Browse the repository at this point in the history
  • Loading branch information
falkTX committed May 12, 2016
1 parent 64b2be1 commit 448247a
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions manual.c
Expand Up @@ -32,9 +32,8 @@ void * calloc(size_t nmemb, size_t size)
if (in_rt)
{
printf("calloc() is called while in rt section\n");
#if ABORT_ON_VIOLATION
abort();
#endif
if (abort_on_violation)
abort();
}
if(!callocp)
{
Expand All @@ -61,10 +60,9 @@ int pthread_cond_timedwait(pthread_cond_t * cond, pthread_mutex_t * mutex, const

if (in_rt)
{
printf("pthread_cond_timedwait() is called while in rt section\n");
#if ABORT_ON_VIOLATION
abort();
#endif
printf("pthread_cond_timedwait() is called while in rt section\n");
if (abort_on_violation)
abort();
}

if(!func)
Expand All @@ -86,10 +84,9 @@ int pthread_cond_wait(pthread_cond_t * cond, pthread_mutex_t * mutex)

if (in_rt)
{
printf("pthread_cond_wait() is called while in rt section\n");
#if ABORT_ON_VIOLATION
abort();
#endif
printf("pthread_cond_wait() is called while in rt section\n");
if (abort_on_violation)
abort();
}

if(!func)
Expand Down

0 comments on commit 448247a

Please sign in to comment.