[PATCH 3/3] score: Add Status_Control for all APIs
Gedare Bloom
gedare at rtems.org
Wed May 25 14:37:07 UTC 2016
These seem good. Not able to look thoroughly, but fairly mechanical.
On Wed, May 25, 2016 at 9:48 AM, Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
> Unify the status codes of the Classic and POSIX API to use the new enum
> Status_Control. This eliminates the Thread_Control::Wait::timeout_code
> field and the timeout parameter of _Thread_queue_Enqueue_critical() and
> _MPCI_Send_request_packet(). It gets rid of the status code translation
> tables and instead uses simple bit operations to get the status for a
> particular API. This enables translation of status code constants at
> compile time. Add _Thread_Wait_get_status() to avoid direct access of
> thread internal data structures.
> ---
> cpukit/libnetworking/rtems/rtems_glue.c | 16 +--
> cpukit/posix/Makefile.am | 13 +-
> cpukit/posix/include/rtems/posix/barrierimpl.h | 14 --
> cpukit/posix/include/rtems/posix/mqueueimpl.h | 8 --
> cpukit/posix/include/rtems/posix/muteximpl.h | 42 ------
> cpukit/posix/include/rtems/posix/posixapi.h | 25 ++++
> cpukit/posix/include/rtems/posix/rwlockimpl.h | 23 ----
> cpukit/posix/include/rtems/posix/semaphoreimpl.h | 27 ----
> cpukit/posix/include/rtems/posix/spinlockimpl.h | 14 --
> cpukit/posix/src/condwaitsupp.c | 33 +++--
> cpukit/posix/src/mqueuerecvsupp.c | 12 +-
> cpukit/posix/src/mqueuesendsupp.c | 15 +--
> cpukit/posix/src/mqueuetranslatereturncode.c | 65 ---------
> cpukit/posix/src/mutexlocksupp.c | 12 +-
> cpukit/posix/src/mutextranslatereturncode.c | 31 -----
> cpukit/posix/src/mutexunlock.c | 5 +-
> cpukit/posix/src/nanosleep.c | 3 +-
> cpukit/posix/src/pbarriertranslatereturncode.c | 61 ---------
> cpukit/posix/src/pbarrierwait.c | 24 +---
> cpukit/posix/src/prwlockrdlock.c | 12 +-
> cpukit/posix/src/prwlocktimedrdlock.c | 33 ++---
> cpukit/posix/src/prwlocktimedwrlock.c | 33 ++---
> cpukit/posix/src/prwlocktranslatereturncode.c | 47 -------
> cpukit/posix/src/prwlocktryrdlock.c | 12 +-
> cpukit/posix/src/prwlocktrywrlock.c | 12 +-
> cpukit/posix/src/prwlockunlock.c | 5 +-
> cpukit/posix/src/prwlockwrlock.c | 15 +--
> cpukit/posix/src/psignalunblockthread.c | 6 +-
> cpukit/posix/src/pspinlock.c | 7 +-
> cpukit/posix/src/pspinlocktranslatereturncode.c | 50 -------
> cpukit/posix/src/pspintrylock.c | 7 +-
> cpukit/posix/src/pspinunlock.c | 7 +-
> cpukit/posix/src/pthreadjoin.c | 5 +-
> cpukit/posix/src/semaphoretranslatereturncode.c | 31 -----
> cpukit/posix/src/semaphorewaitsupp.c | 20 +--
> cpukit/posix/src/sempost.c | 12 +-
> cpukit/posix/src/sigtimedwait.c | 22 ++--
> cpukit/rtems/Makefile.am | 3 -
> cpukit/rtems/include/rtems/rtems/barrierimpl.h | 14 --
> cpukit/rtems/include/rtems/rtems/eventimpl.h | 2 +-
> cpukit/rtems/include/rtems/rtems/messageimpl.h | 14 --
> cpukit/rtems/include/rtems/rtems/semimpl.h | 76 -----------
> cpukit/rtems/include/rtems/rtems/statusimpl.h | 15 +++
> cpukit/rtems/src/barriertranslatereturncode.c | 45 -------
> cpukit/rtems/src/barrierwait.c | 12 +-
> cpukit/rtems/src/eventmp.c | 8 +-
> cpukit/rtems/src/eventreceive.c | 4 +-
> cpukit/rtems/src/eventseize.c | 20 +--
> cpukit/rtems/src/msgmp.c | 16 +--
> cpukit/rtems/src/msgqbroadcast.c | 9 +-
> cpukit/rtems/src/msgqreceive.c | 8 +-
> cpukit/rtems/src/msgqsend.c | 15 +--
> cpukit/rtems/src/msgqtranslatereturncode.c | 65 ---------
> cpukit/rtems/src/msgqurgent.c | 15 +--
> cpukit/rtems/src/partmp.c | 17 ++-
> cpukit/rtems/src/regiongetsegment.c | 6 +-
> cpukit/rtems/src/regionprocessqueue.c | 3 +-
> cpukit/rtems/src/semcreate.c | 25 ++--
> cpukit/rtems/src/semdelete.c | 11 +-
> cpukit/rtems/src/semflush.c | 2 +-
> cpukit/rtems/src/semmp.c | 15 ++-
> cpukit/rtems/src/semobtain.c | 31 ++---
> cpukit/rtems/src/semrelease.c | 23 ++--
> cpukit/rtems/src/semtranslatereturncode.c | 41 ------
> cpukit/rtems/src/signalmp.c | 8 +-
> cpukit/rtems/src/systemeventreceive.c | 4 +-
> cpukit/rtems/src/taskmp.c | 9 +-
> cpukit/score/Makefile.am | 1 +
> cpukit/score/include/rtems/score/corebarrierimpl.h | 42 +-----
> cpukit/score/include/rtems/score/coremsgimpl.h | 45 +------
> cpukit/score/include/rtems/score/coremuteximpl.h | 146 +++++++--------------
> cpukit/score/include/rtems/score/corerwlockimpl.h | 32 +----
> cpukit/score/include/rtems/score/coresemimpl.h | 69 ++--------
> .../score/include/rtems/score/corespinlockimpl.h | 36 +----
> cpukit/score/include/rtems/score/mpciimpl.h | 11 +-
> cpukit/score/include/rtems/score/mrsp.h | 31 +----
> cpukit/score/include/rtems/score/mrspimpl.h | 49 ++++---
> cpukit/score/include/rtems/score/status.h | 129 ++++++++++++++++++
> cpukit/score/include/rtems/score/thread.h | 5 -
> cpukit/score/include/rtems/score/threadimpl.h | 22 ++--
> cpukit/score/include/rtems/score/threadqimpl.h | 40 +++++-
> cpukit/score/preinstall.am | 4 +
> cpukit/score/src/condition.c | 6 +-
> cpukit/score/src/corebarrier.c | 11 --
> cpukit/score/src/corebarrierwait.c | 9 +-
> cpukit/score/src/coremsgbroadcast.c | 6 +-
> cpukit/score/src/coremsgclose.c | 2 +-
> cpukit/score/src/coremsgseize.c | 16 +--
> cpukit/score/src/coremsgsubmit.c | 19 ++-
> cpukit/score/src/coremutex.c | 28 +---
> cpukit/score/src/coremutexseize.c | 5 +-
> cpukit/score/src/coremutexsurrender.c | 14 +-
> cpukit/score/src/corerwlockobtainread.c | 17 +--
> cpukit/score/src/corerwlockobtainwrite.c | 14 +-
> cpukit/score/src/corerwlockrelease.c | 8 +-
> cpukit/score/src/coresem.c | 22 ----
> cpukit/score/src/corespinlockrelease.c | 6 +-
> cpukit/score/src/corespinlockwait.c | 10 +-
> cpukit/score/src/futex.c | 3 +-
> cpukit/score/src/mpci.c | 14 +-
> cpukit/score/src/mutex.c | 7 +-
> cpukit/score/src/semaphore.c | 3 +-
> cpukit/score/src/threadmp.c | 1 -
> cpukit/score/src/threadqenqueue.c | 4 +-
> cpukit/score/src/threadqflush.c | 27 ++++
> cpukit/score/src/threadrestart.c | 10 +-
> cpukit/score/src/threadtimeout.c | 3 +-
> testsuites/sptests/spintrcritical10/init.c | 22 ++--
> testsuites/sptests/spintrcritical20/init.c | 14 +-
> 109 files changed, 707 insertions(+), 1571 deletions(-)
> delete mode 100644 cpukit/posix/src/mqueuetranslatereturncode.c
> delete mode 100644 cpukit/posix/src/mutextranslatereturncode.c
> delete mode 100644 cpukit/posix/src/pbarriertranslatereturncode.c
> delete mode 100644 cpukit/posix/src/prwlocktranslatereturncode.c
> delete mode 100644 cpukit/posix/src/pspinlocktranslatereturncode.c
> delete mode 100644 cpukit/posix/src/semaphoretranslatereturncode.c
> delete mode 100644 cpukit/rtems/src/barriertranslatereturncode.c
> delete mode 100644 cpukit/rtems/src/msgqtranslatereturncode.c
> delete mode 100644 cpukit/rtems/src/semtranslatereturncode.c
> create mode 100644 cpukit/score/include/rtems/score/status.h
>
More information about the devel
mailing list