rem: dprintf("team_create_team: entry '%s', name '%s' args = %p argc = %d\n", path, name, args, argc);
add: TRACE(("team_create_team: entry '%s', name '%s' args = %p argc = %d\n", path, name, args, argc));
context: team_create_team(const char *path, const char *name, char **args, int argc, char **envp, int envc, int priority){	struct team *team, *parent;	thread_id tid;	team_id pid;	int err;	unsigned int state;//	int sem_retcode;	struct team_arg *teamArgs;	dprintf("team_create_team: entry '%s', name '%s' args = %p argc = %d\n", path, name, args, argc);	team = create_team_struct(name, false);	if (team == NULL)		return B_NO_MEMORY;	pid = team->id;	parent = thread_get_current_thread()->team;	state = disable_interrupts();	GRAB_TEAM_LOCK();	hash_insert(team_hash, team);	insert_team_into_parent(parent, team);	RELEASE_TEAM_LOCK();	restore_interrupts(state);	// copy the args over	teamArgs = (struct team_arg *)malloc(sizeof(struct team_arg));	if (teamArgs == NULL){		err = B_NO_MEMORY;		goto err1;	}	teamArgs->path = strdup(path);	if (teamArgs->path == NULL){		err = B_NO_MEMORY;		goto err2;	}	teamArgs->argc = argc;	teamArgs->args = args;	teamArgs->envp = envp;	teamArgs->envc = envc;	// create a new io_context for this team	team->io_context = vfs_new_io_context(thread_get_current_thread()->team->io_context);	if (!team->io_context) {		err = ENOMEM;		goto err3;	}	// create an address space for this team	team->_aspace_id = vm_create_aspace(team->name, USER_BASE, USER_SIZE, false);	if (team->_aspace_id < 0) {		err = team->_aspace_id;		goto err4;	}	team->aspace = vm_get_aspace_by_id(team->_aspace_id);	// create a kernel thread, but under the context of the new team	tid = spawn_kernel_thread_etc(team_create_team2, name, B_NORMAL_PRIORITY, teamArgs, team->id);	if (tid < 0) {		err = tid;		goto err5;	}	resume_thread(tid);	return pid;err5:	vm_put_aspace(team->aspace);	vm_delete_aspace(team->_aspace_id);err4:	vfs_free_io_context(team->io_context);err3:	free(teamArgs->path);err2:	free(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_parent(parent, team);	hash_remove(team_hash, team);	RELEASE_TEAM_LOCK();	restore_interrupts(state);	delete_team_struct(team);//err:	return err;}