tk_set_tsp
Set Task Space
ER ercd = tk_set_tsp ( ID tskid, T_TSKSPC *pk_tskspc ) ;
ID tskid Task ID
T_TSKSPC tskspc Task space
typedef struct t_tskspc {
VP uatb; Task space page table address
INT lsid; Task spacE_ID (logical spacE_ID)
} T_TSKSPC;
ER ercd Error code
E_OK Normal completion
E_ID Invalid ID number (tskid is invalid or cannot be used)
E_NOEXS Object does not exist (the task specified in tskid does not exist)
E_PAR Parameter error (pk tskspc is invalid or cannot be used)
Sets the task space of the task specified in tskid.
The invoking task can be specified by setting tskid = TSK_SELF = 0. Note, however, that when a system call is issued from a task-independent portion and tskid = TSK_SELF = 0 is specified, error code E_ID is returned.
The OS is not aware of the e.ects of task space changes. If, for example, a task space is changed while a task is using it for its execution, the task may hang or encounter other problems. The caller is responsible for avoiding such problems.
The accuracy of T_TSKSPC (uatb, lsid) is implementation-dependent, but the above definitions should be followed to the extent possible.

Comments