• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/OpenLDAP-499.27/OpenLDAP/servers/slapd/

Lines Matching +defs:diff +defs:id

1095 slapd_add( ber_socket_t s, int isactive, Listener *sl, int id )
1097 if (id < 0)
1098 id = DAEMON_ID(s);
1099 ldap_pvt_thread_mutex_lock( &slap_daemon[id].sd_mutex );
1101 assert( SLAP_SOCK_NOT_ACTIVE(id, s) );
1103 if ( isactive ) slap_daemon[id].sd_nactives++;
1105 SLAP_SOCK_ADD(id, s, sl);
1110 ldap_pvt_thread_mutex_unlock( &slap_daemon[id].sd_mutex );
1112 WAKE_LISTENER(id,1);
1128 int id = DAEMON_ID(s);
1131 ldap_pvt_thread_mutex_lock( &slap_daemon[id].sd_mutex );
1133 assert( SLAP_SOCK_IS_ACTIVE( id, s ));
1135 if ( wasactive ) slap_daemon[id].sd_nactives--;
1137 waswriter = SLAP_SOCK_IS_WRITE(id, s);
1138 wasreader = SLAP_SOCK_IS_READ(id, s);
1145 if ( waswriter ) slap_daemon[id].sd_nwriters--;
1147 SLAP_SOCK_DEL(id, s);
1166 if ( DAEMON_ID(lr->sl_sd) != id )
1176 ldap_pvt_thread_mutex_unlock( &slap_daemon[id].sd_mutex );
1177 WAKE_LISTENER(id, wake || slapd_gentle_shutdown == 2);
1183 int id = DAEMON_ID(s);
1184 ldap_pvt_thread_mutex_lock( &slap_daemon[id].sd_mutex );
1186 if ( SLAP_SOCK_IS_WRITE( id, s )) {
1187 assert( SLAP_SOCK_IS_ACTIVE( id, s ));
1189 SLAP_SOCK_CLR_WRITE( id, s );
1190 slap_daemon[id].sd_nwriters--;
1193 ldap_pvt_thread_mutex_unlock( &slap_daemon[id].sd_mutex );
1194 WAKE_LISTENER(id,wake);
1200 int id = DAEMON_ID(s);
1201 ldap_pvt_thread_mutex_lock( &slap_daemon[id].sd_mutex );
1203 assert( SLAP_SOCK_IS_ACTIVE( id, s ));
1205 if ( !SLAP_SOCK_IS_WRITE( id, s )) {
1206 SLAP_SOCK_SET_WRITE( id, s );
1207 slap_daemon[id].sd_nwriters++;
1210 if (id)
1214 if (id)
1218 ldap_pvt_thread_mutex_unlock( &slap_daemon[id].sd_mutex );
1219 WAKE_LISTENER(id,wake);
1226 int id = DAEMON_ID(s);
1227 ldap_pvt_thread_mutex_lock( &slap_daemon[id].sd_mutex );
1229 if ( SLAP_SOCK_IS_ACTIVE( id, s )) {
1230 SLAP_SOCK_CLR_READ( id, s );
1233 ldap_pvt_thread_mutex_unlock( &slap_daemon[id].sd_mutex );
1235 WAKE_LISTENER(id,wake);
1243 int id = DAEMON_ID(s);
1244 ldap_pvt_thread_mutex_lock( &slap_daemon[id].sd_mutex );
1246 if( SLAP_SOCK_IS_ACTIVE( id, s ) && !SLAP_SOCK_IS_READ( id, s )) {
1247 SLAP_SOCK_SET_READ( id, s );
1251 ldap_pvt_thread_mutex_unlock( &slap_daemon[id].sd_mutex );
1253 WAKE_LISTENER(id,wake);
2761 /* NOTE: diff __should__ always be >= 0,
2765 double diff = difftime( cat.tv_sec, now );
2766 if ( diff <= 0 ) {
2767 diff = tdelta;
2769 if ( tvp == NULL || diff < tv.tv_sec ) {
2770 tv.tv_sec = diff;