BUILD/IMPORT: fix compilation with PLOCK_DISABLE_EBO=1
Compilation is broken due to missing __pl_wait_unlock_long() definition when building with PLOCK_DISABLE_EBO=1. This has been introduced since the following commit which activates the inlining version of pl_wait_unlock_long() : commit 071d689a514dac522ac3654f53bc22214b5716d0 MINOR: threads: inline the wait function for pthread_rwlock emulation Add an extra check on PLOCK_DISABLE_EBO before choosing the inline or default version of pl_wait_unlock_long() to fix this.
This commit is contained in:
parent
544c2f2d9e
commit
cd97ba147c
@ -1318,7 +1318,7 @@ static inline void pl_lorw_rdlock(unsigned long *lock)
|
||||
* lock to be empty of visitors.
|
||||
*/
|
||||
if (lk & PLOCK_LORW_WRQ_MASK)
|
||||
#if defined(PLOCK_LORW_INLINE_WAIT)
|
||||
#if defined(PLOCK_LORW_INLINE_WAIT) && !defined(PLOCK_DISABLE_EBO)
|
||||
lk = __pl_wait_unlock_long(lock, PLOCK_LORW_WRQ_MASK);
|
||||
#else
|
||||
lk = pl_wait_unlock_long(lock, PLOCK_LORW_WRQ_MASK);
|
||||
@ -1329,7 +1329,7 @@ static inline void pl_lorw_rdlock(unsigned long *lock)
|
||||
|
||||
/* wait for end of exclusive access if any */
|
||||
if (lk & PLOCK_LORW_EXC_MASK)
|
||||
#if defined(PLOCK_LORW_INLINE_WAIT)
|
||||
#if defined(PLOCK_LORW_INLINE_WAIT) && !defined(PLOCK_DISABLE_EBO)
|
||||
lk = __pl_wait_unlock_long(lock, PLOCK_LORW_EXC_MASK);
|
||||
#else
|
||||
lk = pl_wait_unlock_long(lock, PLOCK_LORW_EXC_MASK);
|
||||
@ -1349,7 +1349,7 @@ static inline void pl_lorw_wrlock(unsigned long *lock)
|
||||
*/
|
||||
lk = pl_deref_long(lock);
|
||||
if (__builtin_expect(lk & PLOCK_LORW_WRQ_MASK, 1))
|
||||
#if defined(PLOCK_LORW_INLINE_WAIT)
|
||||
#if defined(PLOCK_LORW_INLINE_WAIT) && !defined(PLOCK_DISABLE_EBO)
|
||||
lk = __pl_wait_unlock_long(lock, PLOCK_LORW_WRQ_MASK);
|
||||
#else
|
||||
lk = pl_wait_unlock_long(lock, PLOCK_LORW_WRQ_MASK);
|
||||
@ -1366,7 +1366,7 @@ static inline void pl_lorw_wrlock(unsigned long *lock)
|
||||
/* note below, an OR is significantly cheaper than BTS or XADD */
|
||||
if (!(lk & PLOCK_LORW_WRQ_MASK))
|
||||
pl_or_noret(lock, PLOCK_LORW_WRQ_BASE);
|
||||
#if defined(PLOCK_LORW_INLINE_WAIT)
|
||||
#if defined(PLOCK_LORW_INLINE_WAIT) && !defined(PLOCK_DISABLE_EBO)
|
||||
lk = __pl_wait_unlock_long(lock, PLOCK_LORW_SHR_MASK);
|
||||
#else
|
||||
lk = pl_wait_unlock_long(lock, PLOCK_LORW_SHR_MASK);
|
||||
@ -1375,7 +1375,7 @@ static inline void pl_lorw_wrlock(unsigned long *lock)
|
||||
|
||||
/* And also wait for a previous writer to finish. */
|
||||
if (lk & PLOCK_LORW_EXC_MASK)
|
||||
#if defined(PLOCK_LORW_INLINE_WAIT)
|
||||
#if defined(PLOCK_LORW_INLINE_WAIT) && !defined(PLOCK_DISABLE_EBO)
|
||||
lk = __pl_wait_unlock_long(lock, PLOCK_LORW_EXC_MASK);
|
||||
#else
|
||||
lk = pl_wait_unlock_long(lock, PLOCK_LORW_EXC_MASK);
|
||||
|
Loading…
x
Reference in New Issue
Block a user