From faf3710ec1024810d0255f6356cd0a9d12d2cf9b Mon Sep 17 00:00:00 2001 From: Kimplul Date: Mon, 16 Jan 2023 15:41:58 +0200 Subject: make process ids signed + Unlikely to ever run into billions of threads, and this keeps in line with stuff like Linux. Also allows C to relatively painlessly implement hashmaps of pids, if neccessary. --- include/apos/tcb.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/apos/tcb.h') diff --git a/include/apos/tcb.h b/include/apos/tcb.h index 9f10e2f..8f3be3d 100644 --- a/include/apos/tcb.h +++ b/include/apos/tcb.h @@ -133,7 +133,9 @@ struct tcb { */ id_t rid; - /** Thread ID. */ + /** Thread ID. @note all ids associated with threads use a signed type, + * but are always larger than zero. This is mirroring Linux behavior, + * and signed types are probably large enough. */ id_t tid; /** \todo implement cpu_id to hardware cpu ID translation, first in -- cgit v1.3