2007-11-28 Joel Sherrill <joel.sherrill@oarcorp.com>

* posix/Makefile.am, posix/preinstall.am, posix/src/cancel.c,
	posix/src/conddestroy.c, posix/src/condinit.c,
	posix/src/condsignalsupp.c, posix/src/condwaitsupp.c,
	posix/src/mqueueclose.c, posix/src/mqueuecreatesupp.c,
	posix/src/mqueuedeletesupp.c, posix/src/mqueuegetattr.c,
	posix/src/mqueuenotify.c, posix/src/mqueuerecvsupp.c,
	posix/src/mqueuesendsupp.c, posix/src/mqueuesetattr.c,
	posix/src/mqueueunlink.c, posix/src/mutexattrdestroy.c,
	posix/src/mutexattrgetprioceiling.c,
	posix/src/mutexattrgetprotocol.c, posix/src/mutexattrgetpshared.c,
	posix/src/mutexattrinit.c, posix/src/mutexattrsetprioceiling.c,
	posix/src/mutexattrsetprotocol.c, posix/src/mutexattrsetpshared.c,
	posix/src/mutexdefaultattributes.c, posix/src/mutexdestroy.c,
	posix/src/mutexgetprioceiling.c, posix/src/mutexinit.c,
	posix/src/mutexlocksupp.c, posix/src/mutexsetprioceiling.c,
	posix/src/mutexunlock.c, posix/src/semaphorecreatesupp.c,
	posix/src/semaphoredeletesupp.c, posix/src/semaphorewaitsupp.c,
	posix/src/semclose.c, posix/src/semdestroy.c,
	posix/src/semgetvalue.c, posix/src/sempost.c, posix/src/semunlink.c,
	posix/src/types.c, score/cpu/powerpc/rtems/old-exceptions/cpu.h:
	Remove all pretense of POSIX MP support. The support in place was
	only a shell. This should make maintenance easier.
	* posix/include/rtems/posix/condmp.h,
	posix/include/rtems/posix/mqueuemp.h,
	posix/include/rtems/posix/mutexmp.h,
	posix/include/rtems/posix/pthreadmp.h,
	posix/include/rtems/posix/semaphoremp.h, posix/src/condmp.c,
	posix/src/mutexmp.c, posix/src/semaphoremp.c: Removed.
