mirror of
https://github.com/drasko/codezero.git
synced 2026-04-22 11:49:05 +02:00
2 posix containers tested with changes. Inline assemblers fixed.
Inline assembler for irq disabling had no output variables defined.
This commit is contained in:
@@ -9,13 +9,14 @@
|
|||||||
*/
|
*/
|
||||||
static inline char l4_atomic_dest_readb(void *location)
|
static inline char l4_atomic_dest_readb(void *location)
|
||||||
{
|
{
|
||||||
unsigned char zero = 0;
|
unsigned char zero = 0; /* Input */
|
||||||
unsigned char val;
|
unsigned char val; /* Output */
|
||||||
char *loc = location;
|
char *loc = location; /* Both input and output */
|
||||||
|
|
||||||
__asm__ __volatile__ (
|
__asm__ __volatile__ (
|
||||||
"swpb %1, %2, [%0] \n"
|
"swpb %1, %3, [%0] \n"
|
||||||
:: "r" (*loc), "r" (val), "r" (zero)
|
: "=r" (*loc), "=r" (val)
|
||||||
|
: "r" (*loc), "r" (zero)
|
||||||
);
|
);
|
||||||
|
|
||||||
return val;
|
return val;
|
||||||
|
|||||||
@@ -49,7 +49,8 @@ static inline void irq_local_disable_save(unsigned long *state)
|
|||||||
"mrs %0, cpsr_fc\n"
|
"mrs %0, cpsr_fc\n"
|
||||||
"orr %1, %0, #0x80\n"
|
"orr %1, %0, #0x80\n"
|
||||||
"msr cpsr_fc, %1\n"
|
"msr cpsr_fc, %1\n"
|
||||||
:: "r" (*state), "r" (temp)
|
: "=r" (*state)
|
||||||
|
: "r" (*state),"r" (temp)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/* Simply change it back to original state supplied in @flags. This might enable
|
/* Simply change it back to original state supplied in @flags. This might enable
|
||||||
|
|||||||
Reference in New Issue
Block a user