lkml.org 
[lkml]   [2020]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v1 4/5] seqlock: seqcount_LOCKTYPE_t: Introduce PREEMPT_RT support
    On Fri, Aug 28, 2020 at 03:07:09AM +0200, Ahmed S. Darwish wrote:
    > +#define __SEQ_RT IS_ENABLED(CONFIG_PREEMPT_RT)
    > +
    > +SEQCOUNT_LOCKTYPE(raw_spinlock, raw_spinlock_t, false, s->lock, raw_spin, raw_spin_lock(s->lock))
    > +SEQCOUNT_LOCKTYPE(spinlock, spinlock_t, __SEQ_RT, s->lock, spin, spin_lock(s->lock))
    > +SEQCOUNT_LOCKTYPE(rwlock, rwlock_t, __SEQ_RT, s->lock, read, read_lock(s->lock))
    > +SEQCOUNT_LOCKTYPE(mutex, struct mutex, true, s->lock, mutex, mutex_lock(s->lock))
    > +SEQCOUNT_LOCKTYPE(ww_mutex, struct ww_mutex, true, &s->lock->base, ww_mutex, ww_mutex_lock(s->lock, NULL))

    Ooh, reading is hard, but ^^^^ you already have that.

    > +/*
    > + * Automatically disable preemption for seqcount_LOCKTYPE_t writers, if the
    > + * associated lock does not implicitly disable preemption.
    > + *
    > + * Don't do it for PREEMPT_RT. Check __SEQ_LOCK().
    > + */
    > +#define __seq_enforce_preemption_protection(s) \
    > + (!IS_ENABLED(CONFIG_PREEMPT_RT) && __seqcount_lock_preemptible(s))

    Then what is this doing ?!? I'm confused now.

    \
     
     \ /
      Last update: 2020-08-28 11:00    [W:5.210 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site