X-Git-Url: http://demsky.eecs.uci.edu/git/?p=model-checker.git;a=blobdiff_plain;f=threads-model.h;h=b99b279b8ece6cccc916f227d228464112967254;hp=8b165d541394a8fcc23089e354b9c1b8c48da4f4;hb=c30a9cfd8df1150f6a2e89dde93781e334d4453d;hpb=8c82e3813dcbe9f61197a45d0543abc5d131a0fa diff --git a/threads-model.h b/threads-model.h index 8b165d5..b99b279 100644 --- a/threads-model.h +++ b/threads-model.h @@ -151,11 +151,21 @@ static inline thread_id_t thrd_to_id(thrd_t t) return t; } +/** + * @brief Map a zero-based integer index to a unique thread ID + * + * This is the inverse of id_to_int + */ static inline thread_id_t int_to_id(int i) { return i; } +/** + * @brief Map a unique thread ID to a zero-based integer index + * + * This is the inverse of int_to_id + */ static inline int id_to_int(thread_id_t id) { return id;