Exemple #1
0
OFDPE
finalize_port_manager() {
  bool ret = lock_mutex( &mutex );
  if ( !ret ) {
    return ERROR_LOCK;
  }

  delete_timer_event_safe( update_switch_port_status_and_stats, NULL );

  finalize_switch_port();

  config.max_send_queue_length = 0;
  config.max_recv_queue_length = 0;

  ret = unlock_mutex( &mutex );
  if ( !ret ) {
    return ERROR_UNLOCK;
  }

  ret = finalize_mutex( &mutex );
  if ( !ret ) {
    return ERROR_FINALIZE_MUTEX;
  }

  return OFDPE_SUCCESS;
}
Exemple #2
0
static void
free_mutex(Mutex *mutex)
{
    assert_no_survivors(&mutex->waiting, "mutex", mutex);
    finalize_mutex(mutex);
    xfree(mutex);
}
Exemple #3
0
static void
free_mutex(Mutex *mutex)
{
    kill_waiting_threads(&mutex->waiting);
    finalize_mutex(mutex);
    xfree(mutex);
}
Exemple #4
0
static void
finalize_queue(Queue *queue)
{
    finalize_mutex(&queue->mutex);
    finalize_condvar(&queue->value_available);
    finalize_condvar(&queue->space_available);
    finalize_list(&queue->values);
}