add: user_debug_team_created(team->id);
context: load_image_etc(int32 argCount, char **args, int32 envCount, char **env, int32 priority){	struct process_group *group;	struct team *team, *parent;	const char *threadName;	thread_id thread;	int err;	cpu_status state;	struct team_arg *teamArgs;	if (args == NULL || argCount == 0)		return B_BAD_VALUE;	TRACE(("load_image_etc: name '%s', args = %p, argCount = %ld\n",		args[0], args, argCount));	team = create_team_struct(args[0], false);	if (team == NULL)		return B_NO_MEMORY;	parent = thread_get_current_thread()->team;	state = disable_interrupts();	GRAB_TEAM_LOCK();	hash_insert(team_hash, team);	insert_team_into_parent(parent, team);	insert_team_into_group(parent->group, team);	sUsedTeams++;	RELEASE_TEAM_LOCK();	restore_interrupts(state);	// copy the args over	teamArgs = create_team_arg(argCount, args, envCount, env);	if (teamArgs == NULL) {		err = B_NO_MEMORY;		goto err1;	}	// create a new io_context for this team	team->io_context = vfs_new_io_context(parent->io_context);	if (!team->io_context) {		err = B_NO_MEMORY;		goto err2;	}	// create an address space for this team	err = vm_create_aspace(team->name, team->id, USER_BASE, USER_SIZE, false, &team->aspace);	if (err < B_OK)		goto err3;	cache_node_launched(argCount, args);	// cut the path from the main thread name	threadName = strrchr(args[0], '/');	if (threadName != NULL)		threadName++;	else		threadName = args[0];	// create a kernel thread, but under the context of the new team	thread = spawn_kernel_thread_etc(team_create_thread_start, threadName, B_NORMAL_PRIORITY,				teamArgs, team->id);	if (thread < 0) {		err = thread;		goto err4;	}	return thread;err4:	vm_put_aspace(team->aspace);err3:	vfs_free_io_context(team->io_context);err2:	free_team_arg(teamArgs);err1:	// remove the team structure from the team hash table and delete the team structure	state = disable_interrupts();	GRAB_TEAM_LOCK();	remove_team_from_group(team, &group);	remove_team_from_parent(parent, team);	hash_remove(team_hash, team);	RELEASE_TEAM_LOCK();	restore_interrupts(state);	team_delete_process_group(group);	delete_team_struct(team);	return err;}