On 07/12/17 12:42, Joel Sherrill wrote:
Other than fixing those tests for smp, is it bad to just say the interrupt disable part of task mode isn't supported in smp?

Here the RTEMS_PREEMPT_MASK and RTEMS_INTERRUPT_MASK are not treated equally:

  if ( rtems_configuration_is_smp_enabled() ) {
    if ( mask & RTEMS_PREEMPT_MASK ) {
      if ( !_Modes_Is_preempt( mode_set ) ) {
        return RTEMS_NOT_IMPLEMENTED;
      }
    }

    if ( mask & RTEMS_INTERRUPT_MASK ) {
      return RTEMS_NOT_IMPLEMENTED;
    }
  }

rtems_task_mode(RTEMS_PREEMPT_MASK, RTEMS_PREEMPT, ...) is ok, but
rtems_task_mode(RTEMS_INTERRUPT_MASK, RTEMS_INTERRUPT_LEVEL(0), ...) is not ok?

The rtems_task_mode() looks pretty broken now. There should be no:

#if !defined( RTEMS_SMP )

A rtems_configuration_is_smp_enabled() inside a #if !defined( RTEMS_SMP) block makes no sense.

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to