/* INTERFACE: Finit at unload time return address of internal queue or zero if queue was external  */
void* diva_maint_finit(void)
/* INTERFACE: Finit at unload time return address of internal queue or zero if queue was external  */
void* diva_maint_finit(void)
{
    diva_os_destroy_spin_lock(&dbg_q_lock, "dbg_finit");
    diva_os_destroy_spin_lock(&dbg_adapter_lock, "dbg_finit");
  }
  if (external_dbg_queue) {
    ret = NULL;
  }
  external_dbg_queue = 0;
  for (i = 1; i < ARRAY_SIZE(clients); i++) {
    if (clients[i].pmem) {
      diva_os_free (0, clients[i].pmem);
    }
  }
  return (ret);
}