T-Kernel/DS Functions

This chapter describes details of the functions provided by T-Kernel Debugger Support (T-Kernel/DS).

T-Kernel/DS provides functions enabling a debugger to reference T-Kernel internal states and run a trace. The functions provided by T-Kernel/DS are only for debugger use and not for use by applications or other programs.

NoteOverall Note and Supplement
 

  • Except where otherwise noted, T-Kernel/DS system calls (td_...) can be called from a task independent portion and while dispatching and interrupts are disabled.

    There may be some limitations, however, imposed by particular implementations.

  • When T-Kernel/DS system calls (td_...) are invoked in interrupts disabled state, they are processed without enabling interrupts. Other kernel states likewise remain unchanged during this processing. Changes in kernel states may occur if a service call is invoked while interrupts or dispatching are enabled, since the kernel continues operating.

  • T-Kernel/DS system calls (td_...) cannot be invoked from a lower protection level than that at which T-Kernel/OS system calls can be invoked (lower than TSVCLimit)(E_OACV).

  • Error codes such as E_PAR, E_MACV, and E_CTX that can be returned in many situations are not described here always unless there is some special reason for doing so.

  • Detection of error codes E_PAR, E_MACV, and E_CTX is implementation-dependent; these may not always be detected as error. For this reason, the service calls must not be invoked in such a way that these errors might occur.

Kernel Internal State Acquisition Functions

Kernel internal state reference functions are functions for enabling a debugger to get T-Kernel internal states. They include functions for getting a list of objects, getting task precedence, getting the order in which tasks are queued, getting the status of objects, system, and task registers, and getting time.

td_lst_tsk - Reference Task ID List

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_lst_tsk (ID list[], INT nent );

Parameter

ID list[] ListLocation of task ID list
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of used tasks
orError CodeError code

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the currently used tasks, and puts in list up to nent IDs. The number of the used tasks is passed in the return code. If return code > nent, this means not all task IDs could be retrieved.

td_lst_sem - Reference Semaphore ID List

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_lst_sem (ID list[], INT nent );

Parameter

ID list[] ListLocation of semaphore ID list
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of used semaphores
orError CodeError code

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the currently used semaphores, and puts in list up to nent IDs. The number of the used semaphores is passed in the return code. If return code > nent, this means not all semaphore IDs could be retrieved.

td_lst_flg - Reference Event Flag ID List

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_lst_flg (ID list[], INT nent );

Parameter

ID list[] ListLocation of event flag ID list
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of used event flags
orError CodeError code

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the currently used event flags, and puts in list up to nent IDs. The number of the used event flags is passed in the return code. If return code > nent, this means not all event flag IDs could be retrieved.

td_lst_mbx - Reference Mailbox ID List

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_lst_mbx (ID list[], INT nent );

Parameter

ID list[] ListLocation of mailbox ID list
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of used mailboxes
orError CodeError code

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the currently used mailboxes, and puts in list up to nent IDs. The number of the used mailboxes is passed in the return code. If return code > nent, this means not all mailbox IDs could be retrieved.

td_lst_mtx - Reference Mutex ID List

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_lst_mtx (ID list[], INT nent );

Parameter

ID list[] ListLocation of mutex ID list
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of used mutexes
orError CodeError code

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the currently used mutexes, and puts in list up to nent IDs. The number of the used mutexes is passed in the return code. If return code > nent, this means not all mutex IDs could be retrieved.

td_lst_mbf - Reference Message Buffer ID List

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_lst_mbf (ID list[], INT nent );

Parameter

ID list[] ListLocation of message buffer ID list
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of used message buffers
orError CodeError code

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the currently used message buffers, and puts in list up to nent IDs. The number of the used message buffers is passed in the return code. If return code > nent, this means not all message buffer IDs could be retrieved.

td_lst_por - Reference Rendezvous Port ID List

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_lst_por (ID list[], INT nent );

Parameter

ID list[] ListLocation of rendezvous port ID list
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of used rendezvous ports
orError CodeError code

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the currently used rendezvous ports, and puts in list up to nent IDs. The number of the used rendezvous ports is passed in the return code. If return code > nent, this means not all rendezvous port IDs could be retrieved.

td_lst_mpf - Reference Fixed-size Memory Pool ID List

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_lst_mpf (ID list[], INT nent );

Parameter

ID list[] ListLocation of fixed-size memory pool ID list
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of used fixed-size memory pools
orError CodeError code

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the currently used fixed-size memory pools, and puts in list up to nent IDs. The number of the used fixed-size memory pools is passed in the return code. If return code > nent, this means not all fixed-size memory pool IDs could be retrieved.

td_lst_mpl - Reference Variable-size Memory Pool ID List

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_lst_mpl (ID list[], INT nent );

Parameter

ID list[] ListLocation of variable-size memory pool ID list
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of used variable-size memory pools
orError CodeError code

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the currently used variable-size memory pools, and puts in list up to nent IDs. The number of the used variable-size memory pools is passed in the return code. If return code > nent, this means not all variable-size memory pool IDs could be retrieved.

td_lst_cyc - Reference Cyclic Handler ID List

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_lst_cyc (ID list[], INT nent );

Parameter

ID list[] ListLocation of cyclic handler ID list
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of used cyclic handlers
orError CodeError code

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the currently used cyclic handlers, and puts in list up to nent IDs. The number of the used cyclic handlers is passed in the return code. If return code > nent, this means not all cyclic handler IDs could be retrieved.

