Return Codes.


Detailed Description

The common return codes and their descriptions are given below.

Error return codes have a major and minor number. The major number provides the error family. The minor number gives more detail.


Defines

#define ERR_MAJOR(x)   (x & (~7) )
#define ERR_MINOR(x)   (x & 7)
#define ILLEGAL_ELEM   ((tid_t) ~0)
#define SUCCESS   0
#define EMINOR_ISR   0x01
#define EMINOR_PRIO_RULE   0x02
#define ERR_LOCK   -8
#define ERR_LOCK_ISR   (ERR_LOCK | EMINOR_ISR)
#define ERR_LOCK_PRIO_CEIL   (ERR_LOCK | EMINOR_PRIO_RULE)
#define ERR_WOULDBLOCK   -16
#define ERR_WOULDBLOCK_ISR   (ERR_WOULDBLOCK | EMINOR_ISR)
#define ERR_WOULDBLOCK_MUTEX   (ERR_WOULDBLOCK | EMINOR_PRIO_RULE)
#define ERR_FULL   -24
#define ERR_NOTOWNER   -32
#define ERR_TIMEOUT   -40
#define ERR_RESUMED   -48
#define ERR_NOSUCHTASK   -56
#define ERR_TASKBLOCKED   -64
#define ERR_PRIO_IN_USE   -72
#define ERR_FAILED   -80


Define Documentation

#define ERR_MAJOR (  )     (x & (~7) )

Extract the major error code out of the return value.

Definition at line 1273 of file tiros.h.

#define ERR_MINOR (  )     (x & 7)

Extract the minor error code out of the return value.

Definition at line 1275 of file tiros.h.

#define ILLEGAL_ELEM   ((tid_t) ~0)

Notation for an invalid task.

Definition at line 1279 of file tiros.h.

#define SUCCESS   0

Return code success.

Definition at line 1283 of file tiros.h.

#define EMINOR_ISR   0x01

Minor error code indicating that error occurence was due to invocation from an ISR.

Definition at line 1287 of file tiros.h.

#define EMINOR_PRIO_RULE   0x02

Minor error code indicating that action would violate rules to prevent priority inversion.

Definition at line 1291 of file tiros.h.

#define ERR_LOCK   -8

Mutex locking error.

Definition at line 1297 of file tiros.h.

#define ERR_LOCK_ISR   (ERR_LOCK | EMINOR_ISR)

Mutex locking error: locking from ISR.

Definition at line 1300 of file tiros.h.

#define ERR_LOCK_PRIO_CEIL   (ERR_LOCK | EMINOR_PRIO_RULE)

Mutex locking error: denied by priority ceiling.

Definition at line 1303 of file tiros.h.

#define ERR_WOULDBLOCK   -16

Operation would cause blocking, option O_NONBLOCKING specified.

Definition at line 1309 of file tiros.h.

#define ERR_WOULDBLOCK_ISR   (ERR_WOULDBLOCK | EMINOR_ISR)

This has been called from an ISR but would result in blocking.

Definition at line 1312 of file tiros.h.

#define ERR_WOULDBLOCK_MUTEX   (ERR_WOULDBLOCK | EMINOR_PRIO_RULE)

This call would block and is denied because a Mutex is being held.

The current combination of synchronization primitives would result in the unwanted blocking of a mutex.

Definition at line 1317 of file tiros.h.

#define ERR_FULL   -24

A message queue is full or a counting semaphore is maxed out.

Definition at line 1324 of file tiros.h.

#define ERR_NOTOWNER   -32

Failure: Not the owner of the specified mutex, or the mutex is not locked.

Definition at line 1330 of file tiros.h.

#define ERR_TIMEOUT   -40

A timeout has occured.

Definition at line 1335 of file tiros.h.

#define ERR_RESUMED   -48

Task was resumed while sleeping or waiting for a lock.

Definition at line 1338 of file tiros.h.

#define ERR_NOSUCHTASK   -56

Specified task does not exist.

Definition at line 1342 of file tiros.h.

#define ERR_TASKBLOCKED   -64

The operation cannot be completed because a specified task is blocked.

Definition at line 1347 of file tiros.h.

#define ERR_PRIO_IN_USE   -72

The operation failed because the desired priority is in use.

Definition at line 1350 of file tiros.h.

#define ERR_FAILED   -80

Failure: reason unspecified.

Definition at line 1353 of file tiros.h.


TiROS User Manual: Last Updated on Fri Jul 20 10:52:24 2007