summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-29 15:40:38 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-29 15:40:38 +0000
commit64f55e7c32cb7a2ff069f527ec28b1cfa71de31a (patch)
tree10a663bc14783d3eefb6c82b07e62902a42c8cde
parentUpdated. (diff)
downloadrtems-64f55e7c32cb7a2ff069f527ec28b1cfa71de31a.tar.bz2
Made sure POSIX would build with MP enabled.
-rw-r--r--c/src/exec/posix/src/Makefile.am1
-rw-r--r--c/src/exec/posix/src/mutexmp.c2
-rw-r--r--c/src/exec/posix/src/mutexsetprioceiling.c2
-rw-r--r--c/src/exec/posix/src/mutexunlock.c2
-rw-r--r--c/src/exec/posix/src/semaphoremp.c125
-rw-r--r--c/src/exec/posix/src/sempost.c2
-rw-r--r--c/src/exec/posix/src/semunlink.c3
-rw-r--r--cpukit/posix/src/Makefile.am1
-rw-r--r--cpukit/posix/src/mutexmp.c2
-rw-r--r--cpukit/posix/src/mutexsetprioceiling.c2
-rw-r--r--cpukit/posix/src/mutexunlock.c2
-rw-r--r--cpukit/posix/src/semaphoremp.c125
-rw-r--r--cpukit/posix/src/sempost.c2
-rw-r--r--cpukit/posix/src/semunlink.c3
14 files changed, 254 insertions, 20 deletions
diff --git a/c/src/exec/posix/src/Makefile.am b/c/src/exec/posix/src/Makefile.am
index 06509bd125..38a9615125 100644
--- a/c/src/exec/posix/src/Makefile.am
+++ b/c/src/exec/posix/src/Makefile.am
@@ -32,6 +32,7 @@ MESSAGE_QUEUE_C_FILES = mqueue.c mqueueclose.c mqueuecreatesupp.c \
mqueueopen.c mqueuereceive.c mqueuerecvsupp.c mqueuesend.c \
mqueuesendsupp.c mqueuesetattr.c mqueuetimedreceive.c mqueuetimedsend.c \
mqueueunlink.c
+
MUTEX_C_FILES = mutex.c mutexattrdestroy.c mutexattrgetprioceiling.c \
mutexattrgetprotocol.c mutexattrgetpshared.c mutexattrinit.c \
mutexattrsetprioceiling.c mutexattrsetprotocol.c mutexattrsetpshared.c \
diff --git a/c/src/exec/posix/src/mutexmp.c b/c/src/exec/posix/src/mutexmp.c
index 9726c0beff..dbdb44b708 100644
--- a/c/src/exec/posix/src/mutexmp.c
+++ b/c/src/exec/posix/src/mutexmp.c
@@ -48,7 +48,7 @@ int _POSIX_Mutex_MP_Send_request_packet (
return POSIX_MP_NOT_IMPLEMENTED();
}
-void POSIX_Threads_mutex_MP_support(
+void _POSIX_Threads_mutex_MP_support(
Thread_Control *the_thread,
Objects_Id id
)
diff --git a/c/src/exec/posix/src/mutexsetprioceiling.c b/c/src/exec/posix/src/mutexsetprioceiling.c
index ff9229f5ec..9d491d438b 100644
--- a/c/src/exec/posix/src/mutexsetprioceiling.c
+++ b/c/src/exec/posix/src/mutexsetprioceiling.c
@@ -66,7 +66,7 @@ int pthread_mutex_setprioceiling(
&the_mutex->Mutex,
the_mutex->Object.id,
#if defined(RTEMS_MULTIPROCESSING)
- POSIX_Threads_mutex_MP_support
+ _POSIX_Threads_mutex_MP_support
#else
NULL
#endif
diff --git a/c/src/exec/posix/src/mutexunlock.c b/c/src/exec/posix/src/mutexunlock.c
index 3f5d5a03f3..3b6fdcc7e0 100644
--- a/c/src/exec/posix/src/mutexunlock.c
+++ b/c/src/exec/posix/src/mutexunlock.c
@@ -49,7 +49,7 @@ int pthread_mutex_unlock(
&the_mutex->Mutex,
the_mutex->Object.id,
#if defined(RTEMS_MULTIPROCESSING)
- POSIX_Threads_mutex_MP_support
+ _POSIX_Threads_mutex_MP_support
#else
NULL
#endif
diff --git a/c/src/exec/posix/src/semaphoremp.c b/c/src/exec/posix/src/semaphoremp.c
index ef83a4ee6c..9eed7d67d6 100644
--- a/c/src/exec/posix/src/semaphoremp.c
+++ b/c/src/exec/posix/src/semaphoremp.c
@@ -16,10 +16,127 @@
#include <rtems/posix/time.h>
#include <rtems/posix/seterr.h>
-void POSIX_Semaphore_MP_support(
- Thread_Control *the_thread,
- Objects_Id id
+#if defined(RTEMS_MULTIPROCESSING)
+/*
+ * _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_MP_NOT_IMPLEMENTED();
+}
+
+/*
+ * _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
)
{
- (void) POSIX_MP_NOT_IMPLEMENTED();
+ POSIX_MP_NOT_IMPLEMENTED();
+ return 0;
}
+
+/*
+ * _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_MP_NOT_IMPLEMENTED();
+}
+
+/*
+ *
+ * _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_MP_NOT_IMPLEMENTED();
+}
+
+/*
+ * _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_MP_NOT_IMPLEMENTED();
+}
+
+/*
+ * _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_MP_NOT_IMPLEMENTED();
+}
+
+/*
+ * _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 )
+{
+ POSIX_MP_NOT_IMPLEMENTED();
+ return NULL;
+}
+
+#endif /* endif RTEMS_MULTIPROCESSING */
diff --git a/c/src/exec/posix/src/sempost.c b/c/src/exec/posix/src/sempost.c
index d3375ce80d..5a646eee82 100644
--- a/c/src/exec/posix/src/sempost.c
+++ b/c/src/exec/posix/src/sempost.c
@@ -41,7 +41,7 @@ int sem_post(
&the_semaphore->Semaphore,
the_semaphore->Object.id,
#if defined(RTEMS_MULTIPROCESSING)
- POSIX_Semaphore_MP_support
+ NULL /* XXX need to define a routine to handle this case */
#else
NULL
#endif
diff --git a/c/src/exec/posix/src/semunlink.c b/c/src/exec/posix/src/semunlink.c
index 2690758417..d687629e46 100644
--- a/c/src/exec/posix/src/semunlink.c
+++ b/c/src/exec/posix/src/semunlink.c
@@ -33,7 +33,6 @@ int sem_unlink(
int status;
register POSIX_Semaphore_Control *the_semaphore;
Objects_Id the_semaphore_id;
- Objects_Locations location;
_Thread_Disable_dispatch();
@@ -52,7 +51,7 @@ int sem_unlink(
set_errno_and_return_minus_one( ENOSYS );
}
- the_semaphore = _Objects_Get_local_object(
+ the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object(
&_POSIX_Semaphore_Information,
_Objects_Get_index( the_semaphore_id )
);
diff --git a/cpukit/posix/src/Makefile.am b/cpukit/posix/src/Makefile.am
index 06509bd125..38a9615125 100644
--- a/cpukit/posix/src/Makefile.am
+++ b/cpukit/posix/src/Makefile.am
@@ -32,6 +32,7 @@ MESSAGE_QUEUE_C_FILES = mqueue.c mqueueclose.c mqueuecreatesupp.c \
mqueueopen.c mqueuereceive.c mqueuerecvsupp.c mqueuesend.c \
mqueuesendsupp.c mqueuesetattr.c mqueuetimedreceive.c mqueuetimedsend.c \
mqueueunlink.c
+
MUTEX_C_FILES = mutex.c mutexattrdestroy.c mutexattrgetprioceiling.c \
mutexattrgetprotocol.c mutexattrgetpshared.c mutexattrinit.c \
mutexattrsetprioceiling.c mutexattrsetprotocol.c mutexattrsetpshared.c \
diff --git a/cpukit/posix/src/mutexmp.c b/cpukit/posix/src/mutexmp.c
index 9726c0beff..dbdb44b708 100644
--- a/cpukit/posix/src/mutexmp.c
+++ b/cpukit/posix/src/mutexmp.c
@@ -48,7 +48,7 @@ int _POSIX_Mutex_MP_Send_request_packet (
return POSIX_MP_NOT_IMPLEMENTED();
}
-void POSIX_Threads_mutex_MP_support(
+void _POSIX_Threads_mutex_MP_support(
Thread_Control *the_thread,
Objects_Id id
)
diff --git a/cpukit/posix/src/mutexsetprioceiling.c b/cpukit/posix/src/mutexsetprioceiling.c
index ff9229f5ec..9d491d438b 100644
--- a/cpukit/posix/src/mutexsetprioceiling.c
+++ b/cpukit/posix/src/mutexsetprioceiling.c
@@ -66,7 +66,7 @@ int pthread_mutex_setprioceiling(
&the_mutex->Mutex,
the_mutex->Object.id,
#if defined(RTEMS_MULTIPROCESSING)
- POSIX_Threads_mutex_MP_support
+ _POSIX_Threads_mutex_MP_support
#else
NULL
#endif
diff --git a/cpukit/posix/src/mutexunlock.c b/cpukit/posix/src/mutexunlock.c
index 3f5d5a03f3..3b6fdcc7e0 100644
--- a/cpukit/posix/src/mutexunlock.c
+++ b/cpukit/posix/src/mutexunlock.c
@@ -49,7 +49,7 @@ int pthread_mutex_unlock(
&the_mutex->Mutex,
the_mutex->Object.id,
#if defined(RTEMS_MULTIPROCESSING)
- POSIX_Threads_mutex_MP_support
+ _POSIX_Threads_mutex_MP_support
#else
NULL
#endif
diff --git a/cpukit/posix/src/semaphoremp.c b/cpukit/posix/src/semaphoremp.c
index ef83a4ee6c..9eed7d67d6 100644
--- a/cpukit/posix/src/semaphoremp.c
+++ b/cpukit/posix/src/semaphoremp.c
@@ -16,10 +16,127 @@
#include <rtems/posix/time.h>
#include <rtems/posix/seterr.h>
-void POSIX_Semaphore_MP_support(
- Thread_Control *the_thread,
- Objects_Id id
+#if defined(RTEMS_MULTIPROCESSING)
+/*
+ * _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_MP_NOT_IMPLEMENTED();
+}
+
+/*
+ * _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
)
{
- (void) POSIX_MP_NOT_IMPLEMENTED();
+ POSIX_MP_NOT_IMPLEMENTED();
+ return 0;
}
+
+/*
+ * _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_MP_NOT_IMPLEMENTED();
+}
+
+/*
+ *
+ * _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_MP_NOT_IMPLEMENTED();
+}
+
+/*
+ * _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_MP_NOT_IMPLEMENTED();
+}
+
+/*
+ * _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_MP_NOT_IMPLEMENTED();
+}
+
+/*
+ * _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 )
+{
+ POSIX_MP_NOT_IMPLEMENTED();
+ return NULL;
+}
+
+#endif /* endif RTEMS_MULTIPROCESSING */
diff --git a/cpukit/posix/src/sempost.c b/cpukit/posix/src/sempost.c
index d3375ce80d..5a646eee82 100644
--- a/cpukit/posix/src/sempost.c
+++ b/cpukit/posix/src/sempost.c
@@ -41,7 +41,7 @@ int sem_post(
&the_semaphore->Semaphore,
the_semaphore->Object.id,
#if defined(RTEMS_MULTIPROCESSING)
- POSIX_Semaphore_MP_support
+ NULL /* XXX need to define a routine to handle this case */
#else
NULL
#endif
diff --git a/cpukit/posix/src/semunlink.c b/cpukit/posix/src/semunlink.c
index 2690758417..d687629e46 100644
--- a/cpukit/posix/src/semunlink.c
+++ b/cpukit/posix/src/semunlink.c
@@ -33,7 +33,6 @@ int sem_unlink(
int status;
register POSIX_Semaphore_Control *the_semaphore;
Objects_Id the_semaphore_id;
- Objects_Locations location;
_Thread_Disable_dispatch();
@@ -52,7 +51,7 @@ int sem_unlink(
set_errno_and_return_minus_one( ENOSYS );
}
- the_semaphore = _Objects_Get_local_object(
+ the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object(
&_POSIX_Semaphore_Information,
_Objects_Get_index( the_semaphore_id )
);