mirror of
https://review.haiku-os.org/haiku
synced 2025-01-18 04:28:52 +01:00
kernel/team: Slight cleanup to the synchronization logic in load_image_internal.
Adjust the comment and use ASSERT() rather than a panic().
This commit is contained in:
parent
1124f672a0
commit
3f35917df2
@ -1870,11 +1870,10 @@ load_image_internal(char**& _flatArgs, size_t flatArgsSize, int32 argCount,
|
||||
// responsible for unsetting `loading_info` in the team structure.
|
||||
loadingWaitEntry.Wait();
|
||||
|
||||
// We must synchronize with the thread that woke us up, to ensure
|
||||
// there are no remaining consumers of the team_loading_info.
|
||||
// We must synchronize by temporarily reacquiring the Team lock, to
|
||||
// ensure there are no remaining consumers of the team_loading_info.
|
||||
team->Lock();
|
||||
if (team->loading_info != NULL)
|
||||
panic("team loading wait complete, but loading_info != NULL");
|
||||
ASSERT(team->loading_info == NULL);
|
||||
team->Unlock();
|
||||
teamLoadingReference.Unset();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user