Hello Pavel,

On 18.03.23 01:04, Pavel Pisa wrote:
As for

+static inline void
+tms570_data_sync_barier(void)
+{
+#ifdef __arm__
+  _ARM_Data_synchronization_barrier();
+#endif
+}

it is OK but may it be not ideal, because more drivers could require
write buffers and instructions memory access order synchronization.
We have added that definition to ports/os/rtems/arch/sys_arch.h

#ifndef __rtems__
static inline sys_prot_t
sys_arch_protect(void)
{
   sys_prot_t pval;

   rtems_interrupt_disable(pval);
   return pval;
}

static inline void
sys_arch_unprotect(sys_prot_t pval)
{
   rtems_interrupt_enable(pval);
}

static inline void
sys_arch_data_sync_barier(void){
   _ARM_Data_synchronization_barrier();
}
#else

as the generic solution when to allow same drivers to be used
with different architectures. There can be more drivers requiring
such protection.

ok, I will keep the sys_arch_data_sync_barier(). What I don't understand is why this stuff is under #ifndef __rtems__ (NOT defined __rtems__).

--
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.hu...@embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to