Does dispatch_repressed == dispatch_disabled || isr_disabled ? Is there a real difference between repressed and disabled?
On Fri, Jul 26, 2013 at 8:48 AM, Sebastian Huber <sebastian.hu...@embedded-brains.de> wrote: > --- > cpukit/score/Makefile.am | 1 + > cpukit/score/include/rtems/score/assert.h | 12 ++++++++ > .../score/src/assertthreaddispatchingrepressed.c | 28 > ++++++++++++++++++++ > 3 files changed, 41 insertions(+), 0 deletions(-) > create mode 100644 cpukit/score/src/assertthreaddispatchingrepressed.c > > diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am > index b623732..67d4b5e 100644 > --- a/cpukit/score/Makefile.am > +++ b/cpukit/score/Makefile.am > @@ -316,6 +316,7 @@ libscore_a_SOURCES += src/apiext.c src/chain.c > src/chainappend.c \ > src/chainextract.c src/chainget.c src/chaininsert.c \ > src/chainappendempty.c src/chainprependempty.c src/chaingetempty.c \ > src/chainnodecount.c \ > + src/assertthreaddispatchingrepressed.c \ > src/interr.c src/isr.c src/wkspace.c src/wkstringduplicate.c > > EXTRA_DIST = src/Unlimited.txt > diff --git a/cpukit/score/include/rtems/score/assert.h > b/cpukit/score/include/rtems/score/assert.h > index 205515d..174676e 100644 > --- a/cpukit/score/include/rtems/score/assert.h > +++ b/cpukit/score/include/rtems/score/assert.h > @@ -38,6 +38,18 @@ extern "C" { > #define _Assert( _e ) ( ( void ) 0 ) > #endif > > +/** > + * @brief Asserts that thread dispatching is repressed. > + * > + * Thread dispatching can be repressed via _Thread_Disable_dispatch() or > + * _ISR_Disable(). > + */ > +#if defined( RTEMS_DEBUG ) > + void _Assert_Thread_dispatching_repressed( void ); > +#else > + #define _Assert_Thread_dispatching_repressed() ( ( void ) 0 ) > +#endif > + > #ifdef __cplusplus > } > #endif /* __cplusplus */ > diff --git a/cpukit/score/src/assertthreaddispatchingrepressed.c > b/cpukit/score/src/assertthreaddispatchingrepressed.c > new file mode 100644 > index 0000000..44907f6 > --- /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 > + * <rt...@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 > -- > 1.7.7 > > _______________________________________________ > rtems-devel mailing list > rtems-devel@rtems.org > http://www.rtems.org/mailman/listinfo/rtems-devel _______________________________________________ rtems-devel mailing list rtems-devel@rtems.org http://www.rtems.org/mailman/listinfo/rtems-devel