/* XXX check for writer lock - should also check no readers pending */
#ifdef LDAP_DEBUG
- assert(!ldap_pvt_thread_rdwr_active( &e->e_rdwr ));
+ assert(ldap_pvt_thread_rdwr_writers( &e->e_rdwr ) == 1);
#endif
/* delete from cache and lru q */
Debug( LDAP_DEBUG_TRACE, "====> cache_delete_entry:\n", 0, 0, 0 );
+ /* set cache mutex */
+ ldap_pvt_thread_mutex_lock( &cache->c_mutex );
+
/* XXX check for writer lock - should also check no readers pending */
#ifdef LDAP_DEBUG
- assert(ldap_pvt_thread_rdwr_writers(&e->e_rdwr));
+ assert(ldap_pvt_thread_rdwr_writers( &e->e_rdwr ) == 1);
#endif
- /* set cache mutex */
- ldap_pvt_thread_mutex_lock( &cache->c_mutex );
-
rc = cache_delete_entry_internal( cache, e );
/* free cache mutex */