td_lst_alm - Reference Alarm Handler ID List

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_lst_alm (ID list[], INT nent );

Parameter

ID list[] ListLocation of alarm handler ID list
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of used alarm handlers
orError CodeError code

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the currently used alarm handlers, and puts in list up to nent IDs. The number of the used alarm handlers is passed in the return code. If return code > nent, this means not all alarm handler IDs could be retrieved.

td_lst_ssy - Reference Subsystem ID List

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_lst_ssy (ID list[], INT nent );

Parameter

ID list[] ListLocation of subsystem ID list
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of used subsystems
orError CodeError code

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the currently used subsystems, and puts in list up to nent IDs. The number of the used subsystems is passed in the return code. If return code > nent, this means not all subsystem IDs could be retrieved.

td_rdy_que - Reference Task Precedence

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_rdy_que (PRI pri , ID list[], INT nent );

Parameter

PRI pri Task PriorityTask priority
ID list[] Task ID ListLocation of task ID list
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of tasks with priority pri in a run state
orError CodeError code

Error Code

E_PAR Parameter error (pri is invalid or cannot be used)

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets a list of IDs of the tasks in a run state (READY state or RUNNING state) whose task priority is pri, arranged in the order from the highest to the lowest precedence.

This function stores in list up to nent task IDs, arranged in the order of precedence starting from the highest-precedence task ID at the head of the list.

The number of tasks in a run state with priority pri is passed in the return code. If return code > nent, this means not all task IDs could be retrieved.

td_sem_que - Reference Semaphore Queue

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_sem_que (ID semid , ID list[], INT nent );

Parameter

ID semid Semaphore IDTarget semaphore ID
ID list[] Task ID ListLocation of waiting task IDs
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of waiting tasks
orError CodeError code

Error Code

E_ID Invalid ID number (semid is invalid or cannot be used)
E_NOEXS Object does not exist (the semaphore specified in semid does not exist)

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the queued tasks waiting for a semaphore specified in semid. This function stores in list up to nent task IDs, arranged in the order in which tasks are queued, starting from the first task in the semaphore queue. The number of the tasks in the semaphore queue is passed in the return code. If return code > nent, this means not all task IDs could be retrieved.

td_flg_que - Reference Event Flag Queue

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_flg_que (ID flgid , ID list[], INT nent );

Parameter

ID flgid EventFlag IDTarget event flag ID
ID list[] Task ID ListLocation of waiting task IDs
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of waiting tasks
orError CodeError code

Error Code

E_ID Invalid ID number (flgid is invalid or cannot be used)
E_NOEXS Object does not exist (the event flag specified in flgid does not exist)

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the queued tasks waiting for an event flag specified in flgid. This function stores in list up to nent task IDs, arranged in the order in which tasks are queued, starting from the first task in the event flag queue. The number of the tasks in the event flag queue is passed in the return code. If return code > nent, this means not all task IDs could be retrieved.

td_mbx_que - Reference Mailbox Queue

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_mbx_que (ID mbxid , ID list[], INT nent );

Parameter

ID mbxid Mailbox IDTarget mailbox ID
ID list[] Task ID ListLocation of waiting task IDs
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of waiting tasks
orError CodeError code

Error Code

E_ID Invalid ID number (mbxid is invalid or cannot be used)
E_NOEXS Object does not exist (the mailbox specified in mbxid does not exist)

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the queued tasks waiting for a mailbox specified in mbxid. This function stores in list up to nent task IDs, arranged in the order in which tasks are queued, starting from the first task in the mailbox queue. The number of the tasks in the mailbox queue is passed in the return code. If return code > nent, this means not all task IDs could be retrieved.

td_mtx_que - Reference Mutex Queue

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_mtx_que (ID mtxid , ID list[], INT nent );

Parameter

ID mtxid Mutex IDTarget mutex ID
ID list[] Task ID ListLocation of waiting task IDs
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of waiting tasks
orError CodeError code

Error Code

E_ID Invalid ID number (mtxid is invalid or cannot be used)
E_NOEXS Object does not exist (the mutex specified in mtxid does not exist)

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the queued tasks waiting for a mutex specified in mtxid. This function stores in list up to nent task IDs, arranged in the order in which tasks are queued, starting from the first task in the mutex queue. The number of the tasks in the mutex queue is passed in the return code. If return code > nent, this means not all task IDs could be retrieved.

td_smbf_que - Reference Message Buffer Send Queue

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_smbf_que (ID mbfid , ID list[], INT nent );

Parameter

ID mbfid Message Buffer IDTarget message buffer ID
ID list[] Task ID ListLocation of waiting task IDs
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of waiting tasks
orError CodeError code

Error Code

E_ID Invalid ID number (mbfid is invalid or cannot be used)
E_NOEXS Object does not exist (the message buffer specified in mbfid does not exist)

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the queued tasks waiting for sending a message to a message buffer specified in mbfid. This function stores in list up to nent task IDs, arranged in the order in which tasks are queued, starting from the first task in the message buffer send queue. The number of the tasks in the message buffer send queue is passed in the return code. If return code > nent, this means not all task IDs could be retrieved.

td_rmbf_que - Reference Message Buffer Receive Queue

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_rmbf_que (ID mbfid , ID list[], INT nent );

