[compiler-rt] r318654 - Correct return types of NetBSD specific functions

Kamil Rytarowski via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 20 07:39:31 PST 2017


Author: kamil
Date: Mon Nov 20 07:39:30 2017
New Revision: 318654

URL: http://llvm.org/viewvc/llvm-project?rev=318654&view=rev
Log:
Correct return types of NetBSD specific functions

The __libc_mutex_lock, __libc_mutex_unlock and __libc_thr_setcancelstate
functions return int, not void.

This does not seem to introduce a functional change, however it looks
better with fixed the function prototype.

Sponsored by <The NetBSD Foundation>

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc?rev=318654&r1=318653&r2=318654&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc Mon Nov 20 07:39:30 2017
@@ -3829,11 +3829,11 @@ INTERCEPTOR(int, pthread_mutex_unlock, v
 #endif
 
 #if SANITIZER_NETBSD
-INTERCEPTOR(void, __libc_mutex_lock, void *m) \
+INTERCEPTOR(int, __libc_mutex_lock, void *m) \
   ALIAS(WRAPPER_NAME(pthread_mutex_lock));
-INTERCEPTOR(void, __libc_mutex_unlock, void *m) \
+INTERCEPTOR(int, __libc_mutex_unlock, void *m) \
   ALIAS(WRAPPER_NAME(pthread_mutex_unlock));
-INTERCEPTOR(void, __libc_thr_setcancelstate, int state, int *oldstate) \
+INTERCEPTOR(int, __libc_thr_setcancelstate, int state, int *oldstate) \
   ALIAS(WRAPPER_NAME(pthread_setcancelstate));
 #endif
 




More information about the llvm-commits mailing list