Re: memory barrier in user space



Josef Moellers <josef.moellers@xxxxxxxxxxxxxxxxxxx> writes:

mcharon@xxxxxxxxx wrote:
i have a user space driver that's accessing and initializing the
hardware.
in the kernel driver, i can call barrier() but in the user space,
how can i execute memory barrier?
i am running on MIPS and powerPC.
thank you in advance.

IIRC the barrier() macro just emitted a single instruction. You might
want to look at the gcc info and the stuff about asm() in particular.

On MIPS the instruction is SYNC, and on PowerPC it is EIEIO.

--
Måns Rullgård
mans@xxxxxxxxx
.



Relevant Pages