memory barrier in user space - Linux

This is a discussion on memory barrier in user space - Linux ; 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 ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: memory barrier in user space

  1. memory barrier in user space

    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.

  2. Re: memory barrier in user space

    mcharon@gmail.com 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.

    --
    These are my personal views and not those of Fujitsu Siemens Computers!
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize (T. Pratchett)
    Company Details: http://www.fujitsu-siemens.com/imprint.html

  3. Re: memory barrier in user space

    Josef Moellers writes:

    > mcharon@gmail.com 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@mansr.com

+ Reply to Thread