/* preemptively destroy all local local endpoint rather than waiting for them to be destroyed  */
void __exit rxrpc_destroy_all_locals(void)
/* preemptively destroy all local local endpoint rather than waiting for them to be destroyed  */
void __exit rxrpc_destroy_all_locals(void)
{
	DECLARE_WAITQUEUE(myself,current);
	_enter("");
	if (!list_empty(&rxrpc_locals)) {
		set_current_state(TASK_UNINTERRUPTIBLE);
		add_wait_queue(&rxrpc_local_wq, &myself);
		while (!list_empty(&rxrpc_locals)) {
			schedule();
			set_current_state(TASK_UNINTERRUPTIBLE);
		}
		remove_wait_queue(&rxrpc_local_wq, &myself);
		set_current_state(TASK_RUNNING);
	}
	_leave("");
}