Changeset 214d8ed in rtems


Ignore:
Timestamp:
Jun 28, 2015, 8:06:36 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
7237b3e
Parents:
12f93fbb
git-author:
Sebastian Huber <sebastian.huber@…> (06/28/15 20:06:36)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/30/15 07:11:18)
Message:

score: Add self-contained mutex implementation

This mutex implementation uses a thread priority queue with a simple
priority inheritance mechanism (similar to the object based mutexes).
The storage space must be supplied by the user (16 bytes on 32-bit
targets).

Files:
5 added
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/monitor/mon-prmisc.c

    r12f93fbb r214d8ed  
    135135    { "Wsem",   STATES_WAITING_FOR_SEMAPHORE, 0 },
    136136    { "Wsig",   STATES_WAITING_FOR_SIGNAL, 0 },
     137    { "Wslmtx", STATES_WAITING_FOR_SYS_LOCK_MUTEX, 0 },
    137138    { "Wsysev", STATES_WAITING_FOR_SYSTEM_EVENT, 0 },
    138139    { "Wterm",  STATES_WAITING_FOR_TERMINATION, 0 },
  • cpukit/score/Makefile.am

    r12f93fbb r214d8ed  
    347347libscore_a_SOURCES += src/debugisownerofallocator.c
    348348libscore_a_SOURCES += src/profilingisrentryexit.c
     349libscore_a_SOURCES += src/mutex.c
    349350libscore_a_SOURCES += src/once.c
    350351libscore_a_SOURCES += src/resourceiterate.c
  • cpukit/score/include/rtems/score/statesimpl.h

    r12f93fbb r214d8ed  
    8787/** This macro corresponds to a task waiting for a join. */
    8888#define STATES_WAITING_FOR_JOIN                0x1000000
     89/** This macro corresponds to a task waiting for a <sys/lock.h> mutex. */
     90#define STATES_WAITING_FOR_SYS_LOCK_MUTEX      0x2000000
    8991
    9092/** This macro corresponds to a task which is in an interruptible
     
    104106                                 STATES_WAITING_FOR_BARRIER            | \
    105107                                 STATES_WAITING_FOR_BSD_WAKEUP         | \
     108                                 STATES_WAITING_FOR_SYS_LOCK_MUTEX     | \
    106109                                 STATES_WAITING_FOR_RWLOCK             )
    107110
  • testsuites/sptests/Makefile.am

    r12f93fbb r214d8ed  
    3737else
    3838_SUBDIRS += sp29
     39endif
     40if HAS__THREAD_QUEUE_QUEUE
     41_SUBDIRS += spsyslock01
    3942endif
    4043_SUBDIRS += sptasknopreempt01
  • testsuites/sptests/configure.ac

    r12f93fbb r214d8ed  
    3131AC_CHECK_SIZEOF([time_t])
    3232
     33AC_CHECK_TYPES([struct _Thread_queue_Queue],[],[],[#include <sys/lock.h>])
     34AM_CONDITIONAL(HAS__THREAD_QUEUE_QUEUE,test x"${ac_cv_type_struct__Thread_queue_Queue}" = x"yes")
     35
    3336# Added to newlib pthreads for RTEMS SMP (np), may not be present
    3437AC_CHECK_HEADERS([sys/cpuset.h])
     
    4144# Explicitly list all Makefiles here
    4245AC_CONFIG_FILES([Makefile
     46spsyslock01/Makefile
    4347sptasknopreempt01/Makefile
    4448spintrcritical23/Makefile
Note: See TracChangeset for help on using the changeset viewer.