From de59c065c57cb8526662ee6da28a57ad16fdde66 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 27 Sep 2017 15:08:33 +0200 Subject: posix: Implement self-contained POSIX mutex POSIX mutexes are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3112. --- cpukit/score/include/rtems/score/muteximpl.h | 37 +++++++++++++++++++++++++++ cpukit/score/include/rtems/score/objectimpl.h | 1 - cpukit/score/include/rtems/sysinit.h | 1 - 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 cpukit/score/include/rtems/score/muteximpl.h (limited to 'cpukit/score/include') diff --git a/cpukit/score/include/rtems/score/muteximpl.h b/cpukit/score/include/rtems/score/muteximpl.h new file mode 100644 index 0000000000..5fd4f5e8be --- /dev/null +++ b/cpukit/score/include/rtems/score/muteximpl.h @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2015, 2017 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Dornierstr. 4 + * 82178 Puchheim + * Germany + * + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifndef _RTEMS_SCORE_MUTEXIMPL_H +#define _RTEMS_SCORE_MUTEXIMPL_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +typedef struct { + Thread_queue_Syslock_queue Queue; +} Mutex_Control; + +typedef struct { + Mutex_Control Mutex; + unsigned int nest_level; +} Mutex_recursive_Control; + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _RTEMS_SCORE_MUTEXIMPL_H */ diff --git a/cpukit/score/include/rtems/score/objectimpl.h b/cpukit/score/include/rtems/score/objectimpl.h index 435e82cc45..0338a481ea 100644 --- a/cpukit/score/include/rtems/score/objectimpl.h +++ b/cpukit/score/include/rtems/score/objectimpl.h @@ -87,7 +87,6 @@ typedef enum { OBJECTS_POSIX_KEYS = 2, OBJECTS_POSIX_INTERRUPTS = 3, OBJECTS_POSIX_MESSAGE_QUEUES = 5, - OBJECTS_POSIX_MUTEXES = 6, OBJECTS_POSIX_SEMAPHORES = 7, OBJECTS_POSIX_TIMERS = 9, OBJECTS_POSIX_SHMS = 12 diff --git a/cpukit/score/include/rtems/sysinit.h b/cpukit/score/include/rtems/sysinit.h index 595629fd04..7ab3d0b631 100644 --- a/cpukit/score/include/rtems/sysinit.h +++ b/cpukit/score/include/rtems/sysinit.h @@ -47,7 +47,6 @@ extern "C" { #define RTEMS_SYSINIT_CLASSIC_BARRIER 00034a #define RTEMS_SYSINIT_POSIX_SIGNALS 000360 #define RTEMS_SYSINIT_POSIX_THREADS 000361 -#define RTEMS_SYSINIT_POSIX_MUTEX 000363 #define RTEMS_SYSINIT_POSIX_MESSAGE_QUEUE 000364 #define RTEMS_SYSINIT_POSIX_SEMAPHORE 000365 #define RTEMS_SYSINIT_POSIX_TIMER 000366 -- cgit v1.2.3