Renamed threadIDEnd to lastThreadID as I think it's clearer.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11630 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1531,7 +1531,7 @@ _get_next_thread_info(team_id team, int32 *_cookie, thread_info *info, size_t si
|
|||||||
struct thread *thread = NULL;
|
struct thread *thread = NULL;
|
||||||
cpu_status state;
|
cpu_status state;
|
||||||
int slot;
|
int slot;
|
||||||
thread_id threadIDEnd;
|
thread_id lastThreadID;
|
||||||
|
|
||||||
if (info == NULL || size != sizeof(thread_info) || team < B_OK)
|
if (info == NULL || size != sizeof(thread_info) || team < B_OK)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
@@ -1546,11 +1546,11 @@ _get_next_thread_info(team_id team, int32 *_cookie, thread_info *info, size_t si
|
|||||||
state = disable_interrupts();
|
state = disable_interrupts();
|
||||||
GRAB_THREAD_LOCK();
|
GRAB_THREAD_LOCK();
|
||||||
|
|
||||||
threadIDEnd = peek_next_thread_id();
|
lastThreadID = peek_next_thread_id();
|
||||||
if (slot >= threadIDEnd)
|
if (slot >= lastThreadID)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
while (slot < threadIDEnd
|
while (slot < lastThreadID
|
||||||
&& (!(thread = thread_get_thread_struct_locked(slot)) || thread->team->id != team))
|
&& (!(thread = thread_get_thread_struct_locked(slot)) || thread->team->id != team))
|
||||||
slot++;
|
slot++;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user