Parameter

ID mbfid Message Buffer IDTarget message buffer ID
ID list[] Task ID ListLocation of waiting task IDs
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of waiting tasks
orError CodeError code

Error Code

E_ID Invalid ID number (mbfid is invalid or cannot be used)
E_NOEXS Object does not exist (the message buffer specified in mbfid does not exist)

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the queued tasks waiting for receiving a message from a message buffer specified in mbfid. This function stores in list up to nent task IDs, arranged in the order in which tasks are queued, starting from the first task in the message buffer receive queue. The number of the tasks in the message buffer receive queue is passed in the return code. If return code > nent, this means not all task IDs could be retrieved.

td_cal_que - Reference Call Queue

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_cal_que (ID porid , ID list[], INT nent );

Parameter

ID porid Port IDTarget rendezvous port ID
ID list[] Task ID ListLocation of waiting task IDs
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of waiting tasks
orError CodeError code

Error Code

E_ID Invalid ID number (porid is invalid or cannot be used)
E_NOEXS Object does not exist (the rendezvous port specified in porid does not exist)

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the queued tasks waiting for rendezvous call at a port specified in porid. This function stores in list up to nent task IDs, arranged in the order in which tasks are queued, starting from the first task in the rendezvous call queue. The number of the tasks in the rendezvous call queue is passed in the return code. If return code > nent, this means not all task IDs could be retrieved.

td_acp_que - Reference Accept Queue

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_acp_que (ID porid , ID list[], INT nent );

Parameter

ID porid Port IDTarget rendezvous port ID
ID list[] Task ID ListLocation of waiting task IDs
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of waiting tasks
orError CodeError code

Error Code

E_ID Invalid ID number (porid is invalid or cannot be used)
E_NOEXS Object does not exist (the rendezvous port specified in porid does not exist)

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the queued tasks waiting for rendezvous acceptance at a port specified in porid. This function stores in list up to nent task IDs, arranged in the order in which tasks are queued, starting from the first task in the rendezvous acceptance queue. The number of the tasks in the rendezvous acceptance queue is passed in the return code. If return code > nent, this means not all task IDs could be retrieved.

td_mpf_que - Reference Fixed-size Memory Pool Queue

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_mpf_que (ID mpfid , ID list[], INT nent );

Parameter

ID mpfid Memory Pool IDTarget fixed-size memory pool ID
ID list[] Task ID ListLocation of waiting task IDs
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of waiting tasks
orError CodeError code

Error Code

E_ID Invalid ID number (mpfid is invalid or cannot be used)
E_NOEXS Object does not exist (the fixed-size memory pool specified in mpfid does not exist)

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the queued tasks waiting for allocation in a fixed-size memory pool specified in mpfid. This function stores in list up to nent task IDs, arranged in the order in which tasks are queued, starting from the first task in the fixed-size memory pool queue. The number of the tasks in the fixed-size memory pool queue is passed in the return code. If return code > nent, this means not all task IDs could be retrieved.

td_mpl_que - Reference Variable-size Memory Pool Queue

C Language Interface

#include <tk/dbgspt.h>

INT ct = td_mpl_que (ID mplid , ID list[], INT nent );

Parameter

ID mplid Memory Pool IDTarget variable-size memory pool ID
ID list[] Task ID ListLocation of waiting task IDs
INT nent Number of List Entries Maximum number of entries in list

Return Parameter

INT ct CountNumber of waiting tasks
orError CodeError code

Error Code

E_ID Invalid ID number (mplid is invalid or cannot be used)
E_NOEXS Object does not exist (the variable-size memory pool specified in mplid does not exist)

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the list of the IDs of the queued tasks waiting for allocation in a variable-size memory pool specified in mplid. This function stores in list up to nent task IDs, arranged in the order in which tasks are queued, starting from the first task in the variable-size memory pool queue. The number of the tasks in the variable-size memory pool queue is passed in the return code. If return code > nent, this means not all task IDs could be retrieved.

td_ref_tsk - Reference Task Status

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_ref_tsk (ID tskid , TD_RTSK *rtsk );

Parameter

ID tskid Task IDTarget task ID (TSK_SELF can be specified)
TD_RTSK* rtsk Packet to Return Task StatusPointer to the area to return the task status

Return Parameter

ER ercd Error CodeError code

rtsk Detail:

void* exinf Extended InformationExtended information
PRI tskpri Task PriorityCurrent priority
PRI tskbpri Task Base PriorityBase priority
UINT tskstat Task StateTask States
UINT tskwait Task Wait FactorWait factor
ID wid Waiting Object IDWaiting object ID
INT wupcnt Wakeup CountWakeup request queuing count
INT suscnt Suspend CountSuspend request nesting count
RELTIM slicetime Slice TimeMaximum continuous run time (in ms)
UINT waitmask Wait MaskDisabled wait factors
UINT texmask Task Exception MaskAllowed task exceptions
UINT tskevent Task EventRaised task event
FP task Task Start AddressTask start address
INT stksz User Stack SizeUser stack size (in bytes)
INT sstksz System Stack SizeSystem stack size (in bytes)
void* istack Initial User Stack PointerUser stack pointer initial value
void* isstack Initial System Stack PointerSystem stack pointer initial value

Error Code

