Remove Cpu_session::State_access_failed exception

This patch removes the exception formerly thrown by 'Cpu_thread::state'
and turns the 'Thread_state' structure into a plain compound type w/o a
constructor.

Issue #5245
Fixes #5250
This commit is contained in:
Norman Feske
2024-06-17 15:25:28 +02:00
parent 16b863fc6e
commit 14d3c4cb5e
42 changed files with 321 additions and 404 deletions

View File

@ -96,9 +96,8 @@ void Thread::start()
Foc_native_cpu_client native_cpu(_cpu_session->native_cpu());
/* get gate-capability and badge of new thread */
Foc_thread_state state;
try { state = native_cpu.thread_state(_thread_cap); }
catch (...) { throw Cpu_session::Thread_creation_failed(); }
Foc_thread_state state { };
state = native_cpu.thread_state(_thread_cap);
/* remember UTCB of the new thread */
Foc::l4_utcb_t * const foc_utcb = (Foc::l4_utcb_t *)state.utcb;