mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-21 19:45:52 +00:00
Fix: thread identifier comparator
The invalid thread is specified as 0,0,-1 (ec cap, sc cap, sem cap). The main thread is specified as 0,0,0. The comparator identified "tid_main == tid_invalid" as equal, which is obviously wrong. The patch compares at least ec and sem cap.
This commit is contained in:
parent
86921c2e12
commit
1a94c3b623
@ -31,8 +31,8 @@ namespace Genode {
|
||||
|
||||
typedef Native_thread Native_thread_id;
|
||||
|
||||
inline bool operator == (Native_thread_id t1, Native_thread_id t2) { return t1.ec_sel == t2.ec_sel; }
|
||||
inline bool operator != (Native_thread_id t1, Native_thread_id t2) { return t1.ec_sel != t2.ec_sel; }
|
||||
inline bool operator == (Native_thread_id t1, Native_thread_id t2) { return (t1.ec_sel == t2.ec_sel) && (t1.sc_sel == t2.sc_sel) && (t1.rs_sel == t2.rs_sel); }
|
||||
inline bool operator != (Native_thread_id t1, Native_thread_id t2) { return (t1.ec_sel != t2.ec_sel) && (t1.sc_sel != t2.sc_sel) && (t1.rs_sel != t2.rs_sel); }
|
||||
|
||||
class Native_utcb
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user