-#if SLAPD_NEXTID_CHUNK > 1
- if ( li->li_nextid > li->li_nextid_wrote ) {
- li->li_nextid_wrote += SLAPD_NEXTID_CHUNK;
- (void) next_id_write( be, li->li_nextid_wrote );
- }
-#else
- (void) next_id_write( be, li->li_nextid );
-#endif
-
- ldap_pvt_thread_mutex_unlock( &li->li_nextid_mutex );
- return( id );
-}
-
-void
-next_id_return( Backend *be, ID id )
-{
-#ifdef SLAPD_NEXTID_RETURN
- struct ldbminfo *li = (struct ldbminfo *) be->be_private;
-
- ldap_pvt_thread_mutex_lock( &li->li_nextid_mutex );
-
- if ( id != li->li_nextid - 1 ) {
- ldap_pvt_thread_mutex_unlock( &li->li_nextid_mutex );
- return;
- }
-
- li->li_nextid--;
-
-#if !( SLAPD_NEXTID_CHUNK > 1 )
- (void) next_id_write( be, li->li_nextid );
-#endif
-
- ldap_pvt_thread_mutex_unlock( &li->li_nextid_mutex );
-#endif
-}
-
-ID
-next_id_get( Backend *be )
-{
- return next_id_get_save( be, 0 );