* Archive the thread priority as well, it can be found in an R5 archive if Run() was called.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26276 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Karsten Heimrich 2008-07-06 10:34:47 +00:00
parent cd6265ec4d
commit d2805ca9aa

View File

@ -173,7 +173,11 @@ BLooper::BLooper(BMessage* data)
if (data->FindInt32("_port_cap", &portCapacity) != B_OK || portCapacity < 0)
portCapacity = B_LOOPER_PORT_DEFAULT_CAPACITY;
_InitData(Name(), B_NORMAL_PRIORITY, portCapacity);
int32 priority;
if (data->FindInt32("_prio", &priority) != B_OK)
priority = B_NORMAL_PRIORITY;
_InitData(Name(), priority, portCapacity);
}
@ -199,7 +203,9 @@ BLooper::Archive(BMessage* data, bool deep) const
if (status == B_OK)
status = data->AddInt32("_port_cap", info.capacity);
// TODO: what about the thread priority?
thread_info threadInfo;
if (get_thread_info(Thread(), &threadInfo) == B_OK)
status = data->AddInt32("_prio", threadInfo.priority);
return status;
}
@ -522,7 +528,7 @@ PRINT((" fAtomicCount now: %ld\n", fAtomicCount));
// and release if it's the case
if (atomicCount > 1)
#endif
release_sem(fLockSem);
release_sem(fLockSem);
}
PRINT(("BLooper::Unlock() done\n"));
}
@ -898,7 +904,7 @@ BLooper::_LockComplete(BLooper *looper, int32 oldCount, thread_id thread,
{
status_t err = B_OK;
#if DEBUG < 1
#if DEBUG < 1
if (oldCount > 0) {
#endif
do {