lkml.org 
[lkml]   [2009]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    Subjectalpha: half done futex implementation
    From
    Hi,

    Going on Richard's advice, I've tried to write an alpha futex
    implementation based on the powerpc futex.h.

    I've gotten this far.. :\

    #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \
    __asm__ __volatile( \
    "1: ldl_l %0,%2\n" \
    insn \
    /* something needs to happen here
    * to save result of insn across
    * stl_c? */
    " stl_c %1,%2\n" \
    " beq %1,2f\n" \
    " mb\n" \
    /* something needs to happen here
    * for the ret */
    " .subsection 2\n" \
    "2: br 1b\n" \
    " .previous\n" \
    : "=&r" (oldval), "=&r" (ret) \
    : "b" (uaddr) \
    : "memory")

    Could someone take a look and help finish it?

    For futex_atomic_cmpxchg_inatomic, I think Ivan's DRM_CAS
    implementation can be used with only trivial changes. See
    http://cgit.freedesktop.org/mesa/drm/commit/?id=6feac49398d0f037103a4ae3d5a512badeed61fb

    Please CC me on responses, as I'm not subscribed to linux-kernel@.

    Thanks,

    Matt Turner


    \
     
     \ /
      Last update: 2009-04-12 02:59    [W:0.023 / U:118.936 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site