lkml.org 
[lkml]   [2005]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] i386 spinlocks should use the full 32 bits, not only 8 bits
    Ingo Molnar <mingo@elte.hu> wrote:
    >
    > +/*
    > + * We inline the unlock functions in the nondebug case:
    > + */
    > +#if defined(CONFIG_DEBUG_SPINLOCK) || defined(CONFIG_PREEMPT)
    > +# define spin_unlock(lock) _spin_unlock(lock)
    > +# define read_unlock(lock) _read_unlock(lock)
    > +# define write_unlock(lock) _write_unlock(lock)
    > +#else
    > +# define spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock)
    > +# define read_unlock(lock) __raw_read_unlock(&(lock)->raw_lock)
    > +# define write_unlock(lock) __raw_write_unlock(&(lock)->raw_lock)
    > +#endif
    >

    spin_lock is still uninlined.

    static inline __attribute__((always_inline)) struct dentry *dget_parent(struct dentry *dentry)
    {
    struct dentry *ret;

    _spin_lock(&dentry->d_lock);
    ret = dget(dentry->d_parent);
    __raw_spin_unlock(&(&dentry->d_lock)->raw_lock);
    return ret;
    }

    as is spin_lock_irqsave() and spin_lock_irq()

    uninlining spin_lock will probably increase overall text size, but mainly in
    the out-of-line section.

    <looks>

    we removed the out-of-line section :(


    read_lock is out-of-line. read_unlock is inlined

    write_lock is out-of-line. write_unlock is out-of-line.


    Needs work ;)
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-10-21 00:52    [W:2.173 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site