E_OK Normal completion
E_ID Bad identifier
E_NOEXS Object does not exist

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the state of the task designated in tskid. This function is similar to tk_ref_tsk(), with the task start address and stack information added to the state information obtained.

The stack area extends from the stack pointer initial value toward the low addresses for the number of bytes designated as the stack size.

  • istack - stksz ≦ user stack area < istack

  • isstack - sstksz ≦ system stack area < isstack

Note that the stack pointer initial value (istack, isstack) is not the same as its current position. The stack area may be used even before a task is started. Calling td_get_reg() gets the stack pointer current position.

slicetime in the task status information (TD_RTSK) returns a value rounded to milliseconds. To know the value in microseconds, call td_ref_tsk_u.

td_ref_tsk_u - Reference Task Status (Microseconds)

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_ref_tsk_u (ID tskid , TD_RTSK_U *rtsk_u );

Parameter

ID tskid Task IDTarget task ID (TSK_SELF can be specified)
TD_RTSK_U* rtsk_u Packet to Return Task StatusPointer to the area to return the task status

Return Parameter

ER ercd Error CodeError code

rtsk_u Detail:

void* exinf Extended InformationExtended information
PRI tskpri Task PriorityCurrent priority
PRI tskbpri Task Base PriorityBase priority
UINT tskstat Task StateTask States
UINT tskwait Task Wait FactorWait factor
ID wid Waiting Object IDWaiting object ID
INT wupcnt Wakeup CountWakeup request queuing count
INT suscnt Suspend CountSuspend request nesting count
RELTIM_U slicetime_u Slice TimeMaximum continuous run time (in microseconds)
UINT waitmask Wait MaskDisabled wait factors
UINT texmask Task Exception MaskAllowed task exceptions
UINT tskevent Task EventRaised task event
FP task Task Start AddressTask start address
INT stksz User Stack SizeUser stack size (in bytes)
INT sstksz System Stack SizeSystem stack size (in bytes)
void* istack Initial User Stack PointerUser stack pointer initial value
void* isstack Initial System Stack PointerSystem stack pointer initial value

Error Code

E_OK Normal completion
E_ID Bad identifier
E_NOEXS Object does not exist

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

This system call takes slicetime_u in 64-bit microseconds instead of the return parameter slicetime of td_ref_tsk.

The specification of this system call is same as that of td_ref_tsk, except that a field in the return parameter is replaced with slicetime_u. For more details, see the description of td_ref_tsk.

Difference from T-Kernel 1.0

This system call was added in T-Kernel 2.0.

td_ref_tex - Reference Task Exception Status

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_ref_tex (ID tskid , TD_RTEX *pk_rtex );

Parameter

ID tskid Task IDTarget task ID (TSK_SELF can be specified)
TD_RTEX* pk_rtex Packet to Return Task Exception StatusPointer to the area to return the task exception status

Return Parameter

ER ercd Error CodeError code

pk_rtex Detail:

UINT pendtex Pending Task ExceptionPending task exceptions
UINT texmask Task Exception MaskAllowed task exceptions

Error Code

E_OK Normal completion
E_ID Bad identifier
E_NOEXS Object does not exist

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the task exception status. This is similar to tk_ref_tex().

td_ref_sem - Reference Semaphore Status

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_ref_sem (ID semid , TD_RSEM *rsem );

Parameter

ID semid Semaphore IDTarget semaphore ID
TD_RSEM* rsem Packet to Return Semaphore StatusPointer to the area to return the semaphore status

Return Parameter

ER ercd Error CodeError code

rsem Detail:

void* exinf Extended InformationExtended information
ID wtsk Wait Task InformationWaiting task ID
INT semcnt Semaphore Countcurrent semaphore count value

Error Code

E_OK Normal completion
E_ID Bad identifier
E_NOEXS Object does not exist

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

References the semaphore status. This is similar to tk_ref_sem().

td_ref_flg - Reference Event Flag Status

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_ref_flg (ID flgid , TD_RFLG *rflg );

Parameter

ID flgid EventFlag IDTarget event flag ID
TD_RFLG* rflg Packet to Return EventFlag StatusPointer to the area to return the event flag status

Return Parameter

ER ercd Error CodeError code

rflg Detail:

void* exinf Extended InformationExtended information
ID wtsk Wait Task InformationWaiting task ID
UINT flgptn EventFlag Bit PatternThe current event flag bit pattern

Error Code

E_OK Normal completion
E_ID Bad identifier
E_NOEXS Object does not exist

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

References the event flag status. This is similar to tk_ref_flg().

td_ref_mbx - Reference Mailbox Status

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_ref_mbx (ID mbxid , TD_RMBX *rmbx );

Parameter

ID mbxid Mailbox IDTarget mailbox ID
TD_RMBX* rmbx Packet to Return Mailbox StatusPointer to the area to return the mailbox status

Return Parameter

ER ercd Error CodeError code

rmbx Detail:

void* exinf Extended InformationExtended information
ID wtsk Wait Task InformationWaiting task ID
T_MSG* pk_msg Packet of MessageNext message to be received

Error Code

E_OK Normal completion
E_ID Bad identifier
E_NOEXS Object does not exist

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

References the mailbox status. This is similar to tk_ref_mbx().

td_ref_mtx - Refer Mutex Status

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_ref_mtx (ID mtxid , TD_RMTX *rmtx );

