From b6bfb6b0d352a12dd191643e06fa06630cc73a0c Mon Sep 17 00:00:00 2001 From: DizzyOfCRN Date: Fri, 18 Jan 2013 12:56:06 +0000 Subject: [PATCH] - Fix include path - Mailbox access should be surrounded by some sort of semaphore protection when multitasking, this goes the same for example accessing the DMA channels. git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@46334 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- arch/arm-raspi/boot/serialdebug.c | 2 +- arch/arm-raspi/vcmbox/vcmbox_init.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm-raspi/boot/serialdebug.c b/arch/arm-raspi/boot/serialdebug.c index e1c10738ad..fadd4f69e7 100644 --- a/arch/arm-raspi/boot/serialdebug.c +++ b/arch/arm-raspi/boot/serialdebug.c @@ -5,7 +5,7 @@ #include #include -#include +#include #include "serialdebug.h" #include "bootconsole.h" diff --git a/arch/arm-raspi/vcmbox/vcmbox_init.c b/arch/arm-raspi/vcmbox/vcmbox_init.c index aea9767c8d..68cb741daa 100644 --- a/arch/arm-raspi/vcmbox/vcmbox_init.c +++ b/arch/arm-raspi/vcmbox/vcmbox_init.c @@ -92,6 +92,7 @@ AROS_LH3(void, VCMBoxWrite, if ((((unsigned int)msg & VCMB_CHANMASK) == 0) && (chan <= VCMB_CHANS)) { + //ObtainSemaphore(); while ((VCMBoxStatus(mb) & VCMB_STATUS_WRITEREADY) != 0) { asm volatile ("mcr p15, #0, %[r], c7, c14, #0" : : [r] "r" (0) ); @@ -100,6 +101,7 @@ AROS_LH3(void, VCMBoxWrite, asm volatile ("mcr p15, #0, %[r], c7, c10, #5" : : [r] "r" (0) ); *((volatile unsigned int *)(mb + VCMB_WRITE)) = ((unsigned int)msg | chan); + //ReleaseSemaphore(); } AROS_LIBFUNC_EXIT -- 2.11.4.GIT