l4::ts Interface Reference

generic task server interface More...

import "generic_ts.idl";

List of all members.

Public Member Functions

long allocate ([in] unsigned long taskno,[out] l4_taskid_t *taskid)
 Allocate a new task id.
long allocate2 ([in] unsigned long taskno,[out] l4_taskid_t *taskid)
 Allocate a new task in the same way as allocate().
long create ([in, out] l4_taskid_t *taskid,[in] l4_addr_t entry,[in] l4_addr_t stack,[in] unsigned long mcp,[in] l4_taskid_t pager,[in] l4_taskid_t caphandler,[in] l4_quota_desc_t kquota,[in] long prio,[in, string] char *resname,[in] unsigned long flags)
 Create the task.
long free ([in] l4_taskid_t taskid)
 Free previously allocated task id.
long free2 ([in] l4_taskid_t taskid)
 Free previously allocated task id and return chief rights.
long kill ([in] l4_taskid_t taskid,[in] l4_uint8_t options)
 Terminate task.
long kill_recursive ([in] l4_taskid_t taskid)
 Terminate all tasks owned tasknr recursivly!
long owner ([in] l4_taskid_t taskid,[in] l4_taskid_t owner)
 Transfer ownership of a task.
long taskno_to_taskid ([in] unsigned long tasknr,[out] l4_taskid_t *taskid)
 Deliver the corresponding task id.
long exit (void)
 Terminate the caller.
void dump ()
 Dump list of all allocated tasks.
void do_kill_reply ([in] l4_threadid_t client)
 INTERNAL, used by events thread.


Detailed Description

generic task server interface

Member Function Documentation

long l4::ts::allocate ( [in] unsigned long  taskno,
[out] l4_taskid_t *  taskid 
)

Allocate a new task id.

Returns -L4_ENOTASK if no task is available. We have to split allocating and creating the task in two steps because creating a task means that the task starts immediatly. If the task starts before the task's pager knows the task ID of the new task, the pager gets confused and should deny the page fault handling for that task. Therefore we allocate the task ID in the first step and can tell the new task ID to the pager in the next step. Finally we create the task.

Parameters:
taskno if != 0, use the specific task number
Return values:
taskid Id of new task assigned to calling client
Returns:
0 on success (taskid contains a valid id), error code otherwise:
  • -L4_ENOTASK no unused task id available

long l4::ts::allocate2 ( [in] unsigned long  taskno,
[out] l4_taskid_t *  taskid 
)

Allocate a new task in the same way as allocate().

However, this _really_ transfers ownership to the client by making it the new task's chief.

Parameters:
taskno if != 0, use the specific task number
Return values:
taskid Id of new task assigned to calling client
Returns:
0 on success (taskid contains a valid id), error code otherwise:
  • -L4_ENOTASK no unused task id available

long l4::ts::create ( [in, out] l4_taskid_t *  taskid,
[in] l4_addr_t  entry,
[in] l4_addr_t  stack,
[in] unsigned long  mcp,
[in] l4_taskid_t  pager,
[in] l4_taskid_t  caphandler,
[in] l4_quota_desc_t  kquota,
[in] long  prio,
[in, string] char *  resname,
[in] unsigned long  flags 
)

Create the task.

The taskid must be owned by the client.

Parameters:
taskid Id of pre-allocated task belonging to client
entry Initial instruction pointer of first thread
stack Initial stack pointer of first thread
mcp Maximum allowed priority
pager Id of first thread's pager
caphandler Capfault handler
kquota In-kernel memory quota
prio Priority of first thread
resname Module name as reserved in RMGR.
flags Flags

long l4::ts::free ( [in] l4_taskid_t  taskid  ) 

Free previously allocated task id.

Parameters:
taskid Id of the task to free.
Returns:
0 on success -L4_ENOTFOUND if invalid task

long l4::ts::free2 ( [in] l4_taskid_t  taskid  ) 

Free previously allocated task id and return chief rights.

Parameters:
taskid Id of the task to free.
Returns:
0 on success -L4_ENOTFOUND if invalid task

long l4::ts::kill ( [in] l4_taskid_t  taskid,
[in] l4_uint8_t  options 
)

Terminate task.

Parameters:
taskid Task ID of task to kill
options 

long l4::ts::kill_recursive ( [in] l4_taskid_t  taskid  ) 

Terminate all tasks owned tasknr recursivly!

Parameters:
taskid Task ID of task to start from

long l4::ts::owner ( [in] l4_taskid_t  taskid,
[in] l4_taskid_t  owner 
)

Transfer ownership of a task.

Parameters:
taskid Task ID of task which ownership to transfer
owner Task ID of the owner of the task. IF set to L4_NIL_ID, the owner is not checked.

long l4::ts::taskno_to_taskid ( [in] unsigned long  tasknr,
[out] l4_taskid_t *  taskid 
)

Deliver the corresponding task id.

Parameters:
tasknr Task number


The documentation for this interface was generated from the following file:

Generated on Wed Apr 11 06:38:17 2012 for Generic Task Server Protocol by  doxygen 1.5.6