PxTerminate()

Terminate the calling task and release all its allocated objects.

APPLIES TO

8.2.0

SYNOPSIS
PxError_t PxTerminate (PxBool_t release);
ARGUMENTS
release

If TRUE release all allocated objects of this task

RETURN VALUES
  • Error on failure

  • No return on success

ERROR CODES

All

errors available from Px…​Release and PxMcReturnAllBlks

DESCRIPTION

PxTerminate terminates the calling task and releases all its allocated objects by calling PxMsgReleaseAllMsg and PxSysObjReleaseAllObjects. If the release was successful PxTerminate calls PxDie to schedule the task for deletion. If no error occurs the call does not return.

IMPLEMENTATION GUIDELINES
Before call
  • release must be TRUE or FALSE. This parameter should be a constant (V).

After call
  • On success the function does not return. Any return value describes an error, which has to be interpreted.

Best Practice
  • No restrictions.

SEE ALSO
USAGE
#include "pxdef.h"

PxError_t err = PxTerminate(1);

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