From 80151fdfcacf8c2d673bf79ac9276b30979de976 Mon Sep 17 00:00:00 2001 From: Steven Jenkins Date: Mon, 8 Feb 2010 14:38:49 -0600 Subject: [PATCH] tubik: Initialize mutexes and cvs Initialize some mutexes and condition variables for pthreaded ubik. FIXES 124977 Change-Id: I95833c5e277183e3c912e1b2fde2b02f88cff0c9 Reviewed-on: http://gerrit.openafs.org/1253 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/ubik/ubik.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ubik/ubik.c b/src/ubik/ubik.c index 4bcfe4920..4187ac0d7 100644 --- a/src/ubik/ubik.c +++ b/src/ubik/ubik.c @@ -431,6 +431,13 @@ ubik_ServerInitCommon(afs_int32 myHost, short myPort, *dbase = tdb; ubik_dbase = tdb; /* for now, only one db per server; can fix later when we have names for the other dbases */ +#ifdef AFS_PTHREAD_ENV + assert(pthread_cond_init(&tdb->version_cond, NULL) == 0); + assert(pthread_cond_init(&tdb->flags_cond, NULL) == 0); + assert(pthread_mutex_init(&tdb->version_mutex, NULL) == 0); + assert(pthread_mutex_init(&tdb->flags_mutex, NULL) == 0); +#endif /* AFS_PTHREAD_ENV */ + /* initialize RX */ /* the following call is idempotent so when/if it got called earlier, -- 2.39.5