mirror of
https://github.com/drasko/codezero.git
synced 2026-07-14 19:25:24 +02:00
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:
@@ -16,9 +16,10 @@
|
||||
#include <l4/api/thread.h>
|
||||
|
||||
struct task_ids {
|
||||
int tid;
|
||||
int spid;
|
||||
int tgid;
|
||||
l4id_t tid;
|
||||
l4id_t spid;
|
||||
l4id_t tgid;
|
||||
l4id_t cid;
|
||||
};
|
||||
|
||||
static inline void *
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef __L4LIB_ARM_TYPES_H___
|
||||
#define __L4LIB_ARM_TYPES_H__
|
||||
|
||||
#define TASK_ID_INVALID -1
|
||||
#define TASK_ID_INVALID 0xFFFFFFFF
|
||||
|
||||
#include <l4/arch/arm/types.h>
|
||||
|
||||
|
||||
@@ -226,13 +226,11 @@ int read_pager_capabilities()
|
||||
/* Set up pointers to important capabilities */
|
||||
list_foreach_struct(cap, &capability_list.caps, list) {
|
||||
/* Physical memory bank */
|
||||
if ((cap->type & CAP_RTYPE_MASK)
|
||||
== CAP_RTYPE_PHYSMEM)
|
||||
if (cap_type(cap) == CAP_TYPE_MAP_PHYSMEM)
|
||||
cont_mem_regions.physmem = cap;
|
||||
|
||||
/* Virtual regions */
|
||||
if ((cap->type & CAP_RTYPE_MASK)
|
||||
== CAP_RTYPE_VIRTMEM) {
|
||||
if (cap_type(cap) == CAP_TYPE_MAP_VIRTMEM) {
|
||||
|
||||
/* Pager address region (get from linker-defined) */
|
||||
if (__pfn_to_addr(cap->start)
|
||||
|
||||
@@ -26,7 +26,7 @@ void wait_pager(l4id_t partner)
|
||||
}
|
||||
|
||||
pid_t parent_of_all;
|
||||
pid_t pagerid;
|
||||
l4id_t pagerid;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ void wait_pager(l4id_t partner)
|
||||
// printf("Pager synced with us.\n");
|
||||
}
|
||||
|
||||
pid_t pagerid;
|
||||
l4id_t pagerid;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
@@ -66,12 +66,12 @@ int main(void)
|
||||
printf("%s: Container %s started\n",
|
||||
__CONTAINER__, __CONTAINER_NAME__);
|
||||
|
||||
//capability_test();
|
||||
capability_test();
|
||||
|
||||
exit_test();
|
||||
//exit_test();
|
||||
|
||||
/* Now quit to demo self-paging quit */
|
||||
l4_exit(0);
|
||||
//l4_exit(0);
|
||||
|
||||
/* Now quit by null pointer */
|
||||
// *((int *)0) = 5;
|
||||
|
||||
Reference in New Issue
Block a user