add: RELEASE_TEAM_DEBUG_INFO_LOCK(team->debug_info);
context: user_debug_thread_deleted(team_id teamID, thread_id threadID){	// get the team debug flags and debugger port	cpu_status state = disable_interrupts();	GRAB_TEAM_LOCK();	struct team *team = team_get_team_struct_locked(teamID);	int32 teamDebugFlags = 0;	port_id debuggerPort = -1;	if (team) {		teamDebugFlags = atomic_get(&team->debug_info.flags);		debuggerPort = team->debug_info.debugger_port;	}	RELEASE_TEAM_LOCK();	restore_interrupts(state);	// check, if a debugger is installed and is interested in thread events	if (~teamDebugFlags		& (B_TEAM_DEBUG_DEBUGGER_INSTALLED | B_TEAM_DEBUG_THREADS)) {		return;	}	// notify the debugger	if (debuggerPort >= 0) {		debug_thread_deleted message;		message.origin.thread = threadID;		message.origin.team = teamID;		message.origin.nub_port = -1;		write_port_etc(debuggerPort, B_DEBUGGER_MESSAGE_THREAD_DELETED,			&message, sizeof(message), B_RELATIVE_TIMEOUT, 0);			// TODO: Would it be OK to wait here?	}}