Changeset 7d7c50de in rtems
- Timestamp:
- 05/25/18 12:09:46 (4 years ago)
- Branches:
- 5, master
- Children:
- b8774933
- Parents:
- 75933d5d
- git-author:
- Sebastian Huber <sebastian.huber@…> (05/25/18 12:09:46)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (06/05/18 05:08:40)
- Location:
- cpukit/rtems
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/rtems/Makefile.am
r75933d5d r7d7c50de 184 184 librtems_a_SOURCES += src/status.c 185 185 librtems_a_SOURCES += src/statustext.c 186 librtems_a_SOURCES += src/statustoerrno.c 186 187 187 188 librtems_a_SOURCES += src/getcurrentprocessor.c -
cpukit/rtems/src/status.c
r75933d5d r7d7c50de 15 15 16 16 #include <rtems/rtems/statusimpl.h> 17 #include <errno.h>18 17 19 18 const rtems_status_code _Status_Object_name_errors_to_status[] = { … … 29 28 RTEMS_INVALID_NODE 30 29 }; 31 32 static const int status_code_to_errno [RTEMS_STATUS_CODES_LAST + 1] = {33 [RTEMS_SUCCESSFUL] = 0,34 [RTEMS_TASK_EXITTED] = EIO,35 [RTEMS_MP_NOT_CONFIGURED] = EIO,36 [RTEMS_INVALID_NAME] = EINVAL,37 [RTEMS_INVALID_ID] = EIO,38 [RTEMS_TOO_MANY] = EIO,39 [RTEMS_TIMEOUT] = ETIMEDOUT,40 [RTEMS_OBJECT_WAS_DELETED] = EIO,41 [RTEMS_INVALID_SIZE] = EIO,42 [RTEMS_INVALID_ADDRESS] = EIO,43 [RTEMS_INVALID_NUMBER] = EBADF,44 [RTEMS_NOT_DEFINED] = EIO,45 [RTEMS_RESOURCE_IN_USE] = EBUSY,46 [RTEMS_UNSATISFIED] = ENODEV,47 [RTEMS_INCORRECT_STATE] = EIO,48 [RTEMS_ALREADY_SUSPENDED] = EIO,49 [RTEMS_ILLEGAL_ON_SELF] = EIO,50 [RTEMS_ILLEGAL_ON_REMOTE_OBJECT] = EIO,51 [RTEMS_CALLED_FROM_ISR] = EIO,52 [RTEMS_INVALID_PRIORITY] = EIO,53 [RTEMS_INVALID_CLOCK] = EINVAL,54 [RTEMS_INVALID_NODE] = EINVAL,55 [RTEMS_NOT_CONFIGURED] = ENOSYS,56 [RTEMS_NOT_OWNER_OF_RESOURCE] = EPERM,57 [RTEMS_NOT_IMPLEMENTED] = ENOSYS,58 [RTEMS_INTERNAL_ERROR] = EIO,59 [RTEMS_NO_MEMORY] = ENOMEM,60 [RTEMS_IO_ERROR] = EIO,61 [RTEMS_PROXY_BLOCKING] = EIO62 };63 64 int rtems_status_code_to_errno(rtems_status_code sc)65 {66 if (sc == RTEMS_SUCCESSFUL) {67 return 0;68 } else {69 int eno = EINVAL;70 71 if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {72 eno = status_code_to_errno [sc];73 }74 75 errno = eno;76 77 return -1;78 }79 }
Note: See TracChangeset
for help on using the changeset viewer.