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:
Alexander Boettcher 2012-06-29 14:43:28 +02:00 committed by Norman Feske
parent 86921c2e12
commit 1a94c3b623
1 changed files with 2 additions and 2 deletions

View File

@ -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
{