diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-06-18 14:57:19 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-30 09:53:23 +0200 |
commit | 4088377398a4e003a01a786f556d14a3a5f2294d (patch) | |
tree | 27f7fb446723a02af7e4d974798474b94f53801b /cpukit/score/src/assertthreaddispatchingrepressed.c | |
parent | score: New header file <rtems/score/assert.h> (diff) | |
download | rtems-4088377398a4e003a01a786f556d14a3a5f2294d.tar.bz2 |
score: Add _Assert_Thread_dispatching_repressed()
Diffstat (limited to 'cpukit/score/src/assertthreaddispatchingrepressed.c')
-rw-r--r-- | cpukit/score/src/assertthreaddispatchingrepressed.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/cpukit/score/src/assertthreaddispatchingrepressed.c b/cpukit/score/src/assertthreaddispatchingrepressed.c new file mode 100644 index 0000000000..44907f63cc --- /dev/null +++ b/cpukit/score/src/assertthreaddispatchingrepressed.c @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2013 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Dornierstr. 4 + * 82178 Puchheim + * Germany + * <rtems@embedded-brains.de> + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + */ + +#if HAVE_CONFIG_H + #include "config.h" +#endif + +#include <rtems/score/assert.h> +#include <rtems/score/isr.h> +#include <rtems/score/threaddispatch.h> + +#if defined( RTEMS_DEBUG ) + void _Assert_Thread_dispatching_repressed( void ) + { + _Assert( !_Thread_Dispatch_is_enabled() || _ISR_Get_level() != 0 ); + } +#endif |