summaryrefslogtreecommitdiffstats
path: root/c/src/exec/posix/headers
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c/src/exec/posix/headers/cancel.h15
-rw-r--r--c/src/exec/posix/headers/cond.h123
-rw-r--r--c/src/exec/posix/headers/condmp.h162
-rw-r--r--c/src/exec/posix/headers/intr.h154
-rw-r--r--c/src/exec/posix/headers/key.h136
-rw-r--r--c/src/exec/posix/headers/mqueue.h186
-rw-r--r--c/src/exec/posix/headers/mqueuemp.h161
-rw-r--r--c/src/exec/posix/headers/mutex.h117
-rw-r--r--c/src/exec/posix/headers/mutexmp.h161
-rw-r--r--c/src/exec/posix/headers/priority.h34
-rw-r--r--c/src/exec/posix/headers/pthread.h113
-rw-r--r--c/src/exec/posix/headers/pthreadmp.h161
-rw-r--r--c/src/exec/posix/headers/semaphore.h135
-rw-r--r--c/src/exec/posix/headers/semaphoremp.h161
-rw-r--r--c/src/exec/posix/headers/threadsup.h29
-rw-r--r--c/src/exec/posix/headers/time.h14
16 files changed, 1862 insertions, 0 deletions
diff --git a/c/src/exec/posix/headers/cancel.h b/c/src/exec/posix/headers/cancel.h
new file mode 100644
index 0000000000..de059d317d
--- /dev/null
+++ b/c/src/exec/posix/headers/cancel.h
@@ -0,0 +1,15 @@
+/* rtems/posix/cancel.h
+ *
+ */
+
+#ifndef __RTEMS_POSIX_CANCEL_h
+#define __RTEMS_POSIX_CANCEL_h
+
+typedef struct {
+ Chain_Node Node;
+ void (*routine)( void * );
+ void *arg;
+} POSIX_Cancel_Handler_control;
+
+#endif
+/* end of include file */
diff --git a/c/src/exec/posix/headers/cond.h b/c/src/exec/posix/headers/cond.h
new file mode 100644
index 0000000000..4448e38b6c
--- /dev/null
+++ b/c/src/exec/posix/headers/cond.h
@@ -0,0 +1,123 @@
+/* rtems/posix/cond.h
+ *
+ * This include file contains all the private support information for
+ * POSIX condition variables.
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+#ifndef __RTEMS_POSIX_CONDITION_VARIABLES_h
+#define __RTEMS_POSIX_CONDITION_VARIABLES_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rtems/score/object.h>
+#include <rtems/score/threadq.h>
+
+/*
+ * Data Structure used to manage a POSIX condition variable
+ */
+
+typedef struct {
+ Objects_Control Object;
+ int process_shared;
+ pthread_mutex_t Mutex;
+ Thread_queue_Control Wait_queue;
+} POSIX_Condition_variables_Control;
+
+/*
+ * The following defines the information control block used to manage
+ * this class of objects.
+ */
+
+EXTERN Objects_Information _POSIX_Condition_variables_Information;
+
+/*
+ * _POSIX_Condition_variables_Manager_initialization
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs the initialization necessary for this manager.
+ */
+
+void _POSIX_Condition_variables_Manager_initialization(
+ unsigned32 maximum_condition_variables
+);
+
+/*
+ * _POSIX_Condition_variables_Allocate
+ *
+ * DESCRIPTION:
+ *
+ * This function allocates a condition variable control block from
+ * the inactive chain of free condition variable control blocks.
+ */
+
+STATIC INLINE POSIX_Condition_variables_Control *
+ _POSIX_Condition_variables_Allocate( void );
+
+/*
+ * _POSIX_Condition_variables_Free
+ *
+ * DESCRIPTION:
+ *
+ * This routine frees a condition variable control block to the
+ * inactive chain of free condition variable control blocks.
+ */
+
+STATIC INLINE void _POSIX_Condition_variables_Free (
+ POSIX_Condition_variables_Control *the_condition_variable
+);
+
+/*
+ * _POSIX_Condition_variables_Get
+ *
+ * DESCRIPTION:
+ *
+ * This function maps condition variable IDs to condition variable control
+ * blocks. If ID corresponds to a local condition variable, then it returns
+ * the_condition variable control pointer which maps to ID and location
+ * is set to OBJECTS_LOCAL. if the condition variable ID is global and
+ * resides on a remote node, then location is set to OBJECTS_REMOTE,
+ * and the_condition variable is undefined. Otherwise, location is set
+ * to OBJECTS_ERROR and the_condition variable is undefined.
+ */
+
+STATIC INLINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
+ Objects_Id *id,
+ Objects_Locations *location
+);
+
+/*
+ * _POSIX_Condition_variables_Is_null
+ *
+ * DESCRIPTION:
+ *
+ * This function returns TRUE if the_condition variable is NULL
+ * and FALSE otherwise.
+ */
+
+STATIC INLINE boolean _POSIX_Condition_variables_Is_null (
+ POSIX_Condition_variables_Control *the_condition_variable
+);
+
+#include <rtems/posix/cond.inl>
+#include <rtems/posix/condmp.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
+
diff --git a/c/src/exec/posix/headers/condmp.h b/c/src/exec/posix/headers/condmp.h
new file mode 100644
index 0000000000..12997b68f4
--- /dev/null
+++ b/c/src/exec/posix/headers/condmp.h
@@ -0,0 +1,162 @@
+/* condmp.h
+ *
+ * This include file contains all the constants and structures associated
+ * with the Multiprocessing Support in the POSIX Condition Variable Manager.
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+#ifndef __RTEMS_POSIX_CONDITION_VARIABLES_MP_h
+#define __RTEMS_POSIX_CONDITION_VARIABLES_MP_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rtems/score/mppkt.h>
+#include <rtems/score/object.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/watchdog.h>
+
+/*
+ * The following enumerated type defines the list of
+ * remote condition variable operations.
+ */
+
+typedef enum {
+ POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_CREATE = 0,
+ POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_DELETE = 1,
+ POSIX_CONDITION_VARIABLES_MP_EXTRACT_PROXY = 2,
+ POSIX_CONDITION_VARIABLES_MP_OBTAIN_REQUEST = 3,
+ POSIX_CONDITION_VARIABLES_MP_OBTAIN_RESPONSE = 4,
+ POSIX_CONDITION_VARIABLES_MP_RELEASE_REQUEST = 5,
+ POSIX_CONDITION_VARIABLES_MP_RELEASE_RESPONSE = 6,
+} POSIX_Condition_variables_MP_Remote_operations;
+
+/*
+ * The following data structure defines the packet used to perform
+ * remote condition variable operations.
+ */
+
+typedef struct {
+ MP_packet_Prefix Prefix;
+ POSIX_Condition_variables_MP_Remote_operations operation;
+ Objects_Name name;
+ boolean wait; /* XXX options */
+ Objects_Id proxy_id;
+} POSIX_Condition_variables_MP_Packet;
+
+/*
+ * _POSIX_Condition_variables_MP_Send_process_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs a remote procedure call so that a
+ * process operation can be performed on another node.
+ */
+
+void _POSIX_Condition_variables_MP_Send_process_packet (
+ POSIX_Condition_variables_MP_Remote_operations operation,
+ Objects_Id condition_variables_id,
+ Objects_Name name,
+ Objects_Id proxy_id
+);
+
+/*
+ * _POSIX_Condition_variables_MP_Send_request_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs a remote procedure call so that a
+ * directive operation can be initiated on another node.
+ */
+
+int _POSIX_Condition_variables_MP_Send_request_packet (
+ POSIX_Condition_variables_MP_Remote_operations operation,
+ Objects_Id condition_variables_id,
+ boolean wait, /* XXX options */
+ Watchdog_Interval timeout
+);
+
+/*
+ * _POSIX_Condition_variables_MP_Send_response_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs a remote procedure call so that a
+ * directive can be performed on another node.
+ */
+
+void _POSIX_Condition_variables_MP_Send_response_packet (
+ POSIX_Condition_variables_MP_Remote_operations operation,
+ Objects_Id condition_variables_id,
+ Thread_Control *the_thread
+);
+
+/*
+ *
+ * _POSIX_Condition_variables_MP_Process_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs the actions specific to this package for
+ * the request from another node.
+ */
+
+void _POSIX_Condition_variables_MP_Process_packet (
+ MP_packet_Prefix *the_packet_prefix
+);
+
+/*
+ * _POSIX_Condition_variables_MP_Send_object_was_deleted
+ *
+ * DESCRIPTION:
+ *
+ * This routine is invoked indirectly by the thread queue
+ * when a proxy has been removed from the thread queue and
+ * the remote node must be informed of this.
+ */
+
+void _POSIX_Condition_variables_MP_Send_object_was_deleted (
+ Thread_Control *the_proxy
+);
+
+/*
+ * _POSIX_Condition_variables_MP_Send_extract_proxy
+ *
+ * DESCRIPTION:
+ *
+ * This routine is invoked when a task is deleted and it
+ * has a proxy which must be removed from a thread queue and
+ * the remote node must be informed of this.
+ */
+
+void _POSIX_Condition_variables_MP_Send_extract_proxy (
+ Thread_Control *the_thread
+);
+
+/*
+ * _POSIX_Condition_variables_MP_Get_packet
+ *
+ * DESCRIPTION:
+ *
+ * This function is used to obtain a condition variable mp packet.
+ */
+
+POSIX_Condition_variables_MP_Packet
+ *_POSIX_Condition_variables_MP_Get_packet ( void );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of file */
diff --git a/c/src/exec/posix/headers/intr.h b/c/src/exec/posix/headers/intr.h
new file mode 100644
index 0000000000..b940148999
--- /dev/null
+++ b/c/src/exec/posix/headers/intr.h
@@ -0,0 +1,154 @@
+/* rtems/posix/intr.h
+ *
+ * This include file contains all the private support information for
+ * POSIX Interrupt Manager.
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+#ifndef __RTEMS_POSIX_KEY_h
+#define __RTEMS_POSIX_KEY_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rtems/score/isr.h>
+#include <rtems/score/object.h>
+
+/*
+ * Data Structure used to manage each POSIX Interrupt Vector
+ */
+
+typedef struct {
+ int number_installed;
+ int lock_count;
+ int deferred_count;
+ Chain_Control Handlers;
+} POSIX_Interrupt_Control;
+
+/*
+ * Data Structure used to manage a POSIX Interrupt Handler
+ */
+
+typedef struct {
+ Objects_Control Object;
+ int is_active;
+ intr_t vector;
+ Thread_Control *server;
+ int (*handler)( void *area );
+ volatile void *user_data_area;
+} POSIX_Interrupt_Handler_control;
+
+/*
+ * The following defines the information control block used to manage
+ * this class of objects.
+ */
+
+EXTERN Objects_Information _POSIX_Interrupt_Handlers_Information;
+
+/*
+ * The following is an array which is used to manage the set of
+ * interrupt handlers installed on each vector.
+ */
+
+EXTERN POSIX_Interrupt_Control
+ _POSIX_Interrupt_Information[ ISR_NUMBER_OF_VECTORS ];
+
+/*
+ * _POSIX_Interrupt_Manager_initialization
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs the initialization necessary for this manager.
+ */
+
+void _POSIX_Interrupt_Manager_initialization(
+ unsigned32 maximum_interrupt_handlers
+);
+
+/*
+ * _POSIX_Interrupt_Allocate
+ *
+ * DESCRIPTION:
+ *
+ * This function allocates a interrupt handler control block from
+ * the inactive chain of free interrupt handler control blocks.
+ */
+
+STATIC INLINE POSIX_Interrupt_Handler_control *
+ _POSIX_Interrupt_Allocate( void );
+
+/*
+ * _POSIX_Interrupt_Free
+ *
+ * DESCRIPTION:
+ *
+ * This routine frees a interrupt handler control block to the
+ * inactive chain of free interrupt handler control blocks.
+ */
+
+STATIC INLINE void _POSIX_Interrupt_Free (
+ POSIX_Interrupt_Handler_control *the_intr
+);
+
+/*
+ * _POSIX_Interrupt_Get
+ *
+ * DESCRIPTION:
+ *
+ * This function maps interrupt handler IDs to interrupt handler control
+ * blocks. If ID corresponds to a local interrupt handler, then it returns
+ * the_intr control pointer which maps to ID and location
+ * is set to OBJECTS_LOCAL. if the interrupt handler ID is global and
+ * resides on a remote node, then location is set to OBJECTS_REMOTE,
+ * and the_intr is undefined. Otherwise, location is set
+ * to OBJECTS_ERROR and the_intr is undefined.
+ */
+
+STATIC INLINE POSIX_Interrupt_Control *_POSIX_Interrupt_Get (
+ Objects_Id id,
+ Objects_Locations *location
+);
+
+/*
+ * _POSIX_Interrupt_Is_null
+ *
+ * DESCRIPTION:
+ *
+ * This function returns TRUE if the_intr is NULL and FALSE otherwise.
+ */
+
+STATIC INLINE boolean _POSIX_Interrupt_Is_null (
+ POSIX_Interrupt_Handler_control *the_intr
+);
+
+/*
+ * _POSIX_Interrupt_Handler
+ *
+ * DESCRIPTION:
+ *
+ * This function XXX.
+ */
+
+void _POSIX_Interrupt_Handler(
+ ISR_Vector_number vector
+);
+
+#include <rtems/posix/intr.inl>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
+
diff --git a/c/src/exec/posix/headers/key.h b/c/src/exec/posix/headers/key.h
new file mode 100644
index 0000000000..0e690161b8
--- /dev/null
+++ b/c/src/exec/posix/headers/key.h
@@ -0,0 +1,136 @@
+/* rtems/posix/key.h
+ *
+ * This include file contains all the private support information for
+ * POSIX key.
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+#ifndef __RTEMS_POSIX_KEY_h
+#define __RTEMS_POSIX_KEY_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Data Structure used to manage a POSIX key
+ *
+ * NOTE: The Values is a table indexed by the index portion of the
+ * ID of the currently executing thread.
+ */
+
+typedef struct {
+ Objects_Control Object;
+ boolean is_active;
+ void (*destructor)( void * );
+ void **Values[ OBJECTS_CLASSES_LAST_THREAD_CLASS + 1 ];
+} POSIX_Keys_Control;
+
+/*
+ * The following defines the information control block used to manage
+ * this class of objects.
+ */
+
+EXTERN Objects_Information _POSIX_Keys_Information;
+
+/*
+ * _POSIX_Keys_Manager_initialization
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs the initialization necessary for this manager.
+ */
+
+void _POSIX_Key_Manager_initialization(
+ unsigned32 maximum_keys
+);
+
+/*
+ * _POSIX_Keys_Run_destructors
+ *
+ * DESCRIPTION:
+ *
+ * This function executes all the destructors associated with the thread's
+ * keys. This function will execute until all values have been set to NULL.
+ *
+ * NOTE: This is the routine executed when a thread exits to
+ * run through all the keys and do the destructor action.
+ */
+
+void _POSIX_Keys_Run_destructors(
+ Thread_Control *thread
+);
+
+/*
+ * _POSIX_Keys_Allocate
+ *
+ * DESCRIPTION:
+ *
+ * This function allocates a keys control block from
+ * the inactive chain of free keys control blocks.
+ */
+
+STATIC INLINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void );
+
+/*
+ * _POSIX_Keys_Free
+ *
+ * DESCRIPTION:
+ *
+ * This routine frees a keys control block to the
+ * inactive chain of free keys control blocks.
+ */
+
+STATIC INLINE void _POSIX_Keys_Free (
+ POSIX_Keys_Control *the_key
+);
+
+/*
+ * _POSIX_Keys_Get
+ *
+ * DESCRIPTION:
+ *
+ * This function maps key IDs to key control blocks.
+ * If ID corresponds to a local keys, then it returns
+ * the_key control pointer which maps to ID and location
+ * is set to OBJECTS_LOCAL. if the keys ID is global and
+ * resides on a remote node, then location is set to OBJECTS_REMOTE,
+ * and the_key is undefined. Otherwise, location is set
+ * to OBJECTS_ERROR and the_key is undefined.
+ */
+
+STATIC INLINE POSIX_Keys_Control *_POSIX_Keys_Get (
+ Objects_Id id,
+ Objects_Locations *location
+);
+
+/*
+ * _POSIX_Keys_Is_null
+ *
+ * DESCRIPTION:
+ *
+ * This function returns TRUE if the_key is NULL and FALSE otherwise.
+ */
+
+STATIC INLINE boolean _POSIX_Keys_Is_null (
+ POSIX_Keys_Control *the_key
+);
+
+#include <rtems/posix/key.inl>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
+
diff --git a/c/src/exec/posix/headers/mqueue.h b/c/src/exec/posix/headers/mqueue.h
new file mode 100644
index 0000000000..5d5cfee61b
--- /dev/null
+++ b/c/src/exec/posix/headers/mqueue.h
@@ -0,0 +1,186 @@
+/* rtems/posix/mqueue.h
+ *
+ * This include file contains all the private support information for
+ * POSIX Message Queues.
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+#ifndef __RTEMS_POSIX_MESSAGE_QUEUE_h
+#define __RTEMS_POSIX_MESSAGE_QUEUE_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rtems/score/coremsg.h>
+#include <rtems/score/object.h>
+
+/*
+ * Data Structure used to manage a POSIX message queue
+ */
+
+typedef struct {
+ Objects_Control Object;
+ int process_shared;
+ int flags;
+ boolean named;
+ boolean linked;
+ boolean blocking;
+ unsigned32 open_count;
+ CORE_message_queue_Control Message_queue;
+ struct sigevent notification;
+} POSIX_Message_queue_Control;
+
+/*
+ * The following defines the information control block used to manage
+ * this class of objects.
+ */
+
+EXTERN Objects_Information _POSIX_Message_queue_Information;
+
+/*
+ * _POSIX_Message_queue_Manager_initialization
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs the initialization necessary for this manager.
+ */
+
+void _POSIX_Message_queue_Manager_initialization(
+ unsigned32 maximum_message_queues
+);
+
+/*
+ *
+ * _POSIX_Message_queue_Create_support
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs the creation of a message queue utilizing the
+ * core message queue.
+ */
+
+int _POSIX_Message_queue_Create_support(
+ const char *name,
+ int pshared,
+ unsigned int oflag,
+ struct mq_attr *attr,
+ POSIX_Message_queue_Control **message_queue
+);
+
+/*
+ *
+ * _POSIX_Message_queue_Send_support
+ *
+ * DESCRIPTION:
+ *
+ * This routine posts a message to a specified message queue.
+ */
+
+int _POSIX_Message_queue_Send_support(
+ mqd_t mqdes,
+ const char *msg_ptr,
+ unsigned32 msg_len,
+ Priority_Control msg_prio,
+ Watchdog_Interval timeout
+);
+
+/*
+ * _POSIX_Message_queue_Allocate
+ *
+ * DESCRIPTION:
+ *
+ * This function allocates a message queue control block from
+ * the inactive chain of free message queue control blocks.
+ */
+
+STATIC INLINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void );
+
+/*
+ * _POSIX_Message_queue_Free
+ *
+ * DESCRIPTION:
+ *
+ * This routine frees a message queue control block to the
+ * inactive chain of free message queue control blocks.
+ */
+
+STATIC INLINE void _POSIX_Message_queue_Free (
+ POSIX_Message_queue_Control *the_mq
+);
+
+/*
+ * _POSIX_Message_queue_Get
+ *
+ * DESCRIPTION:
+ *
+ * This function maps message queue IDs to message queue control blocks.
+ * If ID corresponds to a local message queue, then it returns
+ * the_mq control pointer which maps to ID and location
+ * is set to OBJECTS_LOCAL. if the message queue ID is global and
+ * resides on a remote node, then location is set to OBJECTS_REMOTE,
+ * and the_message queue is undefined. Otherwise, location is set
+ * to OBJECTS_ERROR and the_mq is undefined.
+ */
+
+STATIC INLINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get (
+ Objects_Id id,
+ Objects_Locations *location
+);
+
+/*
+ * _POSIX_Message_queue_Is_null
+ *
+ * DESCRIPTION:
+ *
+ * This function returns TRUE if the_message_queue is NULL and FALSE otherwise.
+ */
+
+STATIC INLINE boolean _POSIX_Message_queue_Is_null (
+ POSIX_Message_queue_Control *the_mq
+);
+
+/*
+ * _POSIX_Message_queue_Name_to_id
+ *
+ * DESCRIPTION:
+ *
+ * XXX
+ */
+
+int _POSIX_Message_queue_Name_to_id(
+ const char *name,
+ Objects_Id *id
+);
+
+/*
+ * _POSIX_Message_queue_Priority_to_core
+ *
+ * DESCRIPTION:
+ *
+ * XXX
+ */
+
+STATIC INLINE Priority_Control _POSIX_Message_queue_Priority_to_core(
+ unsigned int priority
+);
+
+#include <rtems/posix/mqueue.inl>
+#include <rtems/posix/mqueuemp.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
+
diff --git a/c/src/exec/posix/headers/mqueuemp.h b/c/src/exec/posix/headers/mqueuemp.h
new file mode 100644
index 0000000000..ae23f6af56
--- /dev/null
+++ b/c/src/exec/posix/headers/mqueuemp.h
@@ -0,0 +1,161 @@
+/* mqueuemp.h
+ *
+ * This include file contains all the constants and structures associated
+ * with the Multiprocessing Support in the POSIX Message Queue Manager.
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+#ifndef __RTEMS_POSIX_MESSAGE_QUEUE_MP_h
+#define __RTEMS_POSIX_MESSAGE_QUEUE_MP_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rtems/score/mppkt.h>
+#include <rtems/score/object.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/watchdog.h>
+
+/*
+ * The following enumerated type defines the list of
+ * remote message queue operations.
+ */
+
+typedef enum {
+ POSIX_MESSAGE_QUEUE_MP_ANNOUNCE_CREATE = 0,
+ POSIX_MESSAGE_QUEUE_MP_ANNOUNCE_DELETE = 1,
+ POSIX_MESSAGE_QUEUE_MP_EXTRACT_PROXY = 2,
+ POSIX_MESSAGE_QUEUE_MP_OBTAIN_REQUEST = 3,
+ POSIX_MESSAGE_QUEUE_MP_OBTAIN_RESPONSE = 4,
+ POSIX_MESSAGE_QUEUE_MP_RELEASE_REQUEST = 5,
+ POSIX_MESSAGE_QUEUE_MP_RELEASE_RESPONSE = 6,
+} POSIX_Message_queue_MP_Remote_operations;
+
+/*
+ * The following data structure defines the packet used to perform
+ * remote message queue operations.
+ */
+
+typedef struct {
+ MP_packet_Prefix Prefix;
+ POSIX_Message_queue_MP_Remote_operations operation;
+ Objects_Name name;
+ boolean wait; /* XXX options */
+ Objects_Id proxy_id;
+} POSIX_Message_queue_MP_Packet;
+
+/*
+ * _POSIX_Message_queue_MP_Send_process_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs a remote procedure call so that a
+ * process operation can be performed on another node.
+ */
+
+void _POSIX_Message_queue_MP_Send_process_packet (
+ POSIX_Message_queue_MP_Remote_operations operation,
+ Objects_Id mq_id,
+ Objects_Name name,
+ Objects_Id proxy_id
+);
+
+/*
+ * _POSIX_Message_queue_MP_Send_request_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs a remote procedure call so that a
+ * directive operation can be initiated on another node.
+ */
+
+int _POSIX_Message_queue_MP_Send_request_packet (
+ POSIX_Message_queue_MP_Remote_operations operation,
+ Objects_Id mq_id,
+ boolean wait, /* XXX options */
+ Watchdog_Interval timeout
+);
+
+/*
+ * _POSIX_Message_queue_MP_Send_response_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs a remote procedure call so that a
+ * directive can be performed on another node.
+ */
+
+void _POSIX_Message_queue_MP_Send_response_packet (
+ POSIX_Message_queue_MP_Remote_operations operation,
+ Objects_Id mq_id,
+ Thread_Control *the_thread
+);
+
+/*
+ *
+ * _POSIX_Message_queue_MP_Process_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs the actions specific to this package for
+ * the request from another node.
+ */
+
+void _POSIX_Message_queue_MP_Process_packet (
+ MP_packet_Prefix *the_packet_prefix
+);
+
+/*
+ * _POSIX_Message_queue_MP_Send_object_was_deleted
+ *
+ * DESCRIPTION:
+ *
+ * This routine is invoked indirectly by the thread queue
+ * when a proxy has been removed from the thread queue and
+ * the remote node must be informed of this.
+ */
+
+void _POSIX_Message_queue_MP_Send_object_was_deleted (
+ Thread_Control *the_proxy
+);
+
+/*
+ * _POSIX_Message_queue_MP_Send_extract_proxy
+ *
+ * DESCRIPTION:
+ *
+ * This routine is invoked when a task is deleted and it
+ * has a proxy which must be removed from a thread queue and
+ * the remote node must be informed of this.
+ */
+
+void _POSIX_Message_queue_MP_Send_extract_proxy (
+ Thread_Control *the_thread
+);
+
+/*
+ * _POSIX_Message_queue_MP_Get_packet
+ *
+ * DESCRIPTION:
+ *
+ * This function is used to obtain a message queue mp packet.
+ */
+
+POSIX_Message_queue_MP_Packet *_POSIX_Message_queue_MP_Get_packet ( void );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of file */
diff --git a/c/src/exec/posix/headers/mutex.h b/c/src/exec/posix/headers/mutex.h
new file mode 100644
index 0000000000..5639d908d2
--- /dev/null
+++ b/c/src/exec/posix/headers/mutex.h
@@ -0,0 +1,117 @@
+/* rtems/posix/mutex.h
+ *
+ * This include file contains all the private support information for
+ * POSIX mutex's.
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+#ifndef __RTEMS_POSIX_MUTEX_h
+#define __RTEMS_POSIX_MUTEX_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Data Structure used to manage a POSIX mutex
+ */
+
+typedef struct {
+ Objects_Control Object;
+ int process_shared;
+ CORE_mutex_Control Mutex;
+} POSIX_Mutex_Control;
+
+/*
+ * The following defines the information control block used to manage
+ * this class of objects.
+ */
+
+EXTERN Objects_Information _POSIX_Mutex_Information;
+
+/*
+ * _POSIX_Mutex_Manager_initialization
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs the initialization necessary for this manager.
+ */
+
+void _POSIX_Mutex_Manager_initialization(
+ unsigned32 maximum_mutexes
+);
+
+/*
+ * _POSIX_Mutex_Allocate
+ *
+ * DESCRIPTION:
+ *
+ * This function allocates a mutexes control block from
+ * the inactive chain of free mutexes control blocks.
+ */
+
+STATIC INLINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void );
+
+/*
+ * _POSIX_Mutex_Free
+ *
+ * DESCRIPTION:
+ *
+ * This routine frees a mutexes control block to the
+ * inactive chain of free mutexes control blocks.
+ */
+
+STATIC INLINE void _POSIX_Mutex_Free (
+ POSIX_Mutex_Control *the_mutex
+);
+
+/*
+ * _POSIX_Mutex_Get
+ *
+ * DESCRIPTION:
+ *
+ * This function maps mutexes IDs to mutexes control blocks.
+ * If ID corresponds to a local mutexes, then it returns
+ * the_mutex control pointer which maps to ID and location
+ * is set to OBJECTS_LOCAL. if the mutexes ID is global and
+ * resides on a remote node, then location is set to OBJECTS_REMOTE,
+ * and the_mutex is undefined. Otherwise, location is set
+ * to OBJECTS_ERROR and the_mutex is undefined.
+ */
+
+STATIC INLINE POSIX_Mutex_Control *_POSIX_Mutex_Get (
+ Objects_Id *id,
+ Objects_Locations *location
+);
+
+/*
+ * _POSIX_Mutex_Is_null
+ *
+ * DESCRIPTION:
+ *
+ * This function returns TRUE if the_mutex is NULL and FALSE otherwise.
+ */
+
+STATIC INLINE boolean _POSIX_Mutex_Is_null (
+ POSIX_Mutex_Control *the_mutex
+);
+
+#include <rtems/posix/mutex.inl>
+#include <rtems/posix/mutexmp.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
+
diff --git a/c/src/exec/posix/headers/mutexmp.h b/c/src/exec/posix/headers/mutexmp.h
new file mode 100644
index 0000000000..15ac5371e8
--- /dev/null
+++ b/c/src/exec/posix/headers/mutexmp.h
@@ -0,0 +1,161 @@
+/* mutexmp.h
+ *
+ * This include file contains all the constants and structures associated
+ * with the Multiprocessing Support in the POSIX Mutex Manager.
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+#ifndef __RTEMS_POSIX_MUTEX_MP_h
+#define __RTEMS_POSIX_MUTEX_MP_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rtems/score/mppkt.h>
+#include <rtems/score/object.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/watchdog.h>
+
+/*
+ * The following enumerated type defines the list of
+ * remote mutex operations.
+ */
+
+typedef enum {
+ POSIX_MUTEX_MP_ANNOUNCE_CREATE = 0,
+ POSIX_MUTEX_MP_ANNOUNCE_DELETE = 1,
+ POSIX_MUTEX_MP_EXTRACT_PROXY = 2,
+ POSIX_MUTEX_MP_OBTAIN_REQUEST = 3,
+ POSIX_MUTEX_MP_OBTAIN_RESPONSE = 4,
+ POSIX_MUTEX_MP_RELEASE_REQUEST = 5,
+ POSIX_MUTEX_MP_RELEASE_RESPONSE = 6,
+} POSIX_Mutex_MP_Remote_operations;
+
+/*
+ * The following data structure defines the packet used to perform
+ * remote mutex operations.
+ */
+
+typedef struct {
+ MP_packet_Prefix Prefix;
+ POSIX_Mutex_MP_Remote_operations operation;
+ Objects_Name name;
+ boolean wait; /* XXX options */
+ Objects_Id proxy_id;
+} POSIX_Mutex_MP_Packet;
+
+/*
+ * _POSIX_Mutex_MP_Send_process_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs a remote procedure call so that a
+ * process operation can be performed on another node.
+ */
+
+void _POSIX_Mutex_MP_Send_process_packet (
+ POSIX_Mutex_MP_Remote_operations operation,
+ Objects_Id mutex_id,
+ Objects_Name name,
+ Objects_Id proxy_id
+);
+
+/*
+ * _POSIX_Mutex_MP_Send_request_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs a remote procedure call so that a
+ * directive operation can be initiated on another node.
+ */
+
+int _POSIX_Mutex_MP_Send_request_packet (
+ POSIX_Mutex_MP_Remote_operations operation,
+ Objects_Id mutex_id,
+ boolean wait, /* XXX options */
+ Watchdog_Interval timeout
+);
+
+/*
+ * _POSIX_Mutex_MP_Send_response_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs a remote procedure call so that a
+ * directive can be performed on another node.
+ */
+
+void _POSIX_Mutex_MP_Send_response_packet (
+ POSIX_Mutex_MP_Remote_operations operation,
+ Objects_Id mutex_id,
+ Thread_Control *the_thread
+);
+
+/*
+ *
+ * _POSIX_Mutex_MP_Process_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs the actions specific to this package for
+ * the request from another node.
+ */
+
+void _POSIX_Mutex_MP_Process_packet (
+ MP_packet_Prefix *the_packet_prefix
+);
+
+/*
+ * _POSIX_Mutex_MP_Send_object_was_deleted
+ *
+ * DESCRIPTION:
+ *
+ * This routine is invoked indirectly by the thread queue
+ * when a proxy has been removed from the thread queue and
+ * the remote node must be informed of this.
+ */
+
+void _POSIX_Mutex_MP_Send_object_was_deleted (
+ Thread_Control *the_proxy
+);
+
+/*
+ * _POSIX_Mutex_MP_Send_extract_proxy
+ *
+ * DESCRIPTION:
+ *
+ * This routine is invoked when a task is deleted and it
+ * has a proxy which must be removed from a thread queue and
+ * the remote node must be informed of this.
+ */
+
+void _POSIX_Mutex_MP_Send_extract_proxy (
+ Thread_Control *the_thread
+);
+
+/*
+ * _POSIX_Mutex_MP_Get_packet
+ *
+ * DESCRIPTION:
+ *
+ * This function is used to obtain a mutex mp packet.
+ */
+
+POSIX_Mutex_MP_Packet *_POSIX_Mutex_MP_Get_packet ( void );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of file */
diff --git a/c/src/exec/posix/headers/priority.h b/c/src/exec/posix/headers/priority.h
new file mode 100644
index 0000000000..f4cb717b7c
--- /dev/null
+++ b/c/src/exec/posix/headers/priority.h
@@ -0,0 +1,34 @@
+/*
+ *
+ *
+ * $Id$
+ */
+
+#ifndef __RTEMS_POSIX_PRIORITY_h
+#define __RTEMS_POSIX_PRIORITY_h
+
+#include <rtems/score/priority.h>
+
+/*
+ * RTEMS Core has priorities run in the opposite sense of the POSIX API.
+ */
+
+#define POSIX_SCHEDULER_MAXIMUM_PRIORITY (255)
+
+#define POSIX_SCHEDULER_MINIMUM_PRIORITY (1)
+
+STATIC INLINE boolean _POSIX_Priority_Is_valid(
+ int priority
+);
+
+STATIC INLINE Priority_Control _POSIX_Priority_To_core(
+ int priority
+);
+
+STATIC INLINE int _POSIX_Priority_From_core(
+ Priority_Control priority
+);
+
+#include <rtems/posix/priority.inl>
+
+#endif
diff --git a/c/src/exec/posix/headers/pthread.h b/c/src/exec/posix/headers/pthread.h
new file mode 100644
index 0000000000..538e737268
--- /dev/null
+++ b/c/src/exec/posix/headers/pthread.h
@@ -0,0 +1,113 @@
+/* rtems/posix/pthread.h
+ *
+ * This include file contains all the private support information for
+ * POSIX threads.
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+#ifndef __RTEMS_POSIX_THREADS_h
+#define __RTEMS_POSIX_THREADS_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Data Structure used to manage a POSIX thread
+ */
+
+typedef Thread_Control POSIX_Threads_Control;
+
+/*
+ * The following defines the information control block used to manage
+ * this class of objects.
+ */
+
+EXTERN Objects_Information _POSIX_Threads_Information;
+
+/*
+ * _POSIX_Threads_Manager_initialization
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs the initialization necessary for this manager.
+ */
+
+void _POSIX_Threads_Manager_initialization(
+ unsigned32 maximum_pthreads
+);
+
+/*
+ * _POSIX_Threads_Allocate
+ *
+ * DESCRIPTION:
+ *
+ * This function allocates a pthread control block from
+ * the inactive chain of free pthread control blocks.
+ */
+
+STATIC INLINE POSIX_Threads_Control *_POSIX_Threads_Allocate( void );
+
+/*
+ * _POSIX_Threads_Free
+ *
+ * DESCRIPTION:
+ *
+ * This routine frees a pthread control block to the
+ * inactive chain of free pthread control blocks.
+ */
+
+STATIC INLINE void _POSIX_Threads_Free (
+ POSIX_Threads_Control *the_pthread
+);
+
+/*
+ * _POSIX_Threads_Get
+ *
+ * DESCRIPTION:
+ *
+ * This function maps pthread IDs to pthread control blocks.
+ * If ID corresponds to a local pthread, then it returns
+ * the_pthread control pointer which maps to ID and location
+ * is set to OBJECTS_LOCAL. if the pthread ID is global and
+ * resides on a remote node, then location is set to OBJECTS_REMOTE,
+ * and the_pthread is undefined. Otherwise, location is set
+ * to OBJECTS_ERROR and the_pthread is undefined.
+ */
+
+STATIC INLINE POSIX_Threads_Control *_POSIX_Threads_Get (
+ Objects_Id *id,
+ Objects_Locations *location
+);
+
+/*
+ * _POSIX_Threads_Is_null
+ *
+ * DESCRIPTION:
+ *
+ * This function returns TRUE if the_pthread is NULL and FALSE otherwise.
+ */
+
+STATIC INLINE boolean _POSIX_Threads_Is_null (
+ POSIX_Threads_Control *the_pthread
+);
+
+#include <rtems/posix/pthread.inl>
+#include <rtems/posix/pthreadmp.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
+
diff --git a/c/src/exec/posix/headers/pthreadmp.h b/c/src/exec/posix/headers/pthreadmp.h
new file mode 100644
index 0000000000..e15534136b
--- /dev/null
+++ b/c/src/exec/posix/headers/pthreadmp.h
@@ -0,0 +1,161 @@
+/* pthreadmp.h
+ *
+ * This include file contains all the constants and structures associated
+ * with the Multiprocessing Support in the POSIX Threads Manager.
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+#ifndef __RTEMS_POSIX_THREADS_MP_h
+#define __RTEMS_POSIX_THREADS_MP_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rtems/score/mppkt.h>
+#include <rtems/score/object.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/watchdog.h>
+
+/*
+ * The following enumerated type defines the list of
+ * remote pthread operations.
+ */
+
+typedef enum {
+ POSIX_THREADS_MP_ANNOUNCE_CREATE = 0,
+ POSIX_THREADS_MP_ANNOUNCE_DELETE = 1,
+ POSIX_THREADS_MP_EXTRACT_PROXY = 2,
+ POSIX_THREADS_MP_OBTAIN_REQUEST = 3,
+ POSIX_THREADS_MP_OBTAIN_RESPONSE = 4,
+ POSIX_THREADS_MP_RELEASE_REQUEST = 5,
+ POSIX_THREADS_MP_RELEASE_RESPONSE = 6
+} POSIX_Threads_MP_Remote_operations;
+
+/*
+ * The following data structure defines the packet used to perform
+ * remote pthread operations.
+ */
+
+typedef struct {
+ MP_packet_Prefix Prefix;
+ POSIX_Threads_MP_Remote_operations operation;
+ Objects_Name name;
+ boolean wait;
+ Objects_Id proxy_id;
+} POSIX_Threads_MP_Packet;
+
+/*
+ * _POSIX_Threads_MP_Send_process_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs a remote procedure call so that a
+ * process operation can be performed on another node.
+ */
+
+void _POSIX_Threads_MP_Send_process_packet (
+ POSIX_Threads_MP_Remote_operations operation,
+ Objects_Id pthread_id,
+ Objects_Name name,
+ Objects_Id proxy_id
+);
+
+/*
+ * _POSIX_Threads_MP_Send_request_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs a remote procedure call so that a
+ * directive operation can be initiated on another node.
+ */
+
+int _POSIX_Threads_MP_Send_request_packet (
+ POSIX_Threads_MP_Remote_operations operation,
+ Objects_Id pthread_id,
+ boolean wait,
+ Watchdog_Interval timeout
+);
+
+/*
+ * _POSIX_Threads_MP_Send_response_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs a remote procedure call so that a
+ * directive can be performed on another node.
+ */
+
+void _POSIX_Threads_MP_Send_response_packet (
+ POSIX_Threads_MP_Remote_operations operation,
+ Objects_Id pthread_id,
+ Thread_Control *the_thread
+);
+
+/*
+ *
+ * _POSIX_Threads_MP_Process_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs the actions specific to this package for
+ * the request from another node.
+ */
+
+void _POSIX_Threads_MP_Process_packet (
+ MP_packet_Prefix *the_packet_prefix
+);
+
+/*
+ * _POSIX_Threads_MP_Send_object_was_deleted
+ *
+ * DESCRIPTION:
+ *
+ * This routine is invoked indirectly by the thread queue
+ * when a proxy has been removed from the thread queue and
+ * the remote node must be informed of this.
+ */
+
+void _POSIX_Threads_MP_Send_object_was_deleted (
+ Thread_Control *the_proxy
+);
+
+/*
+ * _POSIX_Threads_MP_Send_extract_proxy
+ *
+ * DESCRIPTION:
+ *
+ * This routine is invoked when a task is deleted and it
+ * has a proxy which must be removed from a thread queue and
+ * the remote node must be informed of this.
+ */
+
+void _POSIX_Threads_MP_Send_extract_proxy (
+ Thread_Control *the_thread
+);
+
+/*
+ * _POSIX_Threads_MP_Get_packet
+ *
+ * DESCRIPTION:
+ *
+ * This function is used to obtain a pthread mp packet.
+ */
+
+POSIX_Threads_MP_Packet *_POSIX_Threads_MP_Get_packet ( void );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of file */
diff --git a/c/src/exec/posix/headers/semaphore.h b/c/src/exec/posix/headers/semaphore.h
new file mode 100644
index 0000000000..a538663989
--- /dev/null
+++ b/c/src/exec/posix/headers/semaphore.h
@@ -0,0 +1,135 @@
+/* rtems/posix/semaphore.h
+ *
+ * This include file contains all the private support information for
+ * POSIX Semaphores.
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+#ifndef __RTEMS_POSIX_SEMAPHORE_h
+#define __RTEMS_POSIX_SEMAPHORE_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rtems/score/coresem.h>
+
+/*
+ * Data Structure used to manage a POSIX semaphore
+ */
+
+typedef struct {
+ Objects_Control Object;
+ int process_shared;
+ boolean named;
+ boolean linked;
+ unsigned32 open_count;
+ CORE_semaphore_Control Semaphore;
+} POSIX_Semaphore_Control;
+
+/*
+ * The following defines the information control block used to manage
+ * this class of objects.
+ */
+
+EXTERN Objects_Information _POSIX_Semaphore_Information;
+
+/*
+ * _POSIX_Semaphore_Manager_initialization
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs the initialization necessary for this manager.
+ */
+
+void _POSIX_Semaphore_Manager_initialization(
+ unsigned32 maximum_semaphorees
+);
+
+/*
+ * _POSIX_Semaphore_Allocate
+ *
+ * DESCRIPTION:
+ *
+ * This function allocates a semaphore control block from
+ * the inactive chain of free semaphore control blocks.
+ */
+
+STATIC INLINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void );
+
+/*
+ * _POSIX_Semaphore_Free
+ *
+ * DESCRIPTION:
+ *
+ * This routine frees a semaphore control block to the
+ * inactive chain of free semaphore control blocks.
+ */
+
+STATIC INLINE void _POSIX_Semaphore_Free (
+ POSIX_Semaphore_Control *the_semaphore
+);
+
+/*
+ * _POSIX_Semaphore_Get
+ *
+ * DESCRIPTION:
+ *
+ * This function maps semaphore IDs to semaphore control blocks.
+ * If ID corresponds to a local semaphore, then it returns
+ * the_semaphore control pointer which maps to ID and location
+ * is set to OBJECTS_LOCAL. if the semaphore ID is global and
+ * resides on a remote node, then location is set to OBJECTS_REMOTE,
+ * and the_semaphore is undefined. Otherwise, location is set
+ * to OBJECTS_ERROR and the_semaphore is undefined.
+ */
+
+STATIC INLINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
+ Objects_Id *id,
+ Objects_Locations *location
+);
+
+/*
+ * _POSIX_Semaphore_Is_null
+ *
+ * DESCRIPTION:
+ *
+ * This function returns TRUE if the_semaphore is NULL and FALSE otherwise.
+ */
+
+STATIC INLINE boolean _POSIX_Semaphore_Is_null (
+ POSIX_Semaphore_Control *the_semaphore
+);
+
+/*
+ * _POSIX_Semaphore_Name_to_id
+ *
+ * DESCRIPTION:
+ *
+ * XXX
+ */
+
+int _POSIX_Semaphore_Name_to_id(
+ const char *name,
+ Objects_Id *id
+);
+
+#include <rtems/posix/semaphore.inl>
+#include <rtems/posix/semaphoremp.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
+
diff --git a/c/src/exec/posix/headers/semaphoremp.h b/c/src/exec/posix/headers/semaphoremp.h
new file mode 100644
index 0000000000..102b3d08a6
--- /dev/null
+++ b/c/src/exec/posix/headers/semaphoremp.h
@@ -0,0 +1,161 @@
+/* semaphoremp.h
+ *
+ * This include file contains all the constants and structures associated
+ * with the Multiprocessing Support in the POSIX Semaphore Manager.
+ *
+ * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
+ * On-Line Applications Research Corporation (OAR).
+ * All rights assigned to U.S. Government, 1994.
+ *
+ * This material may be reproduced by or for the U.S. Government pursuant
+ * to the copyright license under the clause at DFARS 252.227-7013. This
+ * notice must appear in all copies of this file and its derivatives.
+ *
+ * $Id$
+ */
+
+#ifndef __RTEMS_POSIX_SEMAPHORE_MP_h
+#define __RTEMS_POSIX_SEMAPHORE_MP_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <rtems/score/mppkt.h>
+#include <rtems/score/object.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/watchdog.h>
+
+/*
+ * The following enumerated type defines the list of
+ * remote semaphore operations.
+ */
+
+typedef enum {
+ POSIX_SEMAPHORE_MP_ANNOUNCE_CREATE = 0,
+ POSIX_SEMAPHORE_MP_ANNOUNCE_DELETE = 1,
+ POSIX_SEMAPHORE_MP_EXTRACT_PROXY = 2,
+ POSIX_SEMAPHORE_MP_OBTAIN_REQUEST = 3,
+ POSIX_SEMAPHORE_MP_OBTAIN_RESPONSE = 4,
+ POSIX_SEMAPHORE_MP_RELEASE_REQUEST = 5,
+ POSIX_SEMAPHORE_MP_RELEASE_RESPONSE = 6,
+} POSIX_Semaphore_MP_Remote_operations;
+
+/*
+ * The following data structure defines the packet used to perform
+ * remote semaphore operations.
+ */
+
+typedef struct {
+ MP_packet_Prefix Prefix;
+ POSIX_Semaphore_MP_Remote_operations operation;
+ Objects_Name name;
+ boolean wait; /* XXX options */
+ Objects_Id proxy_id;
+} POSIX_Semaphore_MP_Packet;
+
+/*
+ * _POSIX_Semaphore_MP_Send_process_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs a remote procedure call so that a
+ * process operation can be performed on another node.
+ */
+
+void _POSIX_Semaphore_MP_Send_process_packet (
+ POSIX_Semaphore_MP_Remote_operations operation,
+ Objects_Id semaphore_id,
+ Objects_Name name,
+ Objects_Id proxy_id
+);
+
+/*
+ * _POSIX_Semaphore_MP_Send_request_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs a remote procedure call so that a
+ * directive operation can be initiated on another node.
+ */
+
+int _POSIX_Semaphore_MP_Send_request_packet (
+ POSIX_Semaphore_MP_Remote_operations operation,
+ Objects_Id semaphore_id,
+ boolean wait, /* XXX options */
+ Watchdog_Interval timeout
+);
+
+/*
+ * _POSIX_Semaphore_MP_Send_response_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs a remote procedure call so that a
+ * directive can be performed on another node.
+ */
+
+void _POSIX_Semaphore_MP_Send_response_packet (
+ POSIX_Semaphore_MP_Remote_operations operation,
+ Objects_Id semaphore_id,
+ Thread_Control *the_thread
+);
+
+/*
+ *
+ * _POSIX_Semaphore_MP_Process_packet
+ *
+ * DESCRIPTION:
+ *
+ * This routine performs the actions specific to this package for
+ * the request from another node.
+ */
+
+void _POSIX_Semaphore_MP_Process_packet (
+ MP_packet_Prefix *the_packet_prefix
+);
+
+/*
+ * _POSIX_Semaphore_MP_Send_object_was_deleted
+ *
+ * DESCRIPTION:
+ *
+ * This routine is invoked indirectly by the thread queue
+ * when a proxy has been removed from the thread queue and
+ * the remote node must be informed of this.
+ */
+
+void _POSIX_Semaphore_MP_Send_object_was_deleted (
+ Thread_Control *the_proxy
+);
+
+/*
+ * _POSIX_Semaphore_MP_Send_extract_proxy
+ *
+ * DESCRIPTION:
+ *
+ * This routine is invoked when a task is deleted and it
+ * has a proxy which must be removed from a thread queue and
+ * the remote node must be informed of this.
+ */
+
+void _POSIX_Semaphore_MP_Send_extract_proxy (
+ Thread_Control *the_thread
+);
+
+/*
+ * _POSIX_Semaphore_MP_Get_packet
+ *
+ * DESCRIPTION:
+ *
+ * This function is used to obtain a semaphore mp packet.
+ */
+
+POSIX_Semaphore_MP_Packet *_POSIX_Semaphore_MP_Get_packet ( void );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of file */
diff --git a/c/src/exec/posix/headers/threadsup.h b/c/src/exec/posix/headers/threadsup.h
new file mode 100644
index 0000000000..39a3c9d51a
--- /dev/null
+++ b/c/src/exec/posix/headers/threadsup.h
@@ -0,0 +1,29 @@
+/* threadsup.h
+ *
+ */
+
+#ifndef __RTEMS_POSIX_THREAD_SUPPORT_h
+#define __RTEMS_POSIX_THREAD_SUPPORT_h
+
+#include <rtems/score/coresem.h>
+
+typedef struct {
+ /*
+ * POSIX Interrupts
+ */
+ unsigned32 interrupts_installed;
+ CORE_semaphore_Control Interrupt_Semaphore;
+
+ /*
+ * POSIX Cancelability
+ */
+ int cancelability_state;
+ int cancelability_type;
+ int cancelation_requested;
+ Chain_Control Cancellation_Handlers;
+
+} POSIX_API_Thread_Support_Control;
+
+#endif
+/* end of include file */
+
diff --git a/c/src/exec/posix/headers/time.h b/c/src/exec/posix/headers/time.h
new file mode 100644
index 0000000000..0b11f2fa54
--- /dev/null
+++ b/c/src/exec/posix/headers/time.h
@@ -0,0 +1,14 @@
+/*
+ *
+ *
+ * $Id$
+ */
+
+#ifndef __RTEMS_POSIX_TIME_h
+#define __RTEMS_POSIX_TIME_h
+
+Watchdog_Interval _POSIX_Time_Spec_to_interval(
+ const struct timespec *time
+);
+
+#endif