* Solved the problem independently from the list.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34876 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
32883e8980
commit
e045a8c0df
@ -174,19 +174,16 @@ KernelDaemon::_NextDaemon(struct daemon& marker)
|
||||
{
|
||||
struct daemon* daemon;
|
||||
|
||||
if (marker.GetDoublyLinkedListLink()->next == NULL
|
||||
&& marker.GetDoublyLinkedListLink()->previous == NULL
|
||||
&& fDaemons.Head() != &marker) {
|
||||
// Marker is not part of the list yet, just return the first entry
|
||||
if (marker.arg == NULL) {
|
||||
// The marker is not part of the list yet, just return the first entry
|
||||
daemon = fDaemons.Head();
|
||||
} else {
|
||||
daemon = marker.GetDoublyLinkedListLink()->next;
|
||||
fDaemons.Remove(&marker);
|
||||
|
||||
marker.GetDoublyLinkedListLink()->next = NULL;
|
||||
marker.GetDoublyLinkedListLink()->previous = NULL;
|
||||
}
|
||||
|
||||
marker.arg = daemon;
|
||||
|
||||
if (daemon != NULL)
|
||||
fDaemons.Insert(daemon->GetDoublyLinkedListLink()->next, &marker);
|
||||
|
||||
@ -200,6 +197,8 @@ KernelDaemon::_DaemonThread()
|
||||
struct daemon marker;
|
||||
int32 iteration = 0;
|
||||
|
||||
marker.arg = NULL;
|
||||
|
||||
while (true) {
|
||||
RecursiveLocker locker(fLock);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user