NOVA: Use everywhere same value for a invalid cap

This commit is contained in:
Alexander Boettcher
2012-08-02 10:10:48 +02:00
committed by Norman Feske
parent e44648e1ab
commit e3a7d2220d
4 changed files with 23 additions and 8 deletions

View File

@ -63,7 +63,9 @@ static inline Genode::Native_thread_id thread_get_my_native_id()
Genode::Thread_base *myself = Genode::Thread_base::myself();
if (myself == 0) {
Genode::Native_thread_id main_tid = { 0, 0 };
Genode::Native_thread_id main_tid;
main_tid.ec_sel = 0;
main_tid.exc_pt_sel = 0;
return main_tid;
} else
return myself->tid();
@ -72,7 +74,7 @@ static inline Genode::Native_thread_id thread_get_my_native_id()
static inline Genode::Native_thread_id thread_invalid_id()
{
Genode::Native_thread_id tid = { ~0UL, ~0UL };
Genode::Native_thread_id tid;
return tid;
}

View File

@ -24,7 +24,7 @@ Cpu_session_component::native_cap(Thread_capability thread_cap)
{
Cpu_thread_component *thread = _lookup_thread(thread_cap);
if (!thread)
return Native_capability(0, 0);
return Native_capability::invalid_cap();
return thread->platform_thread()->native_cap();
}