This commit is contained in:
Joel Sherrill
2007-11-28 18:35:31 +00:00
parent ae10dbd9b6
commit b8596d80e1
50 changed files with 65 additions and 1391 deletions
+31
View File
@@ -1,3 +1,34 @@
2007-11-28 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/Makefile.am, posix/preinstall.am, posix/src/cancel.c,
posix/src/conddestroy.c, posix/src/condinit.c,
posix/src/condsignalsupp.c, posix/src/condwaitsupp.c,
posix/src/mqueueclose.c, posix/src/mqueuecreatesupp.c,
posix/src/mqueuedeletesupp.c, posix/src/mqueuegetattr.c,
posix/src/mqueuenotify.c, posix/src/mqueuerecvsupp.c,
posix/src/mqueuesendsupp.c, posix/src/mqueuesetattr.c,
posix/src/mqueueunlink.c, posix/src/mutexattrdestroy.c,
posix/src/mutexattrgetprioceiling.c,
posix/src/mutexattrgetprotocol.c, posix/src/mutexattrgetpshared.c,
posix/src/mutexattrinit.c, posix/src/mutexattrsetprioceiling.c,
posix/src/mutexattrsetprotocol.c, posix/src/mutexattrsetpshared.c,
posix/src/mutexdefaultattributes.c, posix/src/mutexdestroy.c,
posix/src/mutexgetprioceiling.c, posix/src/mutexinit.c,
posix/src/mutexlocksupp.c, posix/src/mutexsetprioceiling.c,
posix/src/mutexunlock.c, posix/src/semaphorecreatesupp.c,
posix/src/semaphoredeletesupp.c, posix/src/semaphorewaitsupp.c,
posix/src/semclose.c, posix/src/semdestroy.c,
posix/src/semgetvalue.c, posix/src/sempost.c, posix/src/semunlink.c,
posix/src/types.c, score/cpu/powerpc/rtems/old-exceptions/cpu.h:
Remove all pretense of POSIX MP support. The support in place was
only a shell. This should make maintenance easier.
* posix/include/rtems/posix/condmp.h,
posix/include/rtems/posix/mqueuemp.h,
posix/include/rtems/posix/mutexmp.h,
posix/include/rtems/posix/pthreadmp.h,
posix/include/rtems/posix/semaphoremp.h, posix/src/condmp.c,
posix/src/mutexmp.c, posix/src/semaphoremp.c: Removed.
2007-11-27 Joel Sherrill <joel.sherrill@OARcorp.com>
* configure.ac, score/inline/rtems/score/thread.inl,
+3 -9
View File
@@ -39,12 +39,6 @@ include_rtems_posix_HEADERS = include/rtems/posix/cancel.h \
include/rtems/posix/timer.h include/rtems/posix/barrier.h \
include/rtems/posix/rwlock.h include/rtems/posix/spinlock.h
if HAS_MP
include_rtems_posix_HEADERS += include/rtems/posix/condmp.h \
include/rtems/posix/mqueuemp.h include/rtems/posix/mutexmp.h \
include/rtems/posix/pthreadmp.h include/rtems/posix/semaphoremp.h
endif
include_rtems_posix_HEADERS += inline/rtems/posix/cond.inl \
inline/rtems/posix/key.inl inline/rtems/posix/mqueue.inl \
inline/rtems/posix/mutex.inl inline/rtems/posix/pthread.inl \
@@ -78,7 +72,7 @@ libposix_a_SOURCES += src/cancel.c src/cancelrun.c src/cleanuppop.c \
libposix_a_SOURCES += src/cond.c src/condattrdestroy.c \
src/condattrgetpshared.c src/condattrinit.c src/condattrsetpshared.c \
src/condbroadcast.c src/conddefaultattributes.c src/conddestroy.c \
src/condinit.c src/condmp.c src/condsignal.c src/condsignalsupp.c \
src/condinit.c src/condsignal.c src/condsignalsupp.c \
src/condtimedwait.c src/condwait.c src/condwaitsupp.c
## KEY_C_FILES
@@ -105,7 +99,7 @@ libposix_a_SOURCES += src/mutex.c src/mutexattrdestroy.c \
src/mutexattrsetprioceiling.c src/mutexattrsetprotocol.c \
src/mutexattrsetpshared.c src/mutexdefaultattributes.c \
src/mutexdestroy.c src/mutexfromcorestatus.c src/mutexgetprioceiling.c \
src/mutexinit.c src/mutexlock.c src/mutexlocksupp.c src/mutexmp.c \
src/mutexinit.c src/mutexlock.c src/mutexlocksupp.c \
src/mutexsetprioceiling.c src/mutextimedlock.c src/mutextrylock.c \
src/mutexunlock.c
@@ -145,7 +139,7 @@ libposix_a_SOURCES += src/prwlock.c src/prwlockdestroy.c src/prwlockinit.c \
## SEMAPHORE_C_FILES
libposix_a_SOURCES += src/semaphore.c src/semaphorecreatesupp.c \
src/semaphoredeletesupp.c src/semaphoremp.c src/semaphorenametoid.c \
src/semaphoredeletesupp.c src/semaphorenametoid.c \
src/semaphorewaitsupp.c src/semclose.c src/semdestroy.c \
src/semgetvalue.c src/seminit.c src/semopen.c src/sempost.c \
src/semtimedwait.c src/semtrywait.c src/semunlink.c src/semwait.c
-165
View File
@@ -1,165 +0,0 @@
/**
* @file rtems/posix/condmp.h
*/
/* 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-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#ifndef _RTEMS_POSIX_CONDMP_H
#define _RTEMS_POSIX_CONDMP_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 */
-164
View File
@@ -1,164 +0,0 @@
/**
* @file rtems/posix/mqueuemp.h
*/
/* 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-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#ifndef _RTEMS_POSIX_MQUEUEMP_H
#define _RTEMS_POSIX_MQUEUEMP_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 */
-177
View File
@@ -1,177 +0,0 @@
/**
* @file rtems/posix/mutexmp.h
*/
/* mutexmp.h
*
* This include file contains all the constants and structures associated
* with the Multiprocessing Support in the POSIX Mutex Manager.
*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#ifndef _RTEMS_POSIX_MUTEXMP_H
#define _RTEMS_POSIX_MUTEXMP_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_Threads_mutex_MP_support
*
* DESCRIPTION:
*
* This routine XXX
*/
void _POSIX_Threads_mutex_MP_support(
Thread_Control *the_thread,
Objects_Id id
);
/*
* _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 */
@@ -1,164 +0,0 @@
/**
* @file rtems/posix/pthreadmp.h
*/
/* pthreadmp.h
*
* This include file contains all the constants and structures associated
* with the Multiprocessing Support in the POSIX Threads Manager.
*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#ifndef _RTEMS_POSIX_PTHREADMP_H
#define _RTEMS_POSIX_PTHREADMP_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 */
@@ -1,164 +0,0 @@
/**
* @file rtems/posix/semaphoremp.h
*/
/* semaphoremp.h
*
* This include file contains all the constants and structures associated
* with the Multiprocessing Support in the POSIX Semaphore Manager.
*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#ifndef _RTEMS_POSIX_SEMAPHOREMP_H
#define _RTEMS_POSIX_SEMAPHOREMP_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 */
-21
View File
@@ -113,27 +113,6 @@ $(PROJECT_INCLUDE)/rtems/posix/spinlock.h: include/rtems/posix/spinlock.h $(PROJ
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/spinlock.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/spinlock.h
if HAS_MP
$(PROJECT_INCLUDE)/rtems/posix/condmp.h: include/rtems/posix/condmp.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/condmp.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/condmp.h
$(PROJECT_INCLUDE)/rtems/posix/mqueuemp.h: include/rtems/posix/mqueuemp.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/mqueuemp.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/mqueuemp.h
$(PROJECT_INCLUDE)/rtems/posix/mutexmp.h: include/rtems/posix/mutexmp.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/mutexmp.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/mutexmp.h
$(PROJECT_INCLUDE)/rtems/posix/pthreadmp.h: include/rtems/posix/pthreadmp.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/pthreadmp.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/pthreadmp.h
$(PROJECT_INCLUDE)/rtems/posix/semaphoremp.h: include/rtems/posix/semaphoremp.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/semaphoremp.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/semaphoremp.h
endif
$(PROJECT_INCLUDE)/rtems/posix/cond.inl: inline/rtems/posix/cond.inl $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/cond.inl
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/cond.inl
+2 -3
View File
@@ -40,12 +40,11 @@ int pthread_cancel(
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
case OBJECTS_ERROR:
return EINVAL;
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
return POSIX_MP_NOT_IMPLEMENTED();
#endif
case OBJECTS_ERROR:
return EINVAL;
case OBJECTS_LOCAL:
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
-4
View File
@@ -34,11 +34,7 @@ int pthread_cond_destroy(
switch ( location ) {
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
return EINVAL;
#endif
case OBJECTS_ERROR:
return EINVAL;
+1 -21
View File
@@ -35,7 +35,7 @@ int pthread_cond_init(
else the_attr = &_POSIX_Condition_variables_Default_attributes;
/*
* XXX: Be careful about attributes when global!!!
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
@@ -53,16 +53,6 @@ int pthread_cond_init(
return ENOMEM;
}
#if defined(RTEMS_MULTIPROCESSING)
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED &&
!( _Objects_MP_Allocate_and_open( &_POSIX_Condition_variables_Information,
0, the_cond->Object.id, FALSE ) ) ) {
_POSIX_Condition_variables_Free( the_cond );
_Thread_Enable_dispatch();
return EAGAIN;
}
#endif
the_cond->process_shared = the_attr->process_shared;
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
@@ -83,16 +73,6 @@ int pthread_cond_init(
*cond = the_cond->Object.id;
#if defined(RTEMS_MULTIPROCESSING)
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
_POSIX_Condition_variables_MP_Send_process_packet(
POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_CREATE,
the_cond->Object.id,
0, /* Name not used */
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return 0;
-45
View File
@@ -1,45 +0,0 @@
/*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <pthread.h>
#include <errno.h>
#include <rtems/system.h>
#include <rtems/score/object.h>
#include <rtems/score/states.h>
#include <rtems/score/watchdog.h>
#include <rtems/posix/cond.h>
#include <rtems/posix/time.h>
#include <rtems/posix/mutex.h>
/*
* TEMPORARY
*/
#if defined(RTEMS_MULTIPROCESSING)
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
)
{
(void) POSIX_MP_NOT_IMPLEMENTED();
}
void _POSIX_Condition_variables_MP_Send_extract_proxy(
Thread_Control *the_thread
)
{
(void) POSIX_MP_NOT_IMPLEMENTED();
}
#endif
/*
* END OF TEMPORARY
*/
+1 -5
View File
@@ -38,15 +38,11 @@ int _POSIX_Condition_variables_Signal_support(
switch ( location ) {
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
return EINVAL;
#endif
case OBJECTS_ERROR:
return EINVAL;
case OBJECTS_LOCAL:
case OBJECTS_LOCAL:
do {
the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue );
if ( !the_thread )
-3
View File
@@ -47,9 +47,6 @@ int _POSIX_Condition_variables_Wait_support(
switch ( location ) {
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
return EINVAL;
#endif
case OBJECTS_ERROR:
return EINVAL;
+3 -5
View File
@@ -47,14 +47,12 @@ int mq_close(
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EBADF );
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
rtems_set_errno_and_return_minus_one( EINVAL );
#endif
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EBADF );
case OBJECTS_LOCAL:
/*
* First update the actual message queue to reflect this descriptor
-25
View File
@@ -89,16 +89,6 @@ int _POSIX_Message_queue_Create_support(
attr = *attr_ptr;
}
#if 0 && defined(RTEMS_MULTIPROCESSING)
if ( pshared == PTHREAD_PROCESS_SHARED &&
!( _Objects_MP_Allocate_and_open( &_POSIX_Message_queue_Information, 0,
the_mq->Object.id, FALSE ) ) ) {
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
#endif
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
_Thread_Enable_dispatch();
@@ -139,11 +129,6 @@ int _POSIX_Message_queue_Create_support(
attr.mq_msgsize
) ) {
#if 0 && defined(RTEMS_MULTIPROCESSING)
if ( pshared == PTHREAD_PROCESS_SHARED )
_Objects_MP_Close( &_POSIX_Message_queue_Information, the_mq->Object.id );
#endif
_POSIX_Message_queue_Free( the_mq );
_Workspace_Free(name);
_Thread_Enable_dispatch();
@@ -158,16 +143,6 @@ int _POSIX_Message_queue_Create_support(
*message_queue = the_mq;
#if 0 && defined(RTEMS_MULTIPROCESSING)
if ( pshared == PTHREAD_PROCESS_SHARED )
_POSIX_Message_queue_MP_Send_process_packet(
POSIX_MESSAGE_QUEUE_MP_ANNOUNCE_CREATE,
the_mq->Object.id,
(char *) name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return 0;
}
-17
View File
@@ -57,22 +57,5 @@ void _POSIX_Message_queue_Delete(
_POSIX_Message_queue_Free( the_mq );
#if 0 && defined(RTEMS_MULTIPROCESSING)
if ( the_mq->process_shared == PTHREAD_PROCESS_SHARED ) {
_Objects_MP_Close(
&_POSIX_Message_queue_Information,
the_mq->Object.id
);
_POSIX_Message_queue_MP_Send_process_packet(
POSIX_MESSAGE_QUEUE_MP_ANNOUNCE_DELETE,
the_mq->Object.id,
0, /* Not used */
0 /* Not used */
);
}
#endif
}
}
+2 -5
View File
@@ -52,14 +52,11 @@ int mq_getattr(
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EBADF );
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
rtems_set_errno_and_return_minus_one( EINVAL );
#endif
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EBADF );
case OBJECTS_LOCAL:
the_mq = the_mq_fd->Queue;
+2 -5
View File
@@ -70,14 +70,11 @@ int mq_notify(
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EBADF );
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
rtems_set_errno_and_return_minus_one( EINVAL );
#endif
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EBADF );
case OBJECTS_LOCAL:
the_mq = the_mq_fd->Queue;
+2 -5
View File
@@ -55,14 +55,11 @@ ssize_t _POSIX_Message_queue_Receive_support(
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EBADF );
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
rtems_set_errno_and_return_minus_one( EINVAL );
#endif
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EBADF );
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
_Thread_Enable_dispatch();
+2 -10
View File
@@ -61,15 +61,11 @@ int _POSIX_Message_queue_Send_support(
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EBADF );
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
rtems_set_errno_and_return_minus_one( EINVAL );
#endif
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EBADF );
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
@@ -84,11 +80,7 @@ int _POSIX_Message_queue_Send_support(
msg_ptr,
msg_len,
mqdes, /* mqd_t is an object id */
#if defined(RTEMS_MULTIPROCESSING)
NULL, /* XXX _POSIX_Message_queue_Core_message_queue_mp_support*/
#else
NULL,
#endif
_POSIX_Message_queue_Priority_to_core( msg_prio ),
(the_mq_fd->oflag & O_NONBLOCK) ? FALSE : TRUE,
timeout /* no timeout */
+2 -5
View File
@@ -52,14 +52,11 @@ int mq_setattr(
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EBADF );
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
rtems_set_errno_and_return_minus_one( EINVAL );
#endif
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EBADF );
case OBJECTS_LOCAL:
the_core_mq = &the_mq_fd->Queue->Message_queue;
-18
View File
@@ -54,29 +54,11 @@ int mq_unlink(
rtems_set_errno_and_return_minus_one( status );
}
/*
* Don't support unlinking a remote message queue.
*/
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id(the_mq_id) ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOSYS );
}
#endif
the_mq = (POSIX_Message_queue_Control *) _Objects_Get_local_object(
&_POSIX_Message_queue_Information,
_Objects_Get_index( the_mq_id )
);
#if 0 && defined(RTEMS_MULTIPROCESSING)
if ( the_mq->process_shared == PTHREAD_PROCESS_SHARED ) {
_Objects_MP_Close( &_POSIX_Message_queue_Information, the_mq_id );
}
#endif
the_mq->linked = FALSE;
_Workspace_Free( the_mq->Object.name );
_POSIX_Message_queue_Namespace_remove( the_mq );
-3
View File
@@ -12,9 +12,6 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#endif
#include <rtems/posix/mutex.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
@@ -12,9 +12,6 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#endif
#include <rtems/posix/mutex.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
-3
View File
@@ -12,9 +12,6 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#endif
#include <rtems/posix/mutex.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
-3
View File
@@ -12,9 +12,6 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#endif
#include <rtems/posix/mutex.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
-3
View File
@@ -12,9 +12,6 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#endif
#include <rtems/posix/mutex.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
@@ -12,9 +12,6 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#endif
#include <rtems/posix/mutex.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
-3
View File
@@ -12,9 +12,6 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#endif
#include <rtems/posix/mutex.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
-3
View File
@@ -12,9 +12,6 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#endif
#include <rtems/posix/mutex.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
@@ -12,9 +12,6 @@
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#endif
#include <rtems/posix/mutex.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
-3
View File
@@ -35,9 +35,6 @@ int pthread_mutex_destroy(
switch ( location ) {
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
return EINVAL;
#endif
case OBJECTS_ERROR:
return EINVAL;
-1
View File
@@ -39,7 +39,6 @@ int pthread_mutex_getprioceiling(
switch ( location ) {
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
return POSIX_MP_NOT_IMPLEMENTED(); /* XXX feels questionable */
#endif
case OBJECTS_ERROR:
return EINVAL;
+1 -3
View File
@@ -101,10 +101,8 @@ int pthread_mutex_init(
assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE );
#if defined(RTEMS_MULTIPROCESSING)
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return POSIX_MP_NOT_IMPLEMENTED();
#endif
return ENOSYS;
/*
* Determine the discipline of the mutex
-6
View File
@@ -41,12 +41,6 @@ int _POSIX_Mutex_Lock_support(
switch ( location ) {
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
return _POSIX_Mutex_MP_Send_request_packet(
POSIX_MUTEX_MP_OBTAIN_REQUEST,
*mutex,
0, /* must define the option set */
WATCHDOG_NO_TIMEOUT
);
#endif
case OBJECTS_ERROR:
return EINVAL;
-65
View File
@@ -1,65 +0,0 @@
/*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <errno.h>
#include <pthread.h>
#include <rtems/system.h>
#include <rtems/score/coremutex.h>
#include <rtems/score/watchdog.h>
#if defined(RTEMS_MULTIPROCESSING)
#include <rtems/score/mpci.h>
#endif
#include <rtems/posix/mutex.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/time.h>
/*
* TEMPORARY
*/
#if defined(RTEMS_MULTIPROCESSING)
void _POSIX_Mutex_MP_Send_process_packet (
POSIX_Mutex_MP_Remote_operations operation,
Objects_Id mutex_id,
Objects_Name name,
Objects_Id proxy_id
)
{
(void) POSIX_MP_NOT_IMPLEMENTED();
}
void _POSIX_Mutex_MP_Send_object_was_deleted (
Thread_Control *the_proxy
)
{
(void) POSIX_MP_NOT_IMPLEMENTED();
}
int _POSIX_Mutex_MP_Send_request_packet (
POSIX_Mutex_MP_Remote_operations operation,
Objects_Id mutex_id,
boolean wait, /* XXX options */
Watchdog_Interval timeout
)
{
return POSIX_MP_NOT_IMPLEMENTED();
}
void _POSIX_Threads_mutex_MP_support(
Thread_Control *the_thread,
Objects_Id id
)
{
(void) POSIX_MP_NOT_IMPLEMENTED(); /* XXX: should never get here */
}
#endif
/*
* END OF TEMPORARY
*/
-2
View File
@@ -55,8 +55,6 @@ int pthread_mutex_setprioceiling(
switch ( location ) {
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* XXX It feels questionable to set the ceiling on a remote mutex. */
return EINVAL;
#endif
case OBJECTS_ERROR:
return EINVAL; /* impossible to get here */
-6
View File
@@ -38,12 +38,6 @@ int pthread_mutex_unlock(
switch ( location ) {
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
return _POSIX_Mutex_MP_Send_request_packet(
POSIX_MUTEX_MP_RELEASE_REQUEST,
*mutex,
0, /* Not used */
MPCI_DEFAULT_TIMEOUT
);
#endif
case OBJECTS_ERROR:
return EINVAL;
-20
View File
@@ -63,16 +63,6 @@ int _POSIX_Semaphore_Create_support(
rtems_set_errno_and_return_minus_one( ENOSPC );
}
#if defined(RTEMS_MULTIPROCESSING)
if ( pshared == PTHREAD_PROCESS_SHARED &&
!( _Objects_MP_Allocate_and_open( &_POSIX_Semaphore_Information, 0,
the_semaphore->Object.id, FALSE ) ) ) {
_POSIX_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
#endif
the_semaphore->process_shared = pshared;
if ( name ) {
@@ -113,16 +103,6 @@ int _POSIX_Semaphore_Create_support(
*the_sem = the_semaphore;
#if defined(RTEMS_MULTIPROCESSING)
if ( pshared == PTHREAD_PROCESS_SHARED )
_POSIX_Semaphore_MP_Send_process_packet(
POSIX_SEMAPHORE_MP_ANNOUNCE_CREATE,
the_semaphore->Object.id,
name_p,
0 /* proxy id - Not used */
);
#endif
_Thread_Enable_dispatch();
return 0;
}
+1 -23
View File
@@ -34,32 +34,10 @@ void _POSIX_Semaphore_Delete(
_CORE_semaphore_Flush(
&the_semaphore->Semaphore,
#if defined(RTEMS_MULTIPROCESSING)
_POSIX_Semaphore_MP_Send_object_was_deleted,
#else
NULL,
#endif
-1 /* XXX should also seterrno -> EINVAL */
-1
);
_POSIX_Semaphore_Free( the_semaphore );
#if defined(RTEMS_MULTIPROCESSING)
if ( the_semaphore->process_shared == PTHREAD_PROCESS_SHARED ) {
_Objects_MP_Close(
&_POSIX_Semaphore_Information,
the_semaphore->Object.id
);
_POSIX_Semaphore_MP_Send_process_packet(
POSIX_SEMAPHORE_MP_ANNOUNCE_DELETE,
the_semaphore->Object.id,
0, /* Not used */
0 /* Not used */
);
}
#endif
}
}
-146
View File
@@ -1,146 +0,0 @@
/*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdarg.h>
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <semaphore.h>
#include <limits.h>
#include <rtems/system.h>
#include <rtems/score/object.h>
#include <rtems/posix/semaphore.h>
#include <rtems/posix/time.h>
#include <rtems/seterr.h>
#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
)
{
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 */
+2 -4
View File
@@ -36,13 +36,11 @@ int _POSIX_Semaphore_Wait_support(
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EINVAL );
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
_Thread_Dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
#endif
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_LOCAL:
_CORE_semaphore_Seize(
&the_semaphore->Semaphore,
+2 -5
View File
@@ -39,14 +39,11 @@ int sem_close(
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EINVAL );
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
rtems_set_errno_and_return_minus_one( EINVAL );
#endif
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_LOCAL:
the_semaphore->open_count -= 1;
_POSIX_Semaphore_Delete( the_semaphore );
+2 -5
View File
@@ -34,14 +34,11 @@ int sem_destroy(
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EINVAL );
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
rtems_set_errno_and_return_minus_one( EINVAL );
#endif
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_LOCAL:
/*
* Undefined operation on a named semaphore.
+2 -5
View File
@@ -35,14 +35,11 @@ int sem_getvalue(
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EINVAL );
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
rtems_set_errno_and_return_minus_one( EINVAL );
#endif
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_LOCAL:
*sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore );
_Thread_Enable_dispatch();
+2 -5
View File
@@ -34,14 +34,11 @@ int sem_post(
the_semaphore = _POSIX_Semaphore_Get( sem, &location );
switch ( location ) {
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EINVAL );
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
_Thread_Dispatch();
return POSIX_MP_NOT_IMPLEMENTED();
rtems_set_errno_and_return_minus_one( EINVAL );
#endif
case OBJECTS_ERROR:
rtems_set_errno_and_return_minus_one( EINVAL );
case OBJECTS_LOCAL:
_CORE_semaphore_Surrender(
&the_semaphore->Semaphore,
-17
View File
@@ -46,28 +46,11 @@ int sem_unlink(
rtems_set_errno_and_return_minus_one( status );
}
/*
* Don't support unlinking a remote semaphore.
*/
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id((Objects_Id)the_semaphore_id) ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOSYS );
}
#endif
the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object(
&_POSIX_Semaphore_Information,
_Objects_Get_index( the_semaphore_id )
);
#if defined(RTEMS_MULTIPROCESSING)
if ( the_semaphore->process_shared == PTHREAD_PROCESS_SHARED ) {
_Objects_MP_Close( &_POSIX_Semaphore_Information, the_semaphore_id );
}
#endif
the_semaphore->linked = FALSE;
_POSIX_Semaphore_Namespace_remove( the_semaphore );
_POSIX_Semaphore_Delete( the_semaphore );
-8
View File
@@ -23,14 +23,6 @@
#include <assert.h>
#if defined(RTEMS_MULTIPROCESSING)
int POSIX_MP_NOT_IMPLEMENTED()
{
assert( 0 );
return 0;
}
#endif
int POSIX_BOTTOM_REACHED()
{
assert( 0 );
@@ -195,6 +195,7 @@ typedef struct {
void (*stack_free_hook)( void* );
/* end of fields required on all CPUs */
#if 0
uint32_t clicks_per_usec; /* Timer clicks per microsecond */
void (*spurious_handler)(uint32_t vector, CPU_Interrupt_frame *);
boolean exceptions_in_RAM; /* TRUE if in RAM */
@@ -215,6 +216,7 @@ typedef struct {
|| defined(mpc860) || defined(mpc821) || defined(mpc8260))
uint32_t clock_speed; /* Speed of CPU in Hz */
#endif
#endif
} rtems_cpu_table;
#endif