Parameter

ID mtxid Mutex IDTarget mutex ID
TD_RMTX* rmtx Packet to Return Mutex StatusPointer to the area to return the mutex status

Return Parameter

ER ercd Error CodeError code

rmtx Detail:

void* exinf Extended InformationExtended information
ID htsk Locking Task IDID of task locking the mutex
ID wtsk Lock Waiting Task IDID of tasks waiting to lock the mutex

Error Code

E_OK Normal completion
E_ID Bad identifier
E_NOEXS Object does not exist

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

References the mutex status. This is similar to tk_ref_mtx().

td_ref_mbf - Reference Message Buffer Status

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_ref_mbf (ID mbfid , TD_RMBF *rmbf );

Parameter

ID mbfid Message Buffer IDTarget message buffer ID
TD_RMBF* rmbf Packet to Return Message Buffer StatusPointer to the area to return the message buffer status

Return Parameter

ER ercd Error CodeError code

rmbf Detail:

void* exinf Extended InformationExtended information
ID wtsk Wait Task InformationReceive wait task ID
ID stsk Send Task InformationSend wait task ID
INT msgsz Message SizeSize of the next message to be received (in bytes)
INT frbufsz Free Buffer SizeFree buffer size (in bytes)
INT maxmsz Maximum Message SizeMaximum message size (in bytes)

Error Code

E_OK Normal completion
E_ID Bad identifier
E_NOEXS Object does not exist

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

References the message buffer status. This is similar to tk_ref_mbf().

td_ref_por - Reference Port Status

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_ref_por (ID porid , TD_RPOR *rpor );

Parameter

ID porid Port IDTarget rendezvous port ID
TD_RPOR* rpor Packet to Return Port StatusPointer to the area to return the rendezvous port status

Return Parameter

ER ercd Error CodeError code

rpor Detail:

void* exinf Extended InformationExtended information
ID wtsk Wait Task InformationCall waiting task ID
ID atsk Accept Task InformationAccept waiting task ID
INT maxcmsz Maximum Call Message SizeMaximum call message size (in bytes)
INT maxrmsz Maximum Reply Message SizeMaximum reply message size (in bytes)

Error Code

E_OK Normal completion
E_ID Bad identifier
E_NOEXS Object does not exist

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

References the rendezvous port status. This is similar to tk_ref_por().

td_ref_mpf - Reference Fixed-size Memory Pool Status

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_ref_mpf (ID mpfid , TD_RMPF *rmpf );

Parameter

ID mpfid Memory Pool IDTarget fixed-size memory pool ID
TD_RMPF* rmpf Packet to Return Memory Pool StatusPointer to the area to return the memory pool status

Return Parameter

ER ercd Error CodeError code

rmpf Detail:

void* exinf Extended InformationExtended information
ID wtsk Wait Task InformationWaiting task ID
INT frbcnt Free Block CountFree block count

Error Code

E_OK Normal completion
E_ID Bad identifier
E_NOEXS Object does not exist

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

References the fixed-size memory pool status. This is similar to tk_ref_mpf().

td_ref_mpl - Reference Variable-size Memory Pool Status

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_ref_mpl (ID mplid , TD_RMPL *rmpl );

Parameter

ID mplid Memory Pool IDTarget variable-size memory pool ID
TD_RMPL* rmpl Packet to Return Memory Pool StatusPointer to the area to return the memory pool status

Return Parameter

ER ercd Error CodeError code

rmpl Detail:

void* exinf Extended InformationExtended information
ID wtsk Wait Task InformationWaiting task ID
INT frsz Free Memory SizeFree memory size (in bytes)
INT maxsz Max Memory SizeMaximum memory space size (in bytes)

Error Code

E_OK Normal completion
E_ID Bad identifier
E_NOEXS Object does not exist

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

References the variable-size memory pool status. This is similar to tk_ref_mpl().

td_ref_cyc - Reference Cyclic Handler Status

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_ref_cyc (ID cycid , TD_RCYC *rcyc );

Parameter

ID cycid Cyclic Handler IDTarget cyclic handler ID
TD_RCYC* rcyc Packet to Return Cyclic Handler StatusPointer to the area to return the cyclic handler status

Return Parameter

ER ercd Error CodeError code

rcyc Detail:

void* exinf Extended InformationExtended information
RELTIM lfttim Left TimeTime remaining until the next handler starts (ms)
UINT cycstat Cyclic Handler StatusCyclic handler activation state

Error Code

E_OK Normal completion
E_ID Bad identifier
E_NOEXS Object does not exist

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

References the cyclic handler status. This is similar to tk_ref_cyc().

The time remaining lfttim returned in the cyclic handler status information (TD_RCYC) obtained by td_ref_cyc is a value rounded to milliseconds. To know the value in microseconds, call td_ref_cyc_u.

td_ref_cyc_u - Reference Cyclic Handler Status (Microseconds)

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_ref_cyc_u (ID cycid , TD_RCYC_U *rcyc_u );

Parameter

ID cycid Cyclic Handler IDTarget cyclic handler ID
TD_RCYC_U* rcyc_u Packet to Return Cyclic Handler StatusPointer to the area to return the cyclic handler status

Return Parameter

ER ercd Error CodeError code

rcyc_u Detail:

