Lines Matching defs:team

32 #include <team.h>
61 // * sTeamListLock[]: Protects Team::port_list. Lock index for given team is
67 // and removing ports to the hash tables and the team port list.
69 // fashion, so a port can be in the hash table but not in the team port list
80 // physical deletion removes the port from hash tables and team port list.
81 // In a similar way, port creation first inserts into hashes and team list
236 void Notify(uint32 opcode, port_id team);
464 MUTEX_INITIALIZER("team ports list 1"),
465 MUTEX_INITIALIZER("team ports list 2"),
466 MUTEX_INITIALIZER("team ports list 3"),
467 MUTEX_INITIALIZER("team ports list 4"),
468 MUTEX_INITIALIZER("team ports list 5"),
469 MUTEX_INITIALIZER("team ports list 6"),
470 MUTEX_INITIALIZER("team ports list 7"),
471 MUTEX_INITIALIZER("team ports list 8")
510 if (!strcmp(argv[1], "team") || !strcmp(argv[1], "owner"))
517 kprintf("port id cap read-cnt write-cnt total team "
691 // TODO: add per team limit
760 info->team = port->owner;
849 /*! This function deletes all the ports that are owned by the passed team.
852 delete_owned_ports(Team* team)
854 TRACE(("delete_owned_ports(owner = %ld)\n", team->id));
859 const uint8 lockIndex = team->id % kTeamListLockCount;
862 // Try to logically delete all ports from the team's port list.
864 Port* port = (Port*)list_get_first_item(&team->port_list);
869 Port* nextPort = (Port*)list_get_next_item(&team->port_list, port);
896 // Uninitialize ports and release team port list references
901 // Reference for team port list
950 "Dump a list of all active ports (for team, with name, etc.)",
951 "[ ([ \"team\" | \"owner\" ] <team>) | (\"name\" <name>) ]\n"
954 " <team> - The team owning the ports.\n"
988 Team* team = thread_get_current_thread()->team;
989 if (team == NULL)
1030 // (2/2) Insert into team list
1035 list_add_item(&team->port_list, port);
1122 // (2/2) Remove from team port list
1265 TRACE(("get_next_port_info(team = %ld)\n", teamID));
1274 Team* team = Team::Get(teamID);
1275 if (team == NULL)
1277 BReference<Team> teamReference(team, true);
1279 // iterate through the team's port list
1286 Port* port = (Port*)list_get_first_item(&team->port_list);
1294 port = (Port*)list_get_next_item(&team->port_list, port);
1692 TRACE(("set_port_owner(id = %ld, team = %ld)\n", id, newTeamID));
1697 // get the new team
1698 Team* team = Team::Get(newTeamID);
1699 if (team == NULL)
1701 BReference<Team> teamReference(team, true);
1711 // transfer ownership to other team
1712 if (team->id != portRef->owner) {
1714 uint8 secondLockIndex = team->id % kTeamListLockCount;
1730 // Now that we have locked the team port lists, check the state again
1733 list_add_item(&team->port_list, portRef.Get());
1734 portRef->owner = team->id;
1742 T(OwnerChange(portRef, team->id, B_OK));
1818 _user_get_next_port_info(team_id team, int32 *userCookie,
1831 status = get_next_port_info(team, &cookie, &info);
1863 _user_set_port_owner(port_id port, team_id team)
1865 return set_port_owner(port, team);