mirror of
https://review.haiku-os.org/haiku
synced 2025-01-18 12:38:51 +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.
|
// responsible for unsetting `loading_info` in the team structure.
|
||||||
loadingWaitEntry.Wait();
|
loadingWaitEntry.Wait();
|
||||||
|
|
||||||
// We must synchronize with the thread that woke us up, to ensure
|
// We must synchronize by temporarily reacquiring the Team lock, to
|
||||||
// there are no remaining consumers of the team_loading_info.
|
// ensure there are no remaining consumers of the team_loading_info.
|
||||||
team->Lock();
|
team->Lock();
|
||||||
if (team->loading_info != NULL)
|
ASSERT(team->loading_info == NULL);
|
||||||
panic("team loading wait complete, but loading_info != NULL");
|
|
||||||
team->Unlock();
|
team->Unlock();
|
||||||
teamLoadingReference.Unset();
|
teamLoadingReference.Unset();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user