void* exinf Extended InformationExtended information
RELTIM_U lfttim_u Left TimeTime remaining until the next handler starts (microseconds)
UINT cycstat Cyclic Handler StatusCyclic handler activation state

Error Code

E_OK Normal completion
E_ID Bad identifier
E_NOEXS Object does not exist

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

This system call takes 64-bit lfttim_u in microseconds instead of the return parameter lfttim of td_ref_cyc.

The specification of this system call is same as that of td_ref_cyc, except that the return parameter is replaced with lfttim_u. For more details, see the description of td_ref_cyc.

Difference from T-Kernel 1.0

This system call was added in T-Kernel 2.0.

td_ref_alm - Reference Alarm Handler Status

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_ref_alm (ID almid , TD_RALM *ralm );

Parameter

ID almid Alarm Handler IDTarget alarm handler ID
TD_RALM* ralm Packet to Return Alarm Handler StatusPointer to the area to return the alarm handler status

Return Parameter

ER ercd Error CodeError code

ralm Detail:

void* exinf Extended InformationExtended information
RELTIM lfttim Left TimeTime remaining until the handler starts (ms)
UINT almstat Alarm Handler StatusAlarm handler activation state

Error Code

E_OK Normal completion
E_ID Bad identifier
E_NOEXS Object does not exist

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

References the alarm handler status. This is similar to tk_ref_alm().

The time remaining lfttim returned in the alarm handler status information (TD_RALM) obtained by td_ref_alm is a value rounded to milliseconds. To know the value in microseconds, call td_ref_alm_u.

td_ref_alm_u - Reference Alarm Handler Status (Microseconds)

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_ref_alm_u (ID almid , TD_RALM_U *ralm_u );

Parameter

ID almid Alarm Handler IDTarget alarm handler ID
TD_RALM_U* ralm_u Packet to Return Alarm Handler StatusPointer to the area to return the alarm handler status

Return Parameter

ER ercd Error CodeError code

ralm_u Detail:

void* exinf Extended InformationExtended information
RELTIM_U lfttim_u Left TimeTime remaining until the handler starts (microseconds)
UINT almstat Alarm Handler StatusAlarm handler activation state

Error Code

E_OK Normal completion
E_ID Bad identifier
E_NOEXS Object does not exist

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

This system call takes 64-bit lfttim_u in microseconds instead of the return parameter lfttim of td_ref_alm.

The specification of this system call is same as that of td_ref_alm, except that the return parameter is replaced with lfttim_u. For more details, see the description of td_ref_alm.

Difference from T-Kernel 1.0

This system call was added in T-Kernel 2.0.

td_ref_sys - Reference System Status

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_ref_sys (TD_RSYS *pk_rsys );

Parameter

TD_RSYS* pk_rsys Packet to Return System StatusPointer to the area to return the system status

Return Parameter

ER ercd Error CodeError code

pk_rsys Detail:

INT sysstat System StateSystem States
ID runtskid Running Task IDID of the task currently in RUNNING state
ID schedtskid Scheduled Task IDID of the task scheduled to run next

Error Code

E_OK Normal completion

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the system status. This is similar to tk_ref_sys().

td_ref_ssy - Reference Subsystem Status

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_ref_ssy (ID ssid , TD_RSSY *rssy );

Parameter

ID ssid Subsystem IDTarget subsystem ID
TD_RSSY* rssy Packet to Return Subsystem StatusPointer to the area to return the subsystem definition information

Return Parameter

ER ercd Error CodeError code

rssy Detail:

PRI ssypri Subsystem PrioritySubsystem priority
INT resblksz Resource Control Block SizeResource control block size (in bytes)

Error Code

E_OK Normal completion
E_ID Bad identifier
E_NOEXS Object does not exist

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

References the subsystem status. This is similar to tk_ref_ssy().

td_inf_tsk - Reference Task Statistics

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_inf_tsk (ID tskid , TD_ITSK *pk_itsk , BOOL clr );

Parameter

ID tskid Task IDTarget task ID (TSK_SELF can be specified)
TD_ITSK* pk_itsk Packet to Return Task StatisticsPointer to the area to return the task statistics
BOOL clr ClearTask statistics clear flag

Return Parameter

ER ercd Error CodeError code

pk_itsk Detail:

RELTIM stime System TimeCumulative system-level run time (ms)
RELTIM utime User TimeCumulative user-level run time (ms)

Error Code

E_OK Normal completion
E_ID Bad identifier
E_NOEXS Object does not exist

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets task statistics. This is similar to tk_inf_tsk(). If clr = TRUE (≠ 0), the cumulative information is reset (cleared to 0) after the information is obtained.

stime and utime in the task statistics (TD_ITSK) return values rounded to milliseconds. To know the value in microseconds, call td_inf_tsk_u.

td_inf_tsk_u - Reference Task Statistics (Microseconds)

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_inf_tsk_u (ID tskid , TD_ITSK_U *itsk_u , BOOL clr );

Parameter

ID tskid Task IDTarget task ID (TSK_SELF can be specified)
TD_ITSK_U* itsk_u Packet to Return Task StatisticsPointer to the area to return the task statistics
BOOL clr ClearTask statistics clear flag

Return Parameter

ER ercd Error CodeError code

itsk_u Detail:

RELTIM_U stime_u System TimeCumulative system-level run time (in microseconds)
RELTIM_U utime_u User TimeCumulative user-level run time (in microseconds)

