ldap_pvt_thread_mutex_unlock( &entry2str_mutex );
ldbm_cache_close( be, db );
- (void) cache_add_entry_lock( &li->li_cache, e, 0 );
Debug( LDAP_DEBUG_TRACE, "<= id2entry_add %d\n", rc, 0, 0 );
Debug(LDAP_DEBUG_TRACE, "=> id2entry_delete( %lu, \"%s\" )\n", e->e_id,
e->e_dn, 0 );
- /* XXX - check for writer lock - should also check no reader pending */
#ifdef LDAP_DEBUG
- assert(ldap_pvt_thread_rdwr_wchk(&e->e_rdwr));
+ /* check for writer lock */
+ assert(ldap_pvt_thread_rdwr_writers(&e->e_rdwr) == 1);
#endif
ldbm_datum_init( key );
- /* XXX - check for writer lock - should also check no reader pending */
- Debug (LDAP_DEBUG_TRACE,
- "rdwr_Xchk: readers_reading: %d writer_writing: %d\n",
- e->e_rdwr.lt_readers_reading, e->e_rdwr.lt_writer_writing, 0);
-
if ( (db = ldbm_cache_open( be, "id2entry", LDBM_SUFFIX, LDBM_WRCREAT ))
== NULL ) {
Debug( LDAP_DEBUG_ANY, "Could not open/create id2entry%s\n",
}
e->e_id = id;
- (void) cache_add_entry_lock( &li->li_cache, e, 0 );
+ (void) cache_add_entry( &li->li_cache, e, 0 );
Debug( LDAP_DEBUG_TRACE, "<= id2entry_%s( %ld ) (disk)\n",
rw ? "w" : "r", id, 0 );