Files | |
| file | librmgr.h |
| Client Roottask API interface. | |
| file | proto.h |
Functions | |
| EXTERN_C_BEGIN L4_CV l4_threadid_t | rmgr_pager_id (void) |
| Get the L4 thread id of the roottask pager. | |
| L4_CV l4_threadid_t | rmgr_service_id (void) |
| Get the L4 thread id of the roottask service. | |
| L4_CV int | rmgr_init (void) |
| Initialize the roottask lib. | |
| L4_CV int | rmgr_set_small_space (l4_threadid_t dest, int num) |
| Move a task into an allocated small space. | |
| L4_CV int | rmgr_set_prio (l4_threadid_t dest, int num) |
| Set the priority of a thread. | |
| L4_CV int | rmgr_get_prio (l4_threadid_t dest, int *num) |
| Query prio without rmgr involvement. | |
| L4_CV int | rmgr_get_task (int num) |
| Request roottask to transfer right for a task to the caller. | |
| L4_CV int | rmgr_free_task (int num) |
| Pass right for a task back to roottask. | |
| L4_CV int | rmgr_free_task_all (l4_threadid_t client) |
| Free all L4 tasks occupied for a specific task. | |
| L4_CV int | rmgr_get_irq (int num) |
| Get right to receive from specified IRQ. | |
| L4_CV int | rmgr_free_irq (int num) |
| Return right to receive from IRQ back to roottask. | |
| L4_CV int | rmgr_free_irq_all (l4_threadid_t client) |
| Free all IRQs occupied for a task. | |
| L4_CV int | rmgr_dump_mem (void) |
| Dump the memory allocation map for all its clients. | |
| L4_CV int | rmgr_get_page0 (void *address) |
| Request the first physical page (roottask does not hand out \ this page on pagefaults). | |
| L4_CV int | rmgr_get_task_id (const char *module_name, l4_threadid_t *thread_id) |
| Request the task ID of the boot modules named by modname. | |
| L4_CV int | rmgr_set_task_id (const char *module_name, l4_threadid_t thread_id) |
| Set the task ID of a module. | |
| L4_CV l4_taskid_t | rmgr_task_new (l4_taskid_t dest, l4_umword_t mcp_or_new_chief, l4_umword_t esp, l4_umword_t eip, l4_threadid_t pager) |
| Create an L4 task. | |
| L4_CV l4_taskid_t | rmgr_task_new_long (l4_taskid_t dest, l4_umword_t mcp_or_new_chief, l4_umword_t esp, l4_umword_t eip, l4_threadid_t pager, l4_threadid_t caphandler, l4_quota_desc_t kquota) |
| Create an L4 task with capability handler. | |
| L4_CV l4_taskid_t | rmgr_task_new_with_prio (l4_taskid_t dest, l4_umword_t mcp_or_new_chief, l4_umword_t esp, l4_umword_t eip, l4_threadid_t pager, l4_sched_param_t sched_param) |
| Create an L4 task with capability handler. | |
| L4_CV int | rmgr_free_fpage (l4_fpage_t fp) |
| Free an I/O memory page. | |
| L4_CV int | rmgr_free_page (l4_umword_t address) |
| Free a memory page. | |
| L4_CV int | rmgr_free_mem_all (l4_threadid_t client) |
| Free all memory a task. | |
| L4_CV l4_umword_t | rmgr_reserve_mem (l4_umword_t size, l4_umword_t align, l4_umword_t flags, l4_umword_t range_low, l4_umword_t range_high) |
| reserve some memory chunk in an area | |
| L4_CV int | rmgr_privctrl (l4_umword_t cmd, l4_umword_t param) |
| elevates the calling process to PL0 | |
The roottask is the initial task handling hardware resource access, such as memory pages, IRQ, or I/O ports. It is also responsible to monitor the creation and deletion of tasks. For these functions it implements a simple API.
| EXTERN_C_BEGIN L4_CV l4_threadid_t rmgr_pager_id | ( | void | ) |
Get the L4 thread id of the roottask pager.
| L4_CV l4_threadid_t rmgr_service_id | ( | void | ) |
Get the L4 thread id of the roottask service.
| L4_CV int rmgr_init | ( | void | ) |
Initialize the roottask lib.
| L4_CV int rmgr_set_small_space | ( | l4_threadid_t | dest, | |
| int | num | |||
| ) |
Move a task into an allocated small space.
| dest | ID of the corresponding L4 task | |
| num | number of the target small space |
| L4_CV int rmgr_set_prio | ( | l4_threadid_t | dest, | |
| int | num | |||
| ) |
Set the priority of a thread.
| dest | target thread ID | |
| num | new thread priority |
| 0 | Ok, prio was set | |
| -1 | some error: thread does not exist or mcp of caller is below old or new prio of dest. Or prio support is disabled in librmgr. | |
| 16 | L4_IPC_ENOT_EXISTENT: IPC error. Probably rmgr_init() was not called. |
| L4_CV int rmgr_get_prio | ( | l4_threadid_t | dest, | |
| int * | num | |||
| ) |
Query prio without rmgr involvement.
| dest | target thread ID |
| num | the thread's current prio |
| L4_CV int rmgr_get_task | ( | int | num | ) |
Request roottask to transfer right for a task to the caller.
| num | task number |
| L4_CV int rmgr_free_task | ( | int | num | ) |
Pass right for a task back to roottask.
| num | task number |
| L4_CV int rmgr_free_task_all | ( | l4_threadid_t | client | ) |
Free all L4 tasks occupied for a specific task.
| client | target task ID |
| L4_CV int rmgr_get_irq | ( | int | num | ) |
Get right to receive from specified IRQ.
| num | the number of the IRQ |
| L4_CV int rmgr_free_irq | ( | int | num | ) |
Return right to receive from IRQ back to roottask.
| num | the irq number |
| L4_CV int rmgr_free_irq_all | ( | l4_threadid_t | client | ) |
Free all IRQs occupied for a task.
| client | task number |
| L4_CV int rmgr_dump_mem | ( | void | ) |
Dump the memory allocation map for all its clients.
| L4_CV int rmgr_get_page0 | ( | void * | address | ) |
Request the first physical page (roottask does not hand out \ this page on pagefaults).
| address | address where to receive that page to |
| L4_CV int rmgr_get_task_id | ( | const char * | module_name, | |
| l4_threadid_t * | thread_id | |||
| ) |
Request the task ID of the boot modules named by modname.
| module_name | the name of the modules |
| thread_id | the ID of the module |
| L4_CV int rmgr_set_task_id | ( | const char * | module_name, | |
| l4_threadid_t | thread_id | |||
| ) |
Set the task ID of a module.
| module_name | the name of the module | |
| thread_id | the new task ID |
| L4_CV l4_taskid_t rmgr_task_new | ( | l4_taskid_t | dest, | |
| l4_umword_t | mcp_or_new_chief, | |||
| l4_umword_t | esp, | |||
| l4_umword_t | eip, | |||
| l4_threadid_t | pager | |||
| ) |
Create an L4 task.
| dest | the intended new task ID | |
| mcp_or_new_chief | Master Control Prio | |
| esp | new stack pointer | |
| eip | new instruction pointer | |
| pager | pager of the new task |
| L4_CV l4_taskid_t rmgr_task_new_long | ( | l4_taskid_t | dest, | |
| l4_umword_t | mcp_or_new_chief, | |||
| l4_umword_t | esp, | |||
| l4_umword_t | eip, | |||
| l4_threadid_t | pager, | |||
| l4_threadid_t | caphandler, | |||
| l4_quota_desc_t | kquota | |||
| ) |
Create an L4 task with capability handler.
| dest | the intended new task ID | |
| mcp_or_new_chief | Master Control Prio | |
| esp | new stack pointer | |
| eip | new instruction pointer | |
| pager | pager of the new task | |
| caphandler | the capability fault handler | |
| kquota | kernel quota |
| L4_CV l4_taskid_t rmgr_task_new_with_prio | ( | l4_taskid_t | dest, | |
| l4_umword_t | mcp_or_new_chief, | |||
| l4_umword_t | esp, | |||
| l4_umword_t | eip, | |||
| l4_threadid_t | pager, | |||
| l4_sched_param_t | sched_param | |||
| ) |
Create an L4 task with capability handler.
| dest | the intended new task ID | |
| mcp_or_new_chief | Master Control Prio | |
| esp | new stack pointer | |
| eip | new instruction pointer | |
| pager | pager of the new task | |
| sched_param | Scheduling parameters determining the prio |
| L4_CV int rmgr_free_fpage | ( | l4_fpage_t | fp | ) |
Free an I/O memory page.
| fp | the flexpage describing the I/O memory page |
| L4_CV int rmgr_free_page | ( | l4_umword_t | address | ) |
Free a memory page.
| address | the address in the memory page to free |
| L4_CV int rmgr_free_mem_all | ( | l4_threadid_t | client | ) |
Free all memory a task.
| client | task ID to take memory from |
| L4_CV l4_umword_t rmgr_reserve_mem | ( | l4_umword_t | size, | |
| l4_umword_t | align, | |||
| l4_umword_t | flags, | |||
| l4_umword_t | range_low, | |||
| l4_umword_t | range_high | |||
| ) |
reserve some memory chunk in an area
| size | the size of the chunk to reserve | |
| align | alignment of the reserved chunk | |
| flags | flags for memory reservation | |
| range_low | the lower range of the area to check | |
| range_high | the upper range of the area to check |
| L4_CV int rmgr_privctrl | ( | l4_umword_t | cmd, | |
| l4_umword_t | param | |||
| ) |
elevates the calling process to PL0
| cmd | ignored | |
| param | ignored |