summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/include/rtems/rtems/sem.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-11 19:35:39 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1995-09-11 19:35:39 +0000
commit3a4ae6c210bcc37754767966f1128ae23c77b6af (patch)
tree8804983e5b92bec788d548df13db7513118d351d /cpukit/rtems/include/rtems/rtems/sem.h
parentnew file -- split from inlines (diff)
downloadrtems-3a4ae6c210bcc37754767966f1128ae23c77b6af.tar.bz2
The word "RTEMS" almost completely removed from the core.
Configuration Table Template file added and all tests modified to use this. All gvar.h and conftbl.h files removed from test directories. Configuration parameter maximum_devices added. Core semaphore and mutex handlers added and RTEMS API Semaphore Manager updated to reflect this. Initialization sequence changed to invoke API specific initialization routines. Initialization tasks table now owned by RTEMS Tasks Manager. Added user extension for post-switch. Utilized user extensions to implement API specific functionality like signal dispatching. Added extensions to the System Initialization Thread so that an API can register a function to be invoked while the system is being initialized. These are largely equivalent to the pre-driver and post-driver hooks. Added the Modules file oar-go32_p5, modified oar-go32, and modified the file make/custom/go32.cfg to look at an environment varable which determines what CPU model is being used. All BSPs updated to reflect named devices and clock driver's IOCTL used by the Shared Memory Driver. Also merged clock isr into main file and removed ckisr.c where possible. Updated spsize to reflect new and moved variables. Makefiles for the executive source and include files updated to show break down of files into Core, RTEMS API, and Neither. Header and inline files installed into subdirectory based on whether logically in the Core or a part of the RTEMS API.
Diffstat (limited to 'cpukit/rtems/include/rtems/rtems/sem.h')
-rw-r--r--cpukit/rtems/include/rtems/rtems/sem.h109
1 files changed, 85 insertions, 24 deletions
diff --git a/cpukit/rtems/include/rtems/rtems/sem.h b/cpukit/rtems/include/rtems/rtems/sem.h
index ff8abbc773..1faf3b13e9 100644
--- a/cpukit/rtems/include/rtems/rtems/sem.h
+++ b/cpukit/rtems/include/rtems/rtems/sem.h
@@ -31,23 +31,26 @@
extern "C" {
#endif
-#include <rtems.h>
-#include <rtems/attr.h>
-#include <rtems/object.h>
-#include <rtems/threadq.h>
+#include <rtems/rtems/types.h>
+#include <rtems/rtems/support.h>
+#include <rtems/rtems/tasks.h>
+#include <rtems/rtems/attr.h>
+#include <rtems/core/coremutex.h>
+#include <rtems/core/object.h>
+#include <rtems/core/coresem.h>
+#include <rtems/core/threadq.h>
/*
* The following defines the control block used to manage each semaphore.
*/
typedef struct {
- Objects_Control Object;
- Thread_queue_Control Wait_queue;
- rtems_attribute attribute_set;
- unsigned32 count;
- unsigned32 nest_count;
- Thread_Control *holder;
- Objects_Id holder_id;
+ Objects_Control Object;
+ rtems_attribute attribute_set;
+ union {
+ CORE_mutex_Control mutex;
+ CORE_semaphore_Control semaphore;
+ } Core_control;
} Semaphore_Control;
/*
@@ -82,11 +85,11 @@ void _Semaphore_Manager_initialization(
*/
rtems_status_code rtems_semaphore_create(
- rtems_name name,
- unsigned32 count,
- rtems_attribute attribute_set,
- rtems_task_priority priority_ceiling,
- Objects_Id *id
+ rtems_name name,
+ unsigned32 count,
+ rtems_attribute attribute_set,
+ rtems_task_priority priority_ceiling,
+ rtems_id *id
);
/*
@@ -106,7 +109,7 @@ rtems_status_code rtems_semaphore_create(
rtems_status_code rtems_semaphore_ident(
rtems_name name,
unsigned32 node,
- Objects_Id *id
+ rtems_id *id
);
/*
@@ -119,7 +122,7 @@ rtems_status_code rtems_semaphore_ident(
*/
rtems_status_code rtems_semaphore_delete(
- Objects_Id id
+ rtems_id id
);
/*
@@ -137,8 +140,8 @@ rtems_status_code rtems_semaphore_delete(
*/
rtems_status_code rtems_semaphore_obtain(
- Objects_Id id,
- unsigned32 option_set,
+ rtems_id id,
+ unsigned32 option_set,
rtems_interval timeout
);
@@ -155,7 +158,7 @@ rtems_status_code rtems_semaphore_obtain(
*/
rtems_status_code rtems_semaphore_release(
- Objects_Id id
+ rtems_id id
);
/*
@@ -213,7 +216,7 @@ STATIC INLINE void _Semaphore_Free (
*/
STATIC INLINE Semaphore_Control *_Semaphore_Get (
- Objects_Id id,
+ rtems_id id,
Objects_Locations *location
);
@@ -229,8 +232,66 @@ STATIC INLINE boolean _Semaphore_Is_null (
Semaphore_Control *the_semaphore
);
-#include <rtems/sem.inl>
-#include <rtems/semmp.h>
+/*
+ * _Semaphore_Translate_core_mutex_return_code
+ *
+ * DESCRIPTION:
+ *
+ * This function returns a RTEMS status code based on the mutex
+ * status code specified.
+ */
+
+rtems_status_code _Semaphore_Translate_core_mutex_return_code (
+ unsigned32 the_mutex_status
+);
+
+/*
+ * _Semaphore_Translate_core_semaphore_return_code
+ *
+ * DESCRIPTION:
+ *
+ * This function returns a RTEMS status code based on the semaphore
+ * status code specified.
+ */
+
+rtems_status_code _Semaphore_Translate_core_semaphore_return_code (
+ unsigned32 the_mutex_status
+);
+
+/*PAGE
+ *
+ * _Semaphore_Core_mutex_mp_support
+ *
+ * DESCRIPTION:
+ *
+ * This function processes the global actions necessary for remote
+ * accesses to a global semaphore based on a core mutex. This function
+ * is called by the core.
+ */
+
+void _Semaphore_Core_mutex_mp_support (
+ Thread_Control *the_thread,
+ rtems_id id
+);
+
+/*PAGE
+ *
+ * _Semaphore_Core_mp_support
+ *
+ * DESCRIPTION:
+ *
+ * This function processes the global actions necessary for remote
+ * accesses to a global semaphore based on a core semaphore. This function
+ * is called by the core.
+ */
+
+void _Semaphore_Core_semaphore_mp_support (
+ Thread_Control *the_thread,
+ rtems_id id
+);
+
+#include <rtems/rtems/sem.inl>
+#include <rtems/rtems/semmp.h>
#ifdef __cplusplus
}