Error Code

E_OK Normal completion
E_ID Bad identifier
E_NOEXS Object does not exist

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

This system call takes 64-bit stime_u and utime_u in microseconds instead of the return parameters stime and utime of td_inf_tsk.

The specification of this system call is same as that of td_inf_tsk, except that the return parameters are replaced with stime_u and utime_u. For more details, see the description of td_inf_tsk.

Difference from T-Kernel 1.0

This system call was added in T-Kernel 2.0.

td_get_reg - Get Task Register

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_get_reg (ID tskid , T_REGS *pk_regs , T_EIT *pk_eit , T_CREGS *pk_cregs );

Parameter

ID tskid Task IDTarget task ID (TSK_SELF cannot be specified)
T_REGS* pk_regs Packet of RegistersPointer to the area to return the general register values
T_EIT* pk_eit Packet of EIT RegistersPointer to the area to return the values of registers saved when an exception occurs
T_CREGS* pk_cregs Packet of Control RegistersPointer to the area to return the control register values

Return Parameter

ER ercd Error CodeError code

The contents of T_REGS, T_EIT, and T_CREGS are defined for each CPU and implementation.

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_OBJ Invalid object state (issued for a RUNNING state task)

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the register values of the task designated in tskid. This is similar to tk_get_reg.

Registers cannot be referenced for the task currently in RUNNING state. Except when a task-independent portion is executing, the current RUNNING state task is the invoking task.

If NULL is set in pk_regs, pk_eit, or pk_cregs, the corresponding registers are not referenced.

The contents of T_REGS, T_EIT, and T_CREGS are implementation-dependent.

td_set_reg - Set Task Registers

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_set_reg (ID tskid , CONST T_REGS *pk_regs , CONST T_EIT *pk_eit , CONST T_CREGS *pk_cregs );

Parameter

ID tskid Task IDTarget task ID (TSK_SELF cannot be specified)
CONST T_REGS* pk_regs Packet of RegistersGeneral registers
CONST T_EIT* pk_eit Packet of EIT RegistersRegisters saved when EIT occurs
CONST T_CREGS* pk_cregs Packet of Control RegistersControl registers

The contents of T_REGS, T_EIT, and T_CREGS are defined for each CPU and implementation.

Return Parameter

ER ercd Error CodeError code

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_OBJ Invalid object state (issued for a RUNNING state task)

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Sets registers of the task designated in tskid. This is similar to tk_set_reg.

Registers cannot be set for the task currently in RUNNING state. Except when a task-independent portion is executing, the current RUNNING state task is the invoking task.

If NULL is set in pk_regs, pk_eit, or pk_cregs, the corresponding registers are not set.

The contents of T_REGS, T_EIT, and T_CREGS are implementation-dependent.

td_get_tim - Get System Time

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_get_tim (SYSTIM *tim , UINT *ofs );

Parameter

SYSTIM* tim TimePointer to the area to return the current time (ms)
UINT* ofs OffsetPointer to the area to return the return parameter ofs

Return Parameter

ER ercd Error CodeError code
SYSTIM tim TimeCurrent time (in milliseconds)
UINT ofs Offset Elapsed time from tim (nanoseconds)

tim Detail:

W hi High 32 bitsHigher 32 bits of current time of the system time
UW lo Low 32 bitsLower 32 bits of current time of the system time

Error Code

E_OK Normal completion

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the current time as total elapsed milliseconds since 0:00:00 (GMT), January 1, 1985. The value returned in tim is the same as that obtained by tk_get_tim(). tim is the resolution of timer interrupt intervals (cycles), but even more precise time information is obtained in ofs as the elapsed time from tim in nanoseconds. The resolution of ofs is implementation-dependent, but generally is the resolution of hardware timer.

Since tim is a cumulative time counted based on timer interrupts, in some cases time is not refreshed, when a timer interrupt cycle arrives while interrupts are disabled and the timer interrupt handler is not started (is delayed). In such cases, the time as updated by the previous timer interrupt is returned in tim, and the elapsed time from the previous timer interrupt is returned in ofs. Accordingly, in some cases ofs will be longer than the timer interrupt cycle. The length of elapsed time that can be measured by ofs depends on the hardware, but preferably it should be possible to measure at least up to twice the timer interrupt cycle (0 ≦ ofs < twice the timer interrupt cycle).

Note that the time returned in tim and ofs is the time at some point between the calling of and return from td_get_tim(). It is neither the time at which td_get_tim() was called nor the time of return from td_get_tim(). In order to obtain more accurate information, this function should be called in interrupts disabled state.

td_get_tim_u - Get System Time (Microseconds)

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_get_tim_u (SYSTIM_U *tim_u , UINT *ofs );

Parameter

SYSTIM_U* tim_u TimePointer to the area to return the current time (microseconds)
UINT* ofs OffsetPointer to the area to return the return parameter ofs

Return Parameter

ER ercd Error CodeError code
SYSTIM_U tim_u TimeCurrent time (in microseconds)
UINT ofs Offset Elapsed time from tim_u (nanoseconds)

Error Code

E_OK Normal completion

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

This system call takes 64-bit tim_u in microseconds instead of the return parameter tim of td_get_tim.

The specification of this system call is same as that of td_get_tim, except that the return parameter is replaced with tim_u. For more details, see the description of td_get_tim.

