* 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) if (data->FindInt32("_port_cap", &portCapacity) != B_OK || portCapacity < 0)
portCapacity = B_LOOPER_PORT_DEFAULT_CAPACITY; 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) if (status == B_OK)
status = data->AddInt32("_port_cap", info.capacity); 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; return status;
} }