From e2cdff2034b25b858bb101365a984a27799ab99e Mon Sep 17 00:00:00 2001 From: Mark Vitale Date: Fri, 17 Mar 2023 16:03:11 -0400 Subject: [PATCH] SOLARIS: Change the condvar functions from K&R to ANSI Convert the afs_cv_wait() and afs_cv_timedwait() function declarations and definitions from K&R to ANSI style. Provide prototypes to eliminate the warnings, such as: warning: implicit function declaration: afs_cv_wait [mmeffie: convert afs_cv_timedwait() as well.] Change-Id: Ibf051838f4678cad67cfb6259d2997ddce9e8067 Reviewed-on: https://gerrit.openafs.org/15358 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Michael Meffie --- src/rx/SOLARIS/rx_kmutex.c | 21 ++++++--------------- src/rx/SOLARIS/rx_kmutex.h | 11 +++++++++++ 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/rx/SOLARIS/rx_kmutex.c b/src/rx/SOLARIS/rx_kmutex.c index c6dc80f58b..8dc0e64f0b 100644 --- a/src/rx/SOLARIS/rx_kmutex.c +++ b/src/rx/SOLARIS/rx_kmutex.c @@ -30,16 +30,12 @@ #ifdef RX_LOCKS_DB int -afs_cv_wait(cv, m, sigok, fileid, line) - int fileid; - int line; +afs_cv_wait(afs_kcondvar_t *cv, afs_kmutex_t *m, int sigok, + int fileid, int line) #else int -afs_cv_wait(cv, m, sigok) +afs_cv_wait(afs_kcondvar_t *cv, afs_kmutex_t *m, int sigok) #endif - afs_kcondvar_t *cv; - afs_kmutex_t *m; - int sigok; { int haveGlock = ISAFS_GLOCK(); int retval = 0; @@ -68,17 +64,12 @@ afs_cv_wait(cv, m, sigok) #ifdef RX_LOCKS_DB int -afs_cv_timedwait(cv, m, t, sigok, fileid, line) - int fileid; - int line; +afs_cv_timedwait(afs_kcondvar_t *cv, afs_kmutex_t *m, clock_t t, int sigok, + int fileid, int line) #else int -afs_cv_timedwait(cv, m, t, sigok) +afs_cv_timedwait(afs_kcondvar_t *cv, afs_kmutex_t *m, clock_t t, int sigok) #endif - afs_kcondvar_t *cv; - afs_kmutex_t *m; - clock_t t; - int sigok; { int haveGlock = ISAFS_GLOCK(); int retval = 0; diff --git a/src/rx/SOLARIS/rx_kmutex.h b/src/rx/SOLARIS/rx_kmutex.h index c57002595f..2275c2296b 100644 --- a/src/rx/SOLARIS/rx_kmutex.h +++ b/src/rx/SOLARIS/rx_kmutex.h @@ -35,6 +35,17 @@ typedef kcondvar_t afs_kcondvar_t; #define CV_SIGNAL(a) cv_signal(a) #define CV_BROADCAST(a) cv_broadcast(a) +#ifdef RX_LOCKS_DB +extern int afs_cv_wait(afs_kcondvar_t *cv, afs_kmutex_t *m, int sigok, + int fileid, int line); +extern int afs_cv_timedwait(afs_kcondvar_t *cv, afs_kmutex_t *m, clock_t t, + int sigok, int fileid, int line); +#else +extern int afs_cv_wait(afs_kcondvar_t *cv, afs_kmutex_t *m, int sigok); +extern int afs_cv_timedwait(afs_kcondvar_t *cv, afs_kmutex_t *m, clock_t t, + int sigok); +#endif + #ifdef RX_LOCKS_DB #define MUTEX_ENTER(a) \