Difference from T-Kernel 1.0

This system call was added in T-Kernel 2.0.

td_get_otm - Get Operating Time

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_get_otm (SYSTIM *tim , UINT *ofs );

Parameter

SYSTIM* tim TimePointer to the area to return the operating time (ms)
UINT* ofs OffsetPointer to the area to return the return parameter ofs

Return Parameter

ER ercd Error CodeError code
SYSTIM tim TimeOperating time (ms)
UINT ofs Offset Elapsed time from tim (nanoseconds)

tim Detail:

W hi High 32 bitsHigher 32 bits of the system operating time
UW lo Low 32 bitsLower 32 bits of the system operating time

Error Code

E_OK Normal completion

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Gets the system operating time (uptime, as elapsed milliseconds since the system was booted). The value returned in tim is the same as that obtained by tk_get_otm. tim is the resolution of timer interrupt intervals (cycles), but even more precise time information is obtained in ofs as the elapsed time from tim in nanoseconds. The resolution of ofs is implementation-dependent, but generally is the resolution of hardware timer.

Since tim is a cumulative time counted based on timer interrupts, in some cases time is not refreshed, when a timer interrupt cycle arrives while interrupts are disabled and the timer interrupt handler is not started (is delayed). In such cases, the time as updated by the previous timer interrupt is returned in tim, and the elapsed time from the previous timer interrupt is returned in ofs. Accordingly, in some cases ofs will be longer than the timer interrupt cycle. The length of elapsed time that can be measured by ofs depends on the hardware, but preferably it should be possible to measure at least up to twice the timer interrupt cycle (0 ≦ ofs < twice the timer interrupt cycle).

Note that the time returned in tim and ofs is the time at some point between the calling of and return from td_get_otm(). It is neither the time at which td_get_otm() was called nor the time of return from td_get_otm(). In order to obtain more accurate information, this function should be called in interrupts disabled state.

td_get_otm_u - Get Operating Time (Microseconds)

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_get_otm_u (SYSTIM_U *tim_u , UINT *ofs );

Parameter

SYSTIM_U* tim_u TimePointer to the area to return the operating time (microseconds)
UINT* ofs OffsetPointer to the area to return the return parameter ofs

Return Parameter

ER ercd Error CodeError code
SYSTIM_U tim_u TimeOperating time (microseconds)
UINT ofs Offset Elapsed time from tim_u (nanoseconds)

Error Code

E_OK Normal completion

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

This system call takes 64-bit tim_u in microseconds instead of the return parameter tim of td_get_otm.

The specification of this system call is same as that of td_get_otm, except that the return parameter is replaced with tim_u. For more details, see the description of td_get_otm.

Difference from T-Kernel 1.0

This system call was added in T-Kernel 2.0.

td_ref_dsname - Refer to DS Object Name

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_ref_dsname (UINT type , ID id , UB *dsname );

Parameter

UINT type Object TypeTarget object type
ID id Object IDObject ID
UB* dsname DS Object NamePointer to the area to return the DS object name

Return Parameter

ER ercd Error CodeError code

dsname Detail:

DS object name, set at object creation or by td_set_dsname()

Error Code

E_OK Normal completion
E_PAR Invalid object type
E_NOEXS Object does not exist
E_OBJ DS object name is not used

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

References the DS object name (dsname), which is set at object creation. The object is specified by object type (type) and object ID (id).

Object types (type) are as follows:

TN_TSK 0x01Task
TN_SEM 0x02Semaphore
TN_FLG 0x03Event Flag
TN_MBX 0x04Mailbox
TN_MBF 0x05Message Buffer
TN_POR 0x06Rendezvous Port
TN_MTX 0x07Mutex
TN_MPL 0x08Variable-size Memory Pool
TN_MPF 0x09Fixed-size Memory Pool
TN_CYC 0x0aCyclic Handler
TN_ALM 0x0bAlarm Handler

DS object name is valid if TA_DSNAME is set as object attribute. If DS object name is changed by td_set_dsname(), then td_ref_dsname() references the new name.

DS object name needs to satisfy the following conditions:

Available characters (UB)

a to z, A to Z, 0 to 9

Name length

8-byte (filled with NULL for shorter name)

However, character code range is not checked by T-Kernel.

td_set_dsname - Set DS Object Name

C Language Interface

#include <tk/dbgspt.h>

ER ercd = td_set_dsname (UINT type , ID id , CONST UB *dsname );

Parameter

UINT type Object TypeTarget object type
ID id Object IDObject ID
CONST UB* dsname DS Object NameDS object name to be set

Return Parameter

ER ercd Error CodeError code

Error Code

E_OK Normal completion
E_PAR Invalid object type
E_NOEXS Object does not exist
E_OBJ DS object name is not used

Valid Context

Task portionQuasi-task portionTask-independent portion
YESYESYES

Description

Re-sets DS object name (dsname), which is set at object creation. The object is specified by object type (type) and object ID (id).

Object types (type) are as same as that of td_ref_dsname() .

DS object name needs to satisfy the following conditions:

Available characters (UB)

a to z, A to Z, 0 to 9

Name length

8-byte (filled with NULL for shorter name)

However, character code range is not checked by T-Kernel.

DS object name is valid if TA_DSNAME is set as object attribute. td_set_dsname() returns E_OBJ error if TA_DSNAME attribute is not specified.