From: Hubertus F. <fr...@wa...> - 2002-03-05 16:43:10
|
On Tuesday 05 March 2002 11:26 am, OGAWA Hirofumi wrote: > Hubertus Franke <fr...@wa...> writes: > > @@ -153,13 +155,18 @@ > > if(last_pid & 0xffff8000) > > last_pid = 300; > > next_safe = PID_MAX; > > + goto repeat; > > } > > - goto repeat; > > + if(unlikely(last_pid == beginpid)) > > + goto nomorepids; > > + continue; > > It isn't guaranteed that pid is unique. > > In the case: > task->pid = 300, task->xxx = 301 > pid 301 is free > > This get_pid() returns 301. > > Regards. No the point of this patch was to limit the search time for finding the next available pid. We are not mocking around with the logic that declares a pid available or not. That stays the same. However, one doesn't need to start every single time from the beginning to find the next available pid. -- -- Hubertus Franke (fr...@wa...) |