Re: [PATCH v3 05/24] liblockdep: Rename "trywlock" into "trywrlock"
From: Bart Van Assche
Date: Tue Dec 11 2018 - 12:38:36 EST
On Tue, 2018-12-11 at 12:19 -0500, Sasha Levin wrote:
+AD4 On Thu, Dec 06, 2018 at 05:11:29PM -0800, Bart Van Assche wrote:
+AD4 +AD4 This patch avoids that the following compiler warning is reported while
+AD4 +AD4 compiling the lockdep unit tests:
+AD4 +AD4
+AD4 +AD4 include/liblockdep/rwlock.h: In function 'liblockdep+AF8-pthread+AF8-rwlock+AF8-trywlock':
+AD4 +AD4 include/liblockdep/rwlock.h:66:9: warning: implicit declaration of function 'pthread+AF8-rwlock+AF8-trywlock'+ADs did you mean 'pthread+AF8-rwlock+AF8-trywrlock'? +AFs--Wimplicit-function-declaration+AF0
+AD4 +AD4 return pthread+AF8-rwlock+AF8-trywlock(+ACY-lock-+AD4-rwlock) +AD0APQ 0 ? 1 : 0+ADs
+AD4 +AD4 +AF4AfgB+AH4AfgB+AH4AfgB+AH4AfgB+AH4AfgB+AH4AfgB+AH4AfgB+AH4Afg
+AD4 +AD4 pthread+AF8-rwlock+AF8-trywrlock
+AD4
+AD4 Hm, I'm not sure why you're seeing that error (I'm not). We define
+AD4 pthread+AF8-rwlock+AF8-trywlock() in:
+AD4
+AD4 include/liblockdep/rwlock.h:static inline int liblockdep+AF8-pthread+AF8-rwlock+AF8-trywlock(liblockdep+AF8-pthread+AF8-rwlock+AF8-t +ACo-lock)
+AD4
+AD4 All the tests also seem to pass for me. Did you see failures on your
+AD4 end?
What I saw is that due to the typo that is fixed by this patch that linking
of the tests failed and that the error message that was reported because
starting the tests failed made the tests pass due to the following line in
run+AF8-tests.sh:
if +AFs +ACQ(timeout 1 ./lockdep ./tests/+ACQ-testname 2+AD4AJg-1 +AHw wc -l) -gt 0 +AF0AOw then
Bart.