mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-20 08:03:56 +00:00
NOVA: Use everywhere same value for a invalid cap
This commit is contained in:
committed by
Norman Feske
parent
e44648e1ab
commit
e3a7d2220d
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user