-#ifdef SLAP_LIGHTWEIGHT_LISTENER
-/*
- * Temporarily suspend submitting events on the descriptor to the pool.
- * Reading on the descriptor will be resumed by a connection procseeing thread
- * when data (LDAP requests) on it are read.
- * slapd_suspend() returns 1 when it is suspended otherwise returns 0
- */
-int slapd_suspend(ber_socket_t s) {
- int rc = 0;
-
- ldap_pvt_thread_mutex_lock( &slap_daemon.sd_mutex );
-
- if ( !SLAP_SOCK_IS_SUSPEND( s ) && SLAP_SOCK_IS_ACTIVE( s ) &&
- SLAP_SOCK_IS_READ( s ) )
- {
- SLAP_SOCK_SET_SUSPEND( s );
- SLAP_SOCK_CLR_READ( s );
- rc = 1;
- }
-
- ldap_pvt_thread_mutex_unlock( &slap_daemon.sd_mutex );
- return rc;
-}
-
-void slapd_resume ( ber_socket_t s ) {
- ldap_pvt_thread_mutex_lock( &slap_daemon.sd_mutex );
-
- SLAP_SOCK_SET_READ( s );
-
- assert( SLAP_SOCK_IS_SUSPEND( s ) );
-
- SLAP_SOCK_CLR_SUSPEND ( s );
-
- ldap_pvt_thread_mutex_unlock( &slap_daemon.sd_mutex );
-
- WAKE_LISTENER(1);
-}
-#endif
-