Changed l4id_t type to unsigned integer. Expanded task_ids to have cid

Task ids are now unsigned as the container ids will need to be encoded
in the id fields as well.

For requests who require even more comprehensive id input, (such as
thread creation) also added is the container id so that threads
_could_ potentially be created in other containers as well.
This commit is contained in:
Bahadir Balban
2009-11-04 16:39:04 +02:00
parent db57c598b0
commit aeef546544
11 changed files with 32 additions and 19 deletions

View File

@@ -2,8 +2,8 @@
#define __IPC_H__
#define L4_NILTHREAD -1
#define L4_ANYTHREAD -2
#define L4_NILTHREAD 0xFFFFFFFF
#define L4_ANYTHREAD 0xFFFFFFFE
#define L4_IPC_TAG_MR_OFFSET 0

View File

@@ -12,7 +12,7 @@ typedef signed short s16;
typedef signed char s8;
/* Thread/Space id type */
typedef int l4id_t;
typedef unsigned int l4id_t;
#endif /* !__ASSEMBLY__ */
#endif /* !__ARCH_TYPES_H__ */

View File

@@ -39,11 +39,21 @@ enum task_state {
TASK_DEAD = 3,
};
#define TASK_ID_INVALID -1
#define TASK_CID_MASK 0xFF000000
#define TASK_ID_MASK 0x00FFFFFF
static inline int task_id_special(l4id_t id)
{
/* Special ids have top 2 nibbles all set */
return (id & TASK_CID_MASK) == TASK_CID_MASK;
}
#define TASK_ID_INVALID 0xFFFFFFFF
struct task_ids {
l4id_t tid;
l4id_t spid;
l4id_t tgid;
l4id_t cid;
};
struct container;