lkml.org 
[lkml]   [1999]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: FD array expansion problem
    Date
    On Fri, 29 Oct 1999 09:07:15 +0200, 
    Ralf Baechle <ralf@uni-koblenz.de> wrote:
    >MIPS II instruction set and better and the Alpha don't have an xchg
    >equivalent but ll / sc instructions, which are more universal. Using
    >them to implement an xchg-like implementation however ends up as a
    >a loop of at least five instructions which we'de prefarably want to avoid.

    Same problem on i370. No atomic exchange, not even atomic inc, it all
    has to be done using compare and swap and loop until successful. Most
    of the time the update works first time and no loop is taken. IMHO, we
    have to accept this overhead to simulate xchg instructions on machines
    that do not have the instruction.

    i370 equivalent of "xchg word,newvalue".

    L R2,newvalue New value to register
    loop L R1,word Current value to register
    CS R1,R2,word Store new value if word is unchanged
    BNE loop It changed, retry with new current value


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:54    [W:0.019 / U:2.140 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site