ldbm_datum_init( data );
pthread_mutex_lock( &db->dbc_mutex );
-#ifdef reentrant_database
+#ifdef REENTRANT_DATABASE
/* increment reader count */
db->dbc_readers++
pthread_mutex_unlock( &db->dbc_mutex );
data = ldbm_fetch( db->dbc_db, key );
-#ifdef reentrant_database
+#ifdef REENTRANT_DATABASE
pthread_mutex_lock( &db->dbc_mutex );
/* decrement reader count & signal any waiting writers */
if ( --db->dbc_readers == 0 ) {
int rc;
pthread_mutex_lock( &db->dbc_mutex );
-#ifdef reentrant_database
+#ifdef REENTRANT_DATABASE
/* wait for reader count to drop to zero */
while ( db->dbc_readers > 0 ) {
pthread_cond_wait( &db->dbc_cv, &db->dbc_mutex );
int rc;
pthread_mutex_lock( &db->dbc_mutex );
-#ifdef reentrant_database
+#ifdef REENTRANT_DATABASE
/* wait for reader count to drop to zero - then write */
while ( db->dbc_readers > 0 ) {
pthread_cond_wait( &db->dbc_cv, &db->dbc_mutex );
for ( i = 0; i < MAXDBCACHE; i++ ) {
pthread_mutex_init( &li->li_dbcache[i].dbc_mutex,
pthread_mutexattr_default );
+#ifdef reentrant_database
pthread_cond_init( &li->li_dbcache[i].dbc_cv,
pthread_condattr_default );
+#endif
}
#ifdef HAVE_BERKELEY_DB2
pthread_mutex_init( &dbEnvInit_mutex, pthread_mutexattr_default );