PxDie()

Terminate the calling task.

APPLIES TO

8.2.0

SYNOPSIS
PxError_t PxDie (void);
RETURN VALUES
  • PXROS error code

ERROR CODES

PXERR_MBX_TASKWAITS

There are waiting tasks at the private mailbox

PXERR_TASK_DIESRV_NOT_INITED

dieserver not initialized

PXERR_MBX_ILLMBX

Invalid mailbox in mailbox command

PXERR_MSG_ILLUSER

The calling task is not the user of the message

PXERR_PROT_ILL_HANDLE

The associated protection handle is not valid

PXERR_REQUEST_INVALID_PARAMETER

Request with invalid parameter

PXERR_MSG_ILLMSG

The passed message handle is invalid

PXERR_MSG_ILLOWNER

The message has no owner

PXERR_MC_ILLMC

The memory class for the message is invalid

PXERR_OPOOL_ILLOPOOL

The passed object pool handle is invalid

PXERR_INIT_ILLMCTYPE

The type for PXMcSystemdefault is different from PXMcVarsized, PXMcVarsizedAdjusted and PXMcVarsizedAligned

PXERR_MC_DAMAGED_BLOCK

The block in memory class has been damaged

PXERR_MC_INCONSISTENCY

Inconsistency in memory class: blk

PXERR_MC_ILLALIGN

Invalid memory block or size alignment in memory insert

PXERR_MC_ILLSIZE

Insufficient block size

PXERR_GLOBAL_ILLEGAL_CORE

The requested object pool is not on the same core

PXERR_TASK_ILLTASK

The task is not a valid task object

PXERR_INTERNAL_INCONSISTENCY

Inconsistency of internal structures

DESCRIPTION

PxDie terminates the calling task, queues it for removing by PxDieService and sends the event PXSERVICE_TASK_DIED to the PXROS service task. The PXROS service task must be initialized before calling PxDie. If no error occurs, the call does not return.

IMPLEMENTATION GUIDELINES
Before call
  • No checks necessary.

After call
  • The function does not return on success, else it returns an error, which has to be interpreted (C).

Best Practice
  • No restrictions.

SEE ALSO
USAGE
#include "pxdef.h"

PxError_t err = PxDie();

if (err != PXERR_NOERROR) {
    // Report error
}