L4Re - L4 Runtime Environment
L4::Thread::Attr Class Reference

Thread attributes used for control_commit(). More...

+ Collaboration diagram for L4::Thread::Attr:

Public Member Functions

 Attr (l4_utcb_t *utcb=l4_utcb()) throw ()
 Create a thread-attribute object with the given UTCB. More...
 
void pager (Cap< void > const &pager) throw ()
 Set the pager capability selector. More...
 
Cap< void > pager () throw ()
 Get the capability selector used for page-fault messages. More...
 
void exc_handler (Cap< void > const &exc_handler) throw ()
 Set the exception-handler capability selector. More...
 
Cap< void > exc_handler () throw ()
 Get the capability selector used for exception messages. More...
 
void bind (l4_utcb_t *thread_utcb, Cap< Task > const &task) throw ()
 Bind the thread to a task. More...
 
void alien (int on) throw ()
 Set the thread to alien mode.
 
void ux_host_syscall (int on) throw ()
 Allow host system calls on Fiasco-UX. More...
 

Friends

class L4::Thread
 

Detailed Description

Thread attributes used for control_commit().

This class is responsible for initializing various attributes of a thread in a UTCB for the control_commit() method.

See also
Thread control for some more details.

Definition at line 125 of file thread.

Constructor & Destructor Documentation

◆ Attr()

L4::Thread::Attr::Attr ( l4_utcb_t utcb = l4_utcb())
throw (
)
inlineexplicit

Create a thread-attribute object with the given UTCB.

Parameters
utcbThe UTCB to use for the later L4::Thread::control_commit() function. Usually this is the UTCB of the calling thread.

Definition at line 138 of file thread.

Member Function Documentation

◆ bind()

void L4::Thread::Attr::bind ( l4_utcb_t thread_utcb,
Cap< Task > const &  task 
)
throw (
)
inline

Bind the thread to a task.

Parameters
thread_utcbThe UTCB address of the thread within the task specified by task.
taskThe capability selector for the task the thread shall be bound to.

Binding a thread to a task means that the thread shall afterwards execute in the given task. To actually start execution you need to use L4::Thread::ex_regs().

Definition at line 191 of file thread.

◆ exc_handler() [1/2]

void L4::Thread::Attr::exc_handler ( Cap< void > const &  exc_handler)
throw (
)
inline

Set the exception-handler capability selector.

Parameters
exc_handlerThe capability selector that shall be used for exception messages. This capability selector must be valid within the task the thread is bound to.

Definition at line 167 of file thread.

◆ exc_handler() [2/2]

Cap<void> L4::Thread::Attr::exc_handler ( )
throw (
)
inline

Get the capability selector used for exception messages.

Returns
The capability selector used to send exception messages. The selector is valid in the task the thread is bound to.

Definition at line 176 of file thread.

◆ pager() [1/2]

void L4::Thread::Attr::pager ( Cap< void > const &  pager)
throw (
)
inline

Set the pager capability selector.

Parameters
pagerThe capability selector that shall be used for page-fault messages. This capability selector must be valid within the task the thread is bound to.

Definition at line 148 of file thread.

◆ pager() [2/2]

Cap<void> L4::Thread::Attr::pager ( )
throw (
)
inline

Get the capability selector used for page-fault messages.

Returns
The capability selector used to send page-fault messages. The selector is valid in the task the thread is bound to.

Definition at line 157 of file thread.

◆ ux_host_syscall()

void L4::Thread::Attr::ux_host_syscall ( int  on)
throw (
)
inline

Allow host system calls on Fiasco-UX.

Precondition
Running on Fiasco-UX.

Definition at line 205 of file thread.


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