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 <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
This commit is contained in:
Mark Vitale 2023-03-17 16:03:11 -04:00 committed by Michael Meffie
parent 97591f59c6
commit e2cdff2034
2 changed files with 17 additions and 15 deletions

View File

@ -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;

View File

@ -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) \