tk_set_rid

Set Task Resource ID

[C Language Interface]

ID oldid = tk_set_rid ( ID tskid, ID resid ) ;

[Parameters]

ID tskid Task ID

ID resid New resource ID

[Return Parameters]

ID oldid Old resource ID

or Error Code

[Error Codes]

E_OK Normal completion

E_ID Invalid ID number (tskid or resid is invalid or cannot be used)

E_NOEXS Object does not exist (the task specified in tskidor resid does not exist)

[Description]

Changes the current resource group of the task specified in tskid to the resource group specified in resid. The Resource ID of the old resource group before the change is passed in a return parameter. 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.

[Additional Notes]

In some cases error is not returned even if resid was previously deleted. Whether or not an error code (E_NOEXS) is returned is implementation-dependent. In principle it is the responsibility of the caller not to specify a deleted resource group.

Comments