kernel: +image_iterate_through_team_images()
Like image_iterate_through_images(), but iterates though the images of the given team only.
This commit is contained in:
@@ -49,6 +49,8 @@ extern status_t remove_images(Team *team);
|
|||||||
typedef bool (*image_iterator_callback)(struct image* image, void* cookie);
|
typedef bool (*image_iterator_callback)(struct image* image, void* cookie);
|
||||||
struct image* image_iterate_through_images(image_iterator_callback callback,
|
struct image* image_iterate_through_images(image_iterator_callback callback,
|
||||||
void* cookie);
|
void* cookie);
|
||||||
|
struct image* image_iterate_through_team_images(team_id teamID,
|
||||||
|
image_iterator_callback callback, void* cookie);
|
||||||
|
|
||||||
extern status_t image_debug_lookup_user_symbol_address(Team *team,
|
extern status_t image_debug_lookup_user_symbol_address(Team *team,
|
||||||
addr_t address, addr_t *_baseAddress, const char **_symbolName,
|
addr_t address, addr_t *_baseAddress, const char **_symbolName,
|
||||||
|
|||||||
@@ -298,6 +298,31 @@ image_iterate_through_images(image_iterator_callback callback, void* cookie)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
struct image*
|
||||||
|
image_iterate_through_team_images(team_id teamID,
|
||||||
|
image_iterator_callback callback, void* cookie)
|
||||||
|
{
|
||||||
|
// get the team
|
||||||
|
Team* team = Team::Get(teamID);
|
||||||
|
if (team == NULL)
|
||||||
|
return NULL;
|
||||||
|
BReference<Team> teamReference(team, true);
|
||||||
|
|
||||||
|
// iterate through the team's images
|
||||||
|
MutexLocker imageLocker(sImageMutex);
|
||||||
|
|
||||||
|
struct image* image = NULL;
|
||||||
|
|
||||||
|
while ((image = (struct image*)list_get_next_item(&team->image_list,
|
||||||
|
image)) != NULL) {
|
||||||
|
if (callback(image, cookie))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
image_debug_lookup_user_symbol_address(Team *team, addr_t address,
|
image_debug_lookup_user_symbol_address(Team *team, addr_t address,
|
||||||
addr_t *_baseAddress, const char **_symbolName, const char **_imageName,
|
addr_t *_baseAddress, const char **_symbolName, const char **_imageName,
|
||||||
|
|||||||
Reference in New Issue
Block a user