forked from Imagelibrary/rtems
Added --disable-multiprocessing flag and modified a lot of files to make
it work.
This commit is contained in:
4
aclocal.m4
vendored
4
aclocal.m4
vendored
@@ -323,7 +323,7 @@ else
|
|||||||
*) # invalid for AC_PATH_PROG
|
*) # invalid for AC_PATH_PROG
|
||||||
AC_MSG_RESULT("no")
|
AC_MSG_RESULT("no")
|
||||||
AC_MSG_ERROR([***]
|
AC_MSG_ERROR([***]
|
||||||
[Environment variable $1 should ether]
|
[Environment variable $1 should either]
|
||||||
[be unset (preferred) or contain an absolute path])
|
[be unset (preferred) or contain an absolute path])
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -354,7 +354,7 @@ dnl special treatment of ranlib
|
|||||||
else
|
else
|
||||||
AC_MSG_ERROR([***]
|
AC_MSG_ERROR([***]
|
||||||
[Can't figure out how to build a library index]
|
[Can't figure out how to build a library index]
|
||||||
[Nether ranlib nor ar -s seem to be available] )
|
[Neither ranlib nor ar -s seem to be available] )
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,13 @@ VPATH = @srcdir@
|
|||||||
RTEMS_ROOT = @top_srcdir@
|
RTEMS_ROOT = @top_srcdir@
|
||||||
PROJECT_ROOT = @PROJECT_ROOT@
|
PROJECT_ROOT = @PROJECT_ROOT@
|
||||||
|
|
||||||
H_PIECES= cond condmp config key mutex mutexmp posixapi \
|
# We only build multiprocessing related files if HAS_MP was defined
|
||||||
priority psignal pthread pthreadmp seterr threadsup time
|
MP_PIECES_yes_V = condmp mutexmp pthreadmp
|
||||||
#H_PIECES= cancel cond condmp intr key mqueue mqueuemp mutex \
|
MP_PIECES = $(MP_PIECES_$(HAS_MP)_V)
|
||||||
|
|
||||||
|
H_PIECES= cond config key mutex posixapi \
|
||||||
|
priority psignal pthread seterr threadsup time
|
||||||
|
#H_PIECES= cancel cond intr key mqueue mqueuemp mutex \
|
||||||
# mutexmp pthread pthreadmp priority semaphore semaphoremp threadsup \
|
# mutexmp pthread pthreadmp priority semaphore semaphoremp threadsup \
|
||||||
# time
|
# time
|
||||||
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
|
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
|
||||||
|
|||||||
@@ -119,7 +119,9 @@ RTEMS_INLINE_ROUTINE boolean _POSIX_Condition_variables_Is_null (
|
|||||||
);
|
);
|
||||||
|
|
||||||
#include <rtems/posix/cond.inl>
|
#include <rtems/posix/cond.inl>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/posix/condmp.h>
|
#include <rtems/posix/condmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,7 +175,9 @@ RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Message_queue_Priority_to_core(
|
|||||||
);
|
);
|
||||||
|
|
||||||
#include <rtems/posix/mqueue.inl>
|
#include <rtems/posix/mqueue.inl>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/posix/mqueuemp.h>
|
#include <rtems/posix/mqueuemp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,9 @@ RTEMS_INLINE_ROUTINE boolean _POSIX_Mutex_Is_null (
|
|||||||
);
|
);
|
||||||
|
|
||||||
#include <rtems/posix/mutex.inl>
|
#include <rtems/posix/mutex.inl>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/posix/mutexmp.h>
|
#include <rtems/posix/mutexmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,7 +112,9 @@ RTEMS_INLINE_ROUTINE boolean _POSIX_Threads_Is_null(
|
|||||||
);
|
);
|
||||||
|
|
||||||
#include <rtems/posix/pthread.inl>
|
#include <rtems/posix/pthread.inl>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/posix/pthreadmp.h>
|
#include <rtems/posix/pthreadmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,7 +124,9 @@ int _POSIX_Semaphore_Name_to_id(
|
|||||||
);
|
);
|
||||||
|
|
||||||
#include <rtems/posix/semaphore.inl>
|
#include <rtems/posix/semaphore.inl>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/posix/semaphoremp.h>
|
#include <rtems/posix/semaphoremp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,13 @@ VPATH = @srcdir@
|
|||||||
RTEMS_ROOT = @top_srcdir@
|
RTEMS_ROOT = @top_srcdir@
|
||||||
PROJECT_ROOT = @PROJECT_ROOT@
|
PROJECT_ROOT = @PROJECT_ROOT@
|
||||||
|
|
||||||
H_PIECES= cond condmp config key mutex mutexmp posixapi \
|
# We only build multiprocessing related files if HAS_MP was defined
|
||||||
priority psignal pthread pthreadmp seterr threadsup time
|
MP_PIECES_yes_V = condmp mutexmp pthreadmp
|
||||||
#H_PIECES= cancel cond condmp intr key mqueue mqueuemp mutex \
|
MP_PIECES = $(MP_PIECES_$(HAS_MP)_V)
|
||||||
|
|
||||||
|
H_PIECES= cond config key mutex posixapi \
|
||||||
|
priority psignal pthread seterr threadsup time
|
||||||
|
#H_PIECES= cancel cond intr key mqueue mqueuemp mutex \
|
||||||
# mutexmp pthread pthreadmp priority semaphore semaphoremp threadsup \
|
# mutexmp pthread pthreadmp priority semaphore semaphoremp threadsup \
|
||||||
# time
|
# time
|
||||||
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
|
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
|
||||||
|
|||||||
@@ -119,7 +119,9 @@ RTEMS_INLINE_ROUTINE boolean _POSIX_Condition_variables_Is_null (
|
|||||||
);
|
);
|
||||||
|
|
||||||
#include <rtems/posix/cond.inl>
|
#include <rtems/posix/cond.inl>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/posix/condmp.h>
|
#include <rtems/posix/condmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,7 +175,9 @@ RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Message_queue_Priority_to_core(
|
|||||||
);
|
);
|
||||||
|
|
||||||
#include <rtems/posix/mqueue.inl>
|
#include <rtems/posix/mqueue.inl>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/posix/mqueuemp.h>
|
#include <rtems/posix/mqueuemp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,9 @@ RTEMS_INLINE_ROUTINE boolean _POSIX_Mutex_Is_null (
|
|||||||
);
|
);
|
||||||
|
|
||||||
#include <rtems/posix/mutex.inl>
|
#include <rtems/posix/mutex.inl>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/posix/mutexmp.h>
|
#include <rtems/posix/mutexmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,7 +112,9 @@ RTEMS_INLINE_ROUTINE boolean _POSIX_Threads_Is_null(
|
|||||||
);
|
);
|
||||||
|
|
||||||
#include <rtems/posix/pthread.inl>
|
#include <rtems/posix/pthread.inl>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/posix/pthreadmp.h>
|
#include <rtems/posix/pthreadmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -124,7 +124,9 @@ int _POSIX_Semaphore_Name_to_id(
|
|||||||
);
|
);
|
||||||
|
|
||||||
#include <rtems/posix/semaphore.inl>
|
#include <rtems/posix/semaphore.inl>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/posix/semaphoremp.h>
|
#include <rtems/posix/semaphoremp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
* TEMPORARY
|
* TEMPORARY
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
void _POSIX_Condition_variables_MP_Send_process_packet (
|
void _POSIX_Condition_variables_MP_Send_process_packet (
|
||||||
POSIX_Condition_variables_MP_Remote_operations operation,
|
POSIX_Condition_variables_MP_Remote_operations operation,
|
||||||
Objects_Id condition_variables_id,
|
Objects_Id condition_variables_id,
|
||||||
@@ -33,6 +35,7 @@ void _POSIX_Condition_variables_MP_Send_extract_proxy(
|
|||||||
{
|
{
|
||||||
(void) POSIX_MP_NOT_IMPLEMENTED();
|
(void) POSIX_MP_NOT_IMPLEMENTED();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* END OF TEMPORARY
|
* END OF TEMPORARY
|
||||||
@@ -190,6 +193,7 @@ int pthread_cond_init(
|
|||||||
return ENOMEM;
|
return ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED &&
|
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED &&
|
||||||
!( _Objects_MP_Allocate_and_open( &_POSIX_Condition_variables_Information,
|
!( _Objects_MP_Allocate_and_open( &_POSIX_Condition_variables_Information,
|
||||||
0, the_cond->Object.id, FALSE ) ) ) {
|
0, the_cond->Object.id, FALSE ) ) ) {
|
||||||
@@ -197,6 +201,7 @@ int pthread_cond_init(
|
|||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return EAGAIN;
|
return EAGAIN;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
the_cond->process_shared = the_attr->process_shared;
|
the_cond->process_shared = the_attr->process_shared;
|
||||||
|
|
||||||
@@ -208,7 +213,11 @@ int pthread_cond_init(
|
|||||||
OBJECTS_POSIX_CONDITION_VARIABLES,
|
OBJECTS_POSIX_CONDITION_VARIABLES,
|
||||||
THREAD_QUEUE_DISCIPLINE_FIFO,
|
THREAD_QUEUE_DISCIPLINE_FIFO,
|
||||||
STATES_WAITING_FOR_CONDITION_VARIABLE,
|
STATES_WAITING_FOR_CONDITION_VARIABLE,
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_POSIX_Condition_variables_MP_Send_extract_proxy,
|
_POSIX_Condition_variables_MP_Send_extract_proxy,
|
||||||
|
#else
|
||||||
|
NULL,
|
||||||
|
#endif
|
||||||
ETIMEDOUT
|
ETIMEDOUT
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -220,6 +229,7 @@ int pthread_cond_init(
|
|||||||
|
|
||||||
*cond = the_cond->Object.id;
|
*cond = the_cond->Object.id;
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
|
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
|
||||||
_POSIX_Condition_variables_MP_Send_process_packet(
|
_POSIX_Condition_variables_MP_Send_process_packet(
|
||||||
POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_CREATE,
|
POSIX_CONDITION_VARIABLES_MP_ANNOUNCE_CREATE,
|
||||||
@@ -227,6 +237,7 @@ int pthread_cond_init(
|
|||||||
0, /* Name not used */
|
0, /* Name not used */
|
||||||
0 /* Not used */
|
0 /* Not used */
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
|
|
||||||
@@ -248,12 +259,17 @@ int pthread_cond_destroy(
|
|||||||
|
|
||||||
the_cond = _POSIX_Condition_variables_Get( cond, &location );
|
the_cond = _POSIX_Condition_variables_Get( cond, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return EINVAL;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Thread_Dispatch();
|
_Thread_Dispatch();
|
||||||
return POSIX_MP_NOT_IMPLEMENTED();
|
return POSIX_MP_NOT_IMPLEMENTED();
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return EINVAL;
|
||||||
|
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
|
|
||||||
if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
|
if ( _Thread_queue_First( &the_cond->Wait_queue ) ) {
|
||||||
@@ -268,6 +284,7 @@ int pthread_cond_destroy(
|
|||||||
|
|
||||||
_POSIX_Condition_variables_Free( the_cond );
|
_POSIX_Condition_variables_Free( the_cond );
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( the_cond->process_shared == PTHREAD_PROCESS_SHARED ) {
|
if ( the_cond->process_shared == PTHREAD_PROCESS_SHARED ) {
|
||||||
|
|
||||||
_Objects_MP_Close(
|
_Objects_MP_Close(
|
||||||
@@ -282,6 +299,7 @@ int pthread_cond_destroy(
|
|||||||
0 /* Not used */
|
0 /* Not used */
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -307,12 +325,15 @@ int _POSIX_Condition_variables_Signal_support(
|
|||||||
|
|
||||||
the_cond = _POSIX_Condition_variables_Get( cond, &location );
|
the_cond = _POSIX_Condition_variables_Get( cond, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return EINVAL;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Thread_Dispatch();
|
_Thread_Dispatch();
|
||||||
return POSIX_MP_NOT_IMPLEMENTED();
|
return POSIX_MP_NOT_IMPLEMENTED();
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return EINVAL;
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@@ -380,12 +401,14 @@ int _POSIX_Condition_variables_Wait_support(
|
|||||||
|
|
||||||
the_cond = _POSIX_Condition_variables_Get( cond, &location );
|
the_cond = _POSIX_Condition_variables_Get( cond, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return EINVAL;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Thread_Dispatch();
|
_Thread_Dispatch();
|
||||||
return POSIX_MP_NOT_IMPLEMENTED();
|
return POSIX_MP_NOT_IMPLEMENTED();
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
#endif
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return EINVAL;
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
|
|
||||||
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
|
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
|
||||||
|
|||||||
@@ -9,7 +9,9 @@
|
|||||||
#include <rtems/system.h>
|
#include <rtems/system.h>
|
||||||
#include <rtems/score/coremutex.h>
|
#include <rtems/score/coremutex.h>
|
||||||
#include <rtems/score/watchdog.h>
|
#include <rtems/score/watchdog.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/score/mpci.h>
|
#include <rtems/score/mpci.h>
|
||||||
|
#endif
|
||||||
#include <rtems/posix/mutex.h>
|
#include <rtems/posix/mutex.h>
|
||||||
#include <rtems/posix/priority.h>
|
#include <rtems/posix/priority.h>
|
||||||
#include <rtems/posix/time.h>
|
#include <rtems/posix/time.h>
|
||||||
@@ -18,6 +20,7 @@
|
|||||||
* TEMPORARY
|
* TEMPORARY
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
void _POSIX_Mutex_MP_Send_process_packet (
|
void _POSIX_Mutex_MP_Send_process_packet (
|
||||||
POSIX_Mutex_MP_Remote_operations operation,
|
POSIX_Mutex_MP_Remote_operations operation,
|
||||||
Objects_Id mutex_id,
|
Objects_Id mutex_id,
|
||||||
@@ -52,6 +55,7 @@ void POSIX_Threads_mutex_MP_support(
|
|||||||
{
|
{
|
||||||
(void) POSIX_MP_NOT_IMPLEMENTED(); /* XXX: should never get here */
|
(void) POSIX_MP_NOT_IMPLEMENTED(); /* XXX: should never get here */
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* END OF TEMPORARY
|
* END OF TEMPORARY
|
||||||
@@ -238,9 +242,9 @@ int pthread_mutex_init(
|
|||||||
|
|
||||||
mutex_in_use = _POSIX_Mutex_Get( mutex, &location );
|
mutex_in_use = _POSIX_Mutex_Get( mutex, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
|
case OBJECTS_REMOTE:
|
||||||
case OBJECTS_ERROR:
|
case OBJECTS_ERROR:
|
||||||
break;
|
break;
|
||||||
case OBJECTS_REMOTE:
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return EBUSY;
|
return EBUSY;
|
||||||
@@ -256,8 +260,10 @@ int pthread_mutex_init(
|
|||||||
|
|
||||||
assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE );
|
assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE );
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
|
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
|
||||||
return POSIX_MP_NOT_IMPLEMENTED();
|
return POSIX_MP_NOT_IMPLEMENTED();
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Determine the discipline of the mutex
|
* Determine the discipline of the mutex
|
||||||
@@ -289,6 +295,7 @@ int pthread_mutex_init(
|
|||||||
return EAGAIN;
|
return EAGAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED &&
|
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED &&
|
||||||
!( _Objects_MP_Allocate_and_open( &_POSIX_Mutex_Information, 0,
|
!( _Objects_MP_Allocate_and_open( &_POSIX_Mutex_Information, 0,
|
||||||
the_mutex->Object.id, FALSE ) ) ) {
|
the_mutex->Object.id, FALSE ) ) ) {
|
||||||
@@ -296,6 +303,7 @@ int pthread_mutex_init(
|
|||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return EAGAIN;
|
return EAGAIN;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
the_mutex->process_shared = the_attr->process_shared;
|
the_mutex->process_shared = the_attr->process_shared;
|
||||||
|
|
||||||
@@ -322,6 +330,7 @@ int pthread_mutex_init(
|
|||||||
|
|
||||||
*mutex = the_mutex->Object.id;
|
*mutex = the_mutex->Object.id;
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
|
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
|
||||||
_POSIX_Mutex_MP_Send_process_packet(
|
_POSIX_Mutex_MP_Send_process_packet(
|
||||||
POSIX_MUTEX_MP_ANNOUNCE_CREATE,
|
POSIX_MUTEX_MP_ANNOUNCE_CREATE,
|
||||||
@@ -329,6 +338,7 @@ int pthread_mutex_init(
|
|||||||
0, /* Name not used */
|
0, /* Name not used */
|
||||||
0 /* Not used */
|
0 /* Not used */
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return 0;
|
return 0;
|
||||||
@@ -348,12 +358,14 @@ int pthread_mutex_destroy(
|
|||||||
|
|
||||||
the_mutex = _POSIX_Mutex_Get( mutex, &location );
|
the_mutex = _POSIX_Mutex_Get( mutex, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return EINVAL;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Thread_Dispatch();
|
_Thread_Dispatch();
|
||||||
return POSIX_MP_NOT_IMPLEMENTED();
|
return POSIX_MP_NOT_IMPLEMENTED();
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
#endif
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return EINVAL;
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
/*
|
/*
|
||||||
* XXX: There is an error for the mutex being locked
|
* XXX: There is an error for the mutex being locked
|
||||||
@@ -369,12 +381,17 @@ int pthread_mutex_destroy(
|
|||||||
|
|
||||||
_CORE_mutex_Flush(
|
_CORE_mutex_Flush(
|
||||||
&the_mutex->Mutex,
|
&the_mutex->Mutex,
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_POSIX_Mutex_MP_Send_object_was_deleted,
|
_POSIX_Mutex_MP_Send_object_was_deleted,
|
||||||
|
#else
|
||||||
|
NULL,
|
||||||
|
#endif
|
||||||
EINVAL
|
EINVAL
|
||||||
);
|
);
|
||||||
|
|
||||||
_POSIX_Mutex_Free( the_mutex );
|
_POSIX_Mutex_Free( the_mutex );
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( the_mutex->process_shared == PTHREAD_PROCESS_SHARED ) {
|
if ( the_mutex->process_shared == PTHREAD_PROCESS_SHARED ) {
|
||||||
|
|
||||||
_Objects_MP_Close( &_POSIX_Mutex_Information, the_mutex->Object.id );
|
_Objects_MP_Close( &_POSIX_Mutex_Information, the_mutex->Object.id );
|
||||||
@@ -386,6 +403,7 @@ int pthread_mutex_destroy(
|
|||||||
0 /* Not used */
|
0 /* Not used */
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -411,15 +429,17 @@ int _POSIX_Mutex_Lock_support(
|
|||||||
|
|
||||||
the_mutex = _POSIX_Mutex_Get( mutex, &location );
|
the_mutex = _POSIX_Mutex_Get( mutex, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return EINVAL;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
return _POSIX_Mutex_MP_Send_request_packet(
|
return _POSIX_Mutex_MP_Send_request_packet(
|
||||||
POSIX_MUTEX_MP_OBTAIN_REQUEST,
|
POSIX_MUTEX_MP_OBTAIN_REQUEST,
|
||||||
*mutex,
|
*mutex,
|
||||||
0, /* must define the option set */
|
0, /* must define the option set */
|
||||||
WATCHDOG_NO_TIMEOUT
|
WATCHDOG_NO_TIMEOUT
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return EINVAL;
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
_CORE_mutex_Seize(
|
_CORE_mutex_Seize(
|
||||||
&the_mutex->Mutex,
|
&the_mutex->Mutex,
|
||||||
@@ -480,20 +500,26 @@ int pthread_mutex_unlock(
|
|||||||
|
|
||||||
the_mutex = _POSIX_Mutex_Get( mutex, &location );
|
the_mutex = _POSIX_Mutex_Get( mutex, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return EINVAL;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
return _POSIX_Mutex_MP_Send_request_packet(
|
return _POSIX_Mutex_MP_Send_request_packet(
|
||||||
POSIX_MUTEX_MP_RELEASE_REQUEST,
|
POSIX_MUTEX_MP_RELEASE_REQUEST,
|
||||||
*mutex,
|
*mutex,
|
||||||
0, /* Not used */
|
0, /* Not used */
|
||||||
MPCI_DEFAULT_TIMEOUT
|
MPCI_DEFAULT_TIMEOUT
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return EINVAL;
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
status = _CORE_mutex_Surrender(
|
status = _CORE_mutex_Surrender(
|
||||||
&the_mutex->Mutex,
|
&the_mutex->Mutex,
|
||||||
the_mutex->Object.id,
|
the_mutex->Object.id,
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
POSIX_Threads_mutex_MP_support
|
POSIX_Threads_mutex_MP_support
|
||||||
|
#else
|
||||||
|
NULL
|
||||||
|
#endif
|
||||||
);
|
);
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return _POSIX_Mutex_From_core_mutex_status( status );
|
return _POSIX_Mutex_From_core_mutex_status( status );
|
||||||
@@ -634,11 +660,13 @@ int pthread_mutex_setprioceiling(
|
|||||||
|
|
||||||
the_mutex = _POSIX_Mutex_Get( mutex, &location );
|
the_mutex = _POSIX_Mutex_Get( mutex, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return EINVAL; /* impossible to get here */
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
/* XXX It feels questionable to set the ceiling on a remote mutex. */
|
/* XXX It feels questionable to set the ceiling on a remote mutex. */
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
#endif
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return EINVAL; /* impossible to get here */
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
*old_ceiling = _POSIX_Priority_From_core(
|
*old_ceiling = _POSIX_Priority_From_core(
|
||||||
the_mutex->Mutex.Attributes.priority_ceiling
|
the_mutex->Mutex.Attributes.priority_ceiling
|
||||||
@@ -647,7 +675,11 @@ int pthread_mutex_setprioceiling(
|
|||||||
_CORE_mutex_Surrender(
|
_CORE_mutex_Surrender(
|
||||||
&the_mutex->Mutex,
|
&the_mutex->Mutex,
|
||||||
the_mutex->Object.id,
|
the_mutex->Object.id,
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
POSIX_Threads_mutex_MP_support
|
POSIX_Threads_mutex_MP_support
|
||||||
|
#else
|
||||||
|
NULL
|
||||||
|
#endif
|
||||||
);
|
);
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return 0;
|
return 0;
|
||||||
@@ -673,10 +705,12 @@ int pthread_mutex_getprioceiling(
|
|||||||
|
|
||||||
the_mutex = _POSIX_Mutex_Get( mutex, &location );
|
the_mutex = _POSIX_Mutex_Get( mutex, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
|
return POSIX_MP_NOT_IMPLEMENTED(); /* XXX feels questionable */
|
||||||
|
#endif
|
||||||
case OBJECTS_ERROR:
|
case OBJECTS_ERROR:
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
case OBJECTS_REMOTE:
|
|
||||||
return POSIX_MP_NOT_IMPLEMENTED(); /* XXX feels questionable */
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
*prioceiling = _POSIX_Priority_From_core(
|
*prioceiling = _POSIX_Priority_From_core(
|
||||||
the_mutex->Mutex.Attributes.priority_ceiling
|
the_mutex->Mutex.Attributes.priority_ceiling
|
||||||
|
|||||||
@@ -8,10 +8,14 @@ VPATH = @srcdir@
|
|||||||
RTEMS_ROOT = @top_srcdir@
|
RTEMS_ROOT = @top_srcdir@
|
||||||
PROJECT_ROOT = @PROJECT_ROOT@
|
PROJECT_ROOT = @PROJECT_ROOT@
|
||||||
|
|
||||||
H_PIECES=asr attr clock config dpmem event eventmp eventset \
|
# We only build multiprocessing related files if HAS_MP was defined
|
||||||
intr message modes mp msgmp options part partmp \
|
MP_PIECES_yes_V = eventmp mp msgmp partmp regionmp semmp signalmp taskmp
|
||||||
ratemon region regionmp rtemsapi sem semmp signal signalmp status \
|
MP_PIECES = $(MP_PIECES_$(HAS_MP)_V)
|
||||||
support taskmp tasks timer types
|
|
||||||
|
H_PIECES=asr attr clock config dpmem event eventset \
|
||||||
|
intr message modes options part \
|
||||||
|
ratemon region rtemsapi sem signal status \
|
||||||
|
support tasks timer types $(MP_PIECES)
|
||||||
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
|
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
|
||||||
|
|
||||||
# H_FILES that get installed externally
|
# H_FILES that get installed externally
|
||||||
|
|||||||
@@ -161,7 +161,9 @@ void _Event_Timeout (
|
|||||||
|
|
||||||
RTEMS_EXTERN volatile Event_Sync_states _Event_Sync_state;
|
RTEMS_EXTERN volatile Event_Sync_states _Event_Sync_state;
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/eventmp.h>
|
#include <rtems/rtems/eventmp.h>
|
||||||
|
#endif
|
||||||
#ifndef __RTEMS_APPLICATION__
|
#ifndef __RTEMS_APPLICATION__
|
||||||
#include <rtems/rtems/event.inl>
|
#include <rtems/rtems/event.inl>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -316,15 +316,19 @@ rtems_status_code _Message_queue_Translate_core_message_queue_return_code (
|
|||||||
* Output parameters: NONE
|
* Output parameters: NONE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
void _Message_queue_Core_message_queue_mp_support (
|
void _Message_queue_Core_message_queue_mp_support (
|
||||||
Thread_Control *the_thread,
|
Thread_Control *the_thread,
|
||||||
Objects_Id id
|
Objects_Id id
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __RTEMS_APPLICATION__
|
#ifndef __RTEMS_APPLICATION__
|
||||||
#include <rtems/rtems/message.inl>
|
#include <rtems/rtems/message.inl>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/msgmp.h>
|
#include <rtems/rtems/msgmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,7 +158,9 @@ rtems_status_code rtems_partition_return_buffer(
|
|||||||
#ifndef __RTEMS_APPLICATION__
|
#ifndef __RTEMS_APPLICATION__
|
||||||
#include <rtems/rtems/part.inl>
|
#include <rtems/rtems/part.inl>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/partmp.h>
|
#include <rtems/rtems/partmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,7 +201,9 @@ rtems_status_code rtems_region_return_segment(
|
|||||||
#ifndef __RTEMS_APPLICATION__
|
#ifndef __RTEMS_APPLICATION__
|
||||||
#include <rtems/rtems/region.inl>
|
#include <rtems/rtems/region.inl>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/regionmp.h>
|
#include <rtems/rtems/regionmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _Region_Debug_Walk
|
* _Region_Debug_Walk
|
||||||
|
|||||||
@@ -57,7 +57,9 @@ extern "C" {
|
|||||||
#include <rtems/io.h>
|
#include <rtems/io.h>
|
||||||
#include <rtems/fatal.h>
|
#include <rtems/fatal.h>
|
||||||
#include <rtems/rtems/ratemon.h>
|
#include <rtems/rtems/ratemon.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/mp.h>
|
#include <rtems/rtems/mp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <rtems/rtems/support.h>
|
#include <rtems/rtems/support.h>
|
||||||
#include <rtems/score/sysstate.h>
|
#include <rtems/score/sysstate.h>
|
||||||
|
|||||||
@@ -214,10 +214,12 @@ rtems_status_code _Semaphore_Translate_core_semaphore_return_code (
|
|||||||
* is called by the core.
|
* is called by the core.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
void _Semaphore_Core_mutex_mp_support (
|
void _Semaphore_Core_mutex_mp_support (
|
||||||
Thread_Control *the_thread,
|
Thread_Control *the_thread,
|
||||||
rtems_id id
|
rtems_id id
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
@@ -238,7 +240,9 @@ void _Semaphore_Core_semaphore_mp_support (
|
|||||||
#ifndef __RTEMS_APPLICATION__
|
#ifndef __RTEMS_APPLICATION__
|
||||||
#include <rtems/rtems/sem.inl>
|
#include <rtems/rtems/sem.inl>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/semmp.h>
|
#include <rtems/rtems/semmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,7 +73,9 @@ rtems_status_code rtems_signal_send(
|
|||||||
rtems_signal_set signal_set
|
rtems_signal_set signal_set
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/signalmp.h>
|
#include <rtems/rtems/signalmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -411,7 +411,9 @@ void _RTEMS_tasks_Initialize_user_tasks( void );
|
|||||||
#ifndef __RTEMS_APPLICATION__
|
#ifndef __RTEMS_APPLICATION__
|
||||||
#include <rtems/rtems/tasks.inl>
|
#include <rtems/rtems/tasks.inl>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/taskmp.h>
|
#include <rtems/rtems/taskmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,9 +22,13 @@ extern "C" {
|
|||||||
|
|
||||||
#include <rtems/score/object.h>
|
#include <rtems/score/object.h>
|
||||||
#include <rtems/score/priority.h>
|
#include <rtems/score/priority.h>
|
||||||
|
#include <rtems/score/tod.h>
|
||||||
|
#include <rtems/score/watchdog.h>
|
||||||
#include <rtems/rtems/modes.h>
|
#include <rtems/rtems/modes.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/score/mpci.h>
|
#include <rtems/score/mpci.h>
|
||||||
#include <rtems/score/mppkt.h>
|
#include <rtems/score/mppkt.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* RTEMS basic type definitions
|
* RTEMS basic type definitions
|
||||||
@@ -75,6 +79,7 @@ typedef Modes_Control rtems_mode;
|
|||||||
* MPCI related entries
|
* MPCI related entries
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
typedef MP_packet_Classes rtems_mp_packet_classes;
|
typedef MP_packet_Classes rtems_mp_packet_classes;
|
||||||
typedef MP_packet_Prefix rtems_packet_prefix;
|
typedef MP_packet_Prefix rtems_packet_prefix;
|
||||||
|
|
||||||
@@ -87,6 +92,7 @@ typedef MPCI_receive_entry rtems_mpci_receive_packet_entry;
|
|||||||
typedef MPCI_Entry rtems_mpci_entry;
|
typedef MPCI_Entry rtems_mpci_entry;
|
||||||
|
|
||||||
typedef MPCI_Control rtems_mpci_table;
|
typedef MPCI_Control rtems_mpci_table;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,9 @@ extern "C" {
|
|||||||
#include <rtems/io.h>
|
#include <rtems/io.h>
|
||||||
#include <rtems/fatal.h>
|
#include <rtems/fatal.h>
|
||||||
#include <rtems/rtems/ratemon.h>
|
#include <rtems/rtems/ratemon.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/mp.h>
|
#include <rtems/rtems/mp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <rtems/rtems/support.h>
|
#include <rtems/rtems/support.h>
|
||||||
#include <rtems/score/sysstate.h>
|
#include <rtems/score/sysstate.h>
|
||||||
|
|||||||
@@ -8,10 +8,14 @@ VPATH = @srcdir@
|
|||||||
RTEMS_ROOT = @top_srcdir@
|
RTEMS_ROOT = @top_srcdir@
|
||||||
PROJECT_ROOT = @PROJECT_ROOT@
|
PROJECT_ROOT = @PROJECT_ROOT@
|
||||||
|
|
||||||
H_PIECES=asr attr clock config dpmem event eventmp eventset \
|
# We only build multiprocessing related files if HAS_MP was defined
|
||||||
intr message modes mp msgmp options part partmp \
|
MP_PIECES_yes_V = eventmp mp msgmp partmp regionmp semmp signalmp taskmp
|
||||||
ratemon region regionmp rtemsapi sem semmp signal signalmp status \
|
MP_PIECES = $(MP_PIECES_$(HAS_MP)_V)
|
||||||
support taskmp tasks timer types
|
|
||||||
|
H_PIECES=asr attr clock config dpmem event eventset \
|
||||||
|
intr message modes options part \
|
||||||
|
ratemon region rtemsapi sem signal status \
|
||||||
|
support tasks timer types $(MP_PIECES)
|
||||||
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
|
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
|
||||||
|
|
||||||
# H_FILES that get installed externally
|
# H_FILES that get installed externally
|
||||||
|
|||||||
@@ -161,7 +161,9 @@ void _Event_Timeout (
|
|||||||
|
|
||||||
RTEMS_EXTERN volatile Event_Sync_states _Event_Sync_state;
|
RTEMS_EXTERN volatile Event_Sync_states _Event_Sync_state;
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/eventmp.h>
|
#include <rtems/rtems/eventmp.h>
|
||||||
|
#endif
|
||||||
#ifndef __RTEMS_APPLICATION__
|
#ifndef __RTEMS_APPLICATION__
|
||||||
#include <rtems/rtems/event.inl>
|
#include <rtems/rtems/event.inl>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -316,15 +316,19 @@ rtems_status_code _Message_queue_Translate_core_message_queue_return_code (
|
|||||||
* Output parameters: NONE
|
* Output parameters: NONE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
void _Message_queue_Core_message_queue_mp_support (
|
void _Message_queue_Core_message_queue_mp_support (
|
||||||
Thread_Control *the_thread,
|
Thread_Control *the_thread,
|
||||||
Objects_Id id
|
Objects_Id id
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __RTEMS_APPLICATION__
|
#ifndef __RTEMS_APPLICATION__
|
||||||
#include <rtems/rtems/message.inl>
|
#include <rtems/rtems/message.inl>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/msgmp.h>
|
#include <rtems/rtems/msgmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,7 +158,9 @@ rtems_status_code rtems_partition_return_buffer(
|
|||||||
#ifndef __RTEMS_APPLICATION__
|
#ifndef __RTEMS_APPLICATION__
|
||||||
#include <rtems/rtems/part.inl>
|
#include <rtems/rtems/part.inl>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/partmp.h>
|
#include <rtems/rtems/partmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,7 +201,9 @@ rtems_status_code rtems_region_return_segment(
|
|||||||
#ifndef __RTEMS_APPLICATION__
|
#ifndef __RTEMS_APPLICATION__
|
||||||
#include <rtems/rtems/region.inl>
|
#include <rtems/rtems/region.inl>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/regionmp.h>
|
#include <rtems/rtems/regionmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* _Region_Debug_Walk
|
* _Region_Debug_Walk
|
||||||
|
|||||||
@@ -214,10 +214,12 @@ rtems_status_code _Semaphore_Translate_core_semaphore_return_code (
|
|||||||
* is called by the core.
|
* is called by the core.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
void _Semaphore_Core_mutex_mp_support (
|
void _Semaphore_Core_mutex_mp_support (
|
||||||
Thread_Control *the_thread,
|
Thread_Control *the_thread,
|
||||||
rtems_id id
|
rtems_id id
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
@@ -238,7 +240,9 @@ void _Semaphore_Core_semaphore_mp_support (
|
|||||||
#ifndef __RTEMS_APPLICATION__
|
#ifndef __RTEMS_APPLICATION__
|
||||||
#include <rtems/rtems/sem.inl>
|
#include <rtems/rtems/sem.inl>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/semmp.h>
|
#include <rtems/rtems/semmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,7 +73,9 @@ rtems_status_code rtems_signal_send(
|
|||||||
rtems_signal_set signal_set
|
rtems_signal_set signal_set
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/signalmp.h>
|
#include <rtems/rtems/signalmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -411,7 +411,9 @@ void _RTEMS_tasks_Initialize_user_tasks( void );
|
|||||||
#ifndef __RTEMS_APPLICATION__
|
#ifndef __RTEMS_APPLICATION__
|
||||||
#include <rtems/rtems/tasks.inl>
|
#include <rtems/rtems/tasks.inl>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/taskmp.h>
|
#include <rtems/rtems/taskmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,9 +22,13 @@ extern "C" {
|
|||||||
|
|
||||||
#include <rtems/score/object.h>
|
#include <rtems/score/object.h>
|
||||||
#include <rtems/score/priority.h>
|
#include <rtems/score/priority.h>
|
||||||
|
#include <rtems/score/tod.h>
|
||||||
|
#include <rtems/score/watchdog.h>
|
||||||
#include <rtems/rtems/modes.h>
|
#include <rtems/rtems/modes.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/score/mpci.h>
|
#include <rtems/score/mpci.h>
|
||||||
#include <rtems/score/mppkt.h>
|
#include <rtems/score/mppkt.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* RTEMS basic type definitions
|
* RTEMS basic type definitions
|
||||||
@@ -75,6 +79,7 @@ typedef Modes_Control rtems_mode;
|
|||||||
* MPCI related entries
|
* MPCI related entries
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
typedef MP_packet_Classes rtems_mp_packet_classes;
|
typedef MP_packet_Classes rtems_mp_packet_classes;
|
||||||
typedef MP_packet_Prefix rtems_packet_prefix;
|
typedef MP_packet_Prefix rtems_packet_prefix;
|
||||||
|
|
||||||
@@ -87,6 +92,7 @@ typedef MPCI_receive_entry rtems_mpci_receive_packet_entry;
|
|||||||
typedef MPCI_Entry rtems_mpci_entry;
|
typedef MPCI_Entry rtems_mpci_entry;
|
||||||
|
|
||||||
typedef MPCI_Control rtems_mpci_table;
|
typedef MPCI_Control rtems_mpci_table;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,12 +80,14 @@ RTEMS_INLINE_ROUTINE boolean _Attributes_Is_floating_point(
|
|||||||
* enabled in the attribute_set and FALSE otherwise.
|
* enabled in the attribute_set and FALSE otherwise.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
RTEMS_INLINE_ROUTINE boolean _Attributes_Is_global(
|
RTEMS_INLINE_ROUTINE boolean _Attributes_Is_global(
|
||||||
rtems_attribute attribute_set
|
rtems_attribute attribute_set
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return ( attribute_set & RTEMS_GLOBAL );
|
return ( attribute_set & RTEMS_GLOBAL );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -80,12 +80,14 @@ RTEMS_INLINE_ROUTINE boolean _Attributes_Is_floating_point(
|
|||||||
* enabled in the attribute_set and FALSE otherwise.
|
* enabled in the attribute_set and FALSE otherwise.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
RTEMS_INLINE_ROUTINE boolean _Attributes_Is_global(
|
RTEMS_INLINE_ROUTINE boolean _Attributes_Is_global(
|
||||||
rtems_attribute attribute_set
|
rtems_attribute attribute_set
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return ( attribute_set & RTEMS_GLOBAL );
|
return ( attribute_set & RTEMS_GLOBAL );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -48,8 +48,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#define _Attributes_Is_global( _attribute_set ) \
|
#define _Attributes_Is_global( _attribute_set ) \
|
||||||
( (_attribute_set) & RTEMS_GLOBAL )
|
( (_attribute_set) & RTEMS_GLOBAL )
|
||||||
|
#endif
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -48,8 +48,10 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#define _Attributes_Is_global( _attribute_set ) \
|
#define _Attributes_Is_global( _attribute_set ) \
|
||||||
( (_attribute_set) & RTEMS_GLOBAL )
|
( (_attribute_set) & RTEMS_GLOBAL )
|
||||||
|
#endif
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ VPATH = @srcdir@
|
|||||||
RTEMS_ROOT = @top_srcdir@
|
RTEMS_ROOT = @top_srcdir@
|
||||||
PROJECT_ROOT = @PROJECT_ROOT@
|
PROJECT_ROOT = @PROJECT_ROOT@
|
||||||
|
|
||||||
C_FILES= no-dpmem.c no-event.c no-mp.c no-msg.c \
|
C_FILES= no-dpmem.c no-event.c no-msg.c no-mp.c \
|
||||||
no-part.c no-region.c no-rtmon.c no-sem.c no-signal.c no-timer.c
|
no-part.c no-region.c no-rtmon.c no-sem.c no-signal.c no-timer.c
|
||||||
|
|
||||||
S_FILES=
|
S_FILES=
|
||||||
|
|||||||
@@ -14,6 +14,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtems/system.h>
|
#include <rtems/system.h>
|
||||||
|
#if !defined(RTEMS_MULTIPROCESSING)
|
||||||
|
char rtems_no_multiprocessing;
|
||||||
|
#else
|
||||||
#include <rtems/rtems/status.h>
|
#include <rtems/rtems/status.h>
|
||||||
#include <rtems/rtems/mp.h>
|
#include <rtems/rtems/mp.h>
|
||||||
#include <rtems/score/cpu.h>
|
#include <rtems/score/cpu.h>
|
||||||
@@ -197,5 +200,5 @@ MPCI_Internal_packet *_MPCI_Internal_packets_Get_packet ( void )
|
|||||||
);
|
);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/* end of file */
|
/* end of file */
|
||||||
|
|||||||
@@ -8,9 +8,13 @@ VPATH = @srcdir@
|
|||||||
RTEMS_ROOT = @top_srcdir@
|
RTEMS_ROOT = @top_srcdir@
|
||||||
PROJECT_ROOT = @PROJECT_ROOT@
|
PROJECT_ROOT = @PROJECT_ROOT@
|
||||||
|
|
||||||
C_PIECES=attr clock dpmem event eventmp intr intrbody mp msg msgmp \
|
# We only build multiprocessing related files if HAS_MP was defined
|
||||||
part partmp ratemon region regionmp sem semmp signal signalmp \
|
MP_PIECES_yes_V = eventmp mp msgmp partmp regionmp semmp signalmp taskmp
|
||||||
taskmp tasks timer
|
MP_PIECES = $(MP_PIECES_$(HAS_MP)_V)
|
||||||
|
|
||||||
|
C_PIECES=attr clock dpmem event intr intrbody msg \
|
||||||
|
part ratemon region sem signal \
|
||||||
|
tasks timer $(MP_PIECES)
|
||||||
C_FILES=$(C_PIECES:%=%.c)
|
C_FILES=$(C_PIECES:%=%.c)
|
||||||
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
|
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
|
||||||
|
|
||||||
|
|||||||
@@ -168,10 +168,12 @@ rtems_status_code rtems_port_delete(
|
|||||||
|
|
||||||
the_port = _Dual_ported_memory_Get( id, &location );
|
the_port = _Dual_ported_memory_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* this error cannot be returned */
|
case OBJECTS_REMOTE: /* this error cannot be returned */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
_Objects_Close( &_Dual_ported_memory_Information, &the_port->Object );
|
_Objects_Close( &_Dual_ported_memory_Information, &the_port->Object );
|
||||||
_Dual_ported_memory_Free( the_port );
|
_Dual_ported_memory_Free( the_port );
|
||||||
@@ -213,10 +215,12 @@ rtems_status_code rtems_port_internal_to_external(
|
|||||||
|
|
||||||
the_port = _Dual_ported_memory_Get( id, &location );
|
the_port = _Dual_ported_memory_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* this error cannot be returned */
|
case OBJECTS_REMOTE: /* this error cannot be returned */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
ending = _Addresses_Subtract( internal, the_port->internal_base );
|
ending = _Addresses_Subtract( internal, the_port->internal_base );
|
||||||
if ( ending > the_port->length )
|
if ( ending > the_port->length )
|
||||||
@@ -262,10 +266,12 @@ rtems_status_code rtems_port_external_to_internal(
|
|||||||
|
|
||||||
the_port = _Dual_ported_memory_Get( id, &location );
|
the_port = _Dual_ported_memory_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* this error cannot be returned */
|
case OBJECTS_REMOTE: /* this error cannot be returned */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
ending = _Addresses_Subtract( external, the_port->external_base );
|
ending = _Addresses_Subtract( external, the_port->external_base );
|
||||||
if ( ending > the_port->length )
|
if ( ending > the_port->length )
|
||||||
|
|||||||
@@ -39,7 +39,9 @@ void _Event_Manager_initialization( void )
|
|||||||
* Register the MP Process Packet routine.
|
* Register the MP Process Packet routine.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet );
|
_MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -68,9 +70,8 @@ rtems_status_code rtems_event_send(
|
|||||||
|
|
||||||
the_thread = _Thread_Get( id, &location );
|
the_thread = _Thread_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
return(
|
return(
|
||||||
_Event_MP_Send_request_packet(
|
_Event_MP_Send_request_packet(
|
||||||
EVENT_MP_SEND_REQUEST,
|
EVENT_MP_SEND_REQUEST,
|
||||||
@@ -78,6 +79,9 @@ rtems_status_code rtems_event_send(
|
|||||||
event_in
|
event_in
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
|
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
|
||||||
_Event_sets_Post( event_in, &api->pending_events );
|
_Event_sets_Post( event_in, &api->pending_events );
|
||||||
@@ -352,8 +356,8 @@ void _Event_Timeout(
|
|||||||
|
|
||||||
the_thread = _Thread_Get( id, &location );
|
the_thread = _Thread_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
case OBJECTS_REMOTE: /* impossible */
|
case OBJECTS_REMOTE: /* impossible */
|
||||||
|
case OBJECTS_ERROR:
|
||||||
break;
|
break;
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,9 @@
|
|||||||
#include <rtems/score/states.h>
|
#include <rtems/score/states.h>
|
||||||
#include <rtems/score/thread.h>
|
#include <rtems/score/thread.h>
|
||||||
#include <rtems/score/wkspace.h>
|
#include <rtems/score/wkspace.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/score/mpci.h>
|
#include <rtems/score/mpci.h>
|
||||||
|
#endif
|
||||||
#include <rtems/rtems/status.h>
|
#include <rtems/rtems/status.h>
|
||||||
#include <rtems/rtems/attr.h>
|
#include <rtems/rtems/attr.h>
|
||||||
#include <rtems/rtems/message.h>
|
#include <rtems/rtems/message.h>
|
||||||
@@ -61,10 +63,12 @@ void _Message_queue_Manager_initialization(
|
|||||||
* Register the MP Process Packet routine.
|
* Register the MP Process Packet routine.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_MPCI_Register_packet_processor(
|
_MPCI_Register_packet_processor(
|
||||||
MP_PACKET_MESSAGE_QUEUE,
|
MP_PACKET_MESSAGE_QUEUE,
|
||||||
_Message_queue_MP_Process_packet
|
_Message_queue_MP_Process_packet
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,14 +127,19 @@ rtems_status_code rtems_message_queue_create(
|
|||||||
{
|
{
|
||||||
register Message_queue_Control *the_message_queue;
|
register Message_queue_Control *the_message_queue;
|
||||||
CORE_message_queue_Attributes the_message_queue_attributes;
|
CORE_message_queue_Attributes the_message_queue_attributes;
|
||||||
|
void *handler;
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
boolean is_global;
|
boolean is_global;
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( !rtems_is_name_valid( name ) )
|
if ( !rtems_is_name_valid( name ) )
|
||||||
return RTEMS_INVALID_NAME;
|
return RTEMS_INVALID_NAME;
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
|
if ( (is_global = _Attributes_Is_global( attribute_set ) ) &&
|
||||||
!_System_state_Is_multiprocessing )
|
!_System_state_Is_multiprocessing )
|
||||||
return RTEMS_MP_NOT_CONFIGURED;
|
return RTEMS_MP_NOT_CONFIGURED;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
return RTEMS_INVALID_NUMBER;
|
return RTEMS_INVALID_NUMBER;
|
||||||
@@ -138,6 +147,7 @@ rtems_status_code rtems_message_queue_create(
|
|||||||
if (max_message_size == 0)
|
if (max_message_size == 0)
|
||||||
return RTEMS_INVALID_SIZE;
|
return RTEMS_INVALID_SIZE;
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#if 1
|
#if 1
|
||||||
/*
|
/*
|
||||||
* I am not 100% sure this should be an error.
|
* I am not 100% sure this should be an error.
|
||||||
@@ -147,7 +157,7 @@ rtems_status_code rtems_message_queue_create(
|
|||||||
|
|
||||||
if ( is_global && (_MPCI_table->maximum_packet_size < max_message_size) )
|
if ( is_global && (_MPCI_table->maximum_packet_size < max_message_size) )
|
||||||
return RTEMS_INVALID_SIZE;
|
return RTEMS_INVALID_SIZE;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_Thread_Disable_dispatch(); /* protects object pointer */
|
_Thread_Disable_dispatch(); /* protects object pointer */
|
||||||
@@ -159,6 +169,7 @@ rtems_status_code rtems_message_queue_create(
|
|||||||
return RTEMS_TOO_MANY;
|
return RTEMS_TOO_MANY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( is_global &&
|
if ( is_global &&
|
||||||
!( _Objects_MP_Allocate_and_open( &_Message_queue_Information,
|
!( _Objects_MP_Allocate_and_open( &_Message_queue_Information,
|
||||||
name, the_message_queue->Object.id, FALSE ) ) ) {
|
name, the_message_queue->Object.id, FALSE ) ) ) {
|
||||||
@@ -166,6 +177,7 @@ rtems_status_code rtems_message_queue_create(
|
|||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return RTEMS_TOO_MANY;
|
return RTEMS_TOO_MANY;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
the_message_queue->attribute_set = attribute_set;
|
the_message_queue->attribute_set = attribute_set;
|
||||||
|
|
||||||
@@ -176,16 +188,23 @@ rtems_status_code rtems_message_queue_create(
|
|||||||
the_message_queue_attributes.discipline =
|
the_message_queue_attributes.discipline =
|
||||||
CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
|
CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
|
||||||
|
|
||||||
|
handler = NULL;
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
|
handler = _Message_queue_MP_Send_extract_proxy;
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( ! _CORE_message_queue_Initialize(
|
if ( ! _CORE_message_queue_Initialize(
|
||||||
&the_message_queue->message_queue,
|
&the_message_queue->message_queue,
|
||||||
OBJECTS_RTEMS_MESSAGE_QUEUES,
|
OBJECTS_RTEMS_MESSAGE_QUEUES,
|
||||||
&the_message_queue_attributes,
|
&the_message_queue_attributes,
|
||||||
count,
|
count,
|
||||||
max_message_size,
|
max_message_size,
|
||||||
_Message_queue_MP_Send_extract_proxy ) ) {
|
handler ) ) {
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( is_global )
|
if ( is_global )
|
||||||
_Objects_MP_Close(
|
_Objects_MP_Close(
|
||||||
&_Message_queue_Information, the_message_queue->Object.id);
|
&_Message_queue_Information, the_message_queue->Object.id);
|
||||||
|
#endif
|
||||||
|
|
||||||
_Message_queue_Free( the_message_queue );
|
_Message_queue_Free( the_message_queue );
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
@@ -200,6 +219,7 @@ rtems_status_code rtems_message_queue_create(
|
|||||||
|
|
||||||
*id = the_message_queue->Object.id;
|
*id = the_message_queue->Object.id;
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( is_global )
|
if ( is_global )
|
||||||
_Message_queue_MP_Send_process_packet(
|
_Message_queue_MP_Send_process_packet(
|
||||||
MESSAGE_QUEUE_MP_ANNOUNCE_CREATE,
|
MESSAGE_QUEUE_MP_ANNOUNCE_CREATE,
|
||||||
@@ -207,6 +227,7 @@ rtems_status_code rtems_message_queue_create(
|
|||||||
name,
|
name,
|
||||||
0
|
0
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return RTEMS_SUCCESSFUL;
|
return RTEMS_SUCCESSFUL;
|
||||||
@@ -272,23 +293,31 @@ rtems_status_code rtems_message_queue_delete(
|
|||||||
|
|
||||||
the_message_queue = _Message_queue_Get( id, &location );
|
the_message_queue = _Message_queue_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Thread_Dispatch();
|
_Thread_Dispatch();
|
||||||
return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
|
return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
_Objects_Close( &_Message_queue_Information,
|
_Objects_Close( &_Message_queue_Information,
|
||||||
&the_message_queue->Object );
|
&the_message_queue->Object );
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_CORE_message_queue_Close(
|
_CORE_message_queue_Close(
|
||||||
&the_message_queue->message_queue,
|
&the_message_queue->message_queue,
|
||||||
_Message_queue_MP_Send_object_was_deleted,
|
_Message_queue_MP_Send_object_was_deleted,
|
||||||
CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED
|
CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
_Message_queue_Free( the_message_queue );
|
_Message_queue_Free( the_message_queue );
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( _Attributes_Is_global( the_message_queue->attribute_set ) ) {
|
if ( _Attributes_Is_global( the_message_queue->attribute_set ) ) {
|
||||||
_Objects_MP_Close(
|
_Objects_MP_Close(
|
||||||
&_Message_queue_Information,
|
&_Message_queue_Information,
|
||||||
@@ -302,6 +331,7 @@ rtems_status_code rtems_message_queue_delete(
|
|||||||
0
|
0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return RTEMS_SUCCESSFUL;
|
return RTEMS_SUCCESSFUL;
|
||||||
@@ -394,9 +424,8 @@ rtems_status_code rtems_message_queue_broadcast(
|
|||||||
|
|
||||||
the_message_queue = _Message_queue_Get( id, &location );
|
the_message_queue = _Message_queue_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Thread_Executing->Wait.return_argument = count;
|
_Thread_Executing->Wait.return_argument = count;
|
||||||
|
|
||||||
return
|
return
|
||||||
@@ -408,6 +437,10 @@ rtems_status_code rtems_message_queue_broadcast(
|
|||||||
0, /* option_set not used */
|
0, /* option_set not used */
|
||||||
MPCI_DEFAULT_TIMEOUT
|
MPCI_DEFAULT_TIMEOUT
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
core_status = _CORE_message_queue_Broadcast(
|
core_status = _CORE_message_queue_Broadcast(
|
||||||
@@ -415,7 +448,11 @@ rtems_status_code rtems_message_queue_broadcast(
|
|||||||
buffer,
|
buffer,
|
||||||
size,
|
size,
|
||||||
id,
|
id,
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Message_queue_Core_message_queue_mp_support,
|
_Message_queue_Core_message_queue_mp_support,
|
||||||
|
#else
|
||||||
|
NULL,
|
||||||
|
#endif
|
||||||
count
|
count
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -461,10 +498,8 @@ rtems_status_code rtems_message_queue_receive(
|
|||||||
the_message_queue = _Message_queue_Get( id, &location );
|
the_message_queue = _Message_queue_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
|
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
return _Message_queue_MP_Send_request_packet(
|
return _Message_queue_MP_Send_request_packet(
|
||||||
MESSAGE_QUEUE_MP_RECEIVE_REQUEST,
|
MESSAGE_QUEUE_MP_RECEIVE_REQUEST,
|
||||||
id,
|
id,
|
||||||
@@ -473,6 +508,10 @@ rtems_status_code rtems_message_queue_receive(
|
|||||||
option_set,
|
option_set,
|
||||||
timeout
|
timeout
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( _Options_Is_no_wait( option_set ) )
|
if ( _Options_Is_no_wait( option_set ) )
|
||||||
@@ -525,9 +564,8 @@ rtems_status_code rtems_message_queue_flush(
|
|||||||
|
|
||||||
the_message_queue = _Message_queue_Get( id, &location );
|
the_message_queue = _Message_queue_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Thread_Executing->Wait.return_argument = count;
|
_Thread_Executing->Wait.return_argument = count;
|
||||||
|
|
||||||
return
|
return
|
||||||
@@ -539,6 +577,10 @@ rtems_status_code rtems_message_queue_flush(
|
|||||||
0, /* option_set not used */
|
0, /* option_set not used */
|
||||||
MPCI_DEFAULT_TIMEOUT
|
MPCI_DEFAULT_TIMEOUT
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
*count = _CORE_message_queue_Flush( &the_message_queue->message_queue );
|
*count = _CORE_message_queue_Flush( &the_message_queue->message_queue );
|
||||||
@@ -575,13 +617,11 @@ rtems_status_code rtems_message_queue_get_number_pending(
|
|||||||
|
|
||||||
the_message_queue = _Message_queue_Get( id, &location );
|
the_message_queue = _Message_queue_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Thread_Executing->Wait.return_argument = count;
|
_Thread_Executing->Wait.return_argument = count;
|
||||||
|
|
||||||
return
|
return _Message_queue_MP_Send_request_packet(
|
||||||
_Message_queue_MP_Send_request_packet(
|
|
||||||
MESSAGE_QUEUE_MP_GET_NUMBER_PENDING_REQUEST,
|
MESSAGE_QUEUE_MP_GET_NUMBER_PENDING_REQUEST,
|
||||||
id,
|
id,
|
||||||
0, /* buffer not used */
|
0, /* buffer not used */
|
||||||
@@ -589,6 +629,10 @@ rtems_status_code rtems_message_queue_get_number_pending(
|
|||||||
0, /* option_set not used */
|
0, /* option_set not used */
|
||||||
MPCI_DEFAULT_TIMEOUT
|
MPCI_DEFAULT_TIMEOUT
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
*count = the_message_queue->message_queue.number_of_pending_messages;
|
*count = the_message_queue->message_queue.number_of_pending_messages;
|
||||||
@@ -635,14 +679,11 @@ rtems_status_code _Message_queue_Submit(
|
|||||||
the_message_queue = _Message_queue_Get( id, &location );
|
the_message_queue = _Message_queue_Get( id, &location );
|
||||||
switch ( location )
|
switch ( location )
|
||||||
{
|
{
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
switch ( submit_type ) {
|
switch ( submit_type ) {
|
||||||
case MESSAGE_QUEUE_SEND_REQUEST:
|
case MESSAGE_QUEUE_SEND_REQUEST:
|
||||||
return
|
return _Message_queue_MP_Send_request_packet(
|
||||||
_Message_queue_MP_Send_request_packet(
|
|
||||||
MESSAGE_QUEUE_MP_SEND_REQUEST,
|
MESSAGE_QUEUE_MP_SEND_REQUEST,
|
||||||
id,
|
id,
|
||||||
buffer,
|
buffer,
|
||||||
@@ -652,8 +693,7 @@ rtems_status_code _Message_queue_Submit(
|
|||||||
);
|
);
|
||||||
|
|
||||||
case MESSAGE_QUEUE_URGENT_REQUEST:
|
case MESSAGE_QUEUE_URGENT_REQUEST:
|
||||||
return
|
return _Message_queue_MP_Send_request_packet(
|
||||||
_Message_queue_MP_Send_request_packet(
|
|
||||||
MESSAGE_QUEUE_MP_URGENT_REQUEST,
|
MESSAGE_QUEUE_MP_URGENT_REQUEST,
|
||||||
id,
|
id,
|
||||||
buffer,
|
buffer,
|
||||||
@@ -662,6 +702,11 @@ rtems_status_code _Message_queue_Submit(
|
|||||||
MPCI_DEFAULT_TIMEOUT
|
MPCI_DEFAULT_TIMEOUT
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
switch ( submit_type ) {
|
switch ( submit_type ) {
|
||||||
@@ -671,7 +716,11 @@ rtems_status_code _Message_queue_Submit(
|
|||||||
buffer,
|
buffer,
|
||||||
size,
|
size,
|
||||||
id,
|
id,
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Message_queue_Core_message_queue_mp_support
|
_Message_queue_Core_message_queue_mp_support
|
||||||
|
#else
|
||||||
|
NULL
|
||||||
|
#endif
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case MESSAGE_QUEUE_URGENT_REQUEST:
|
case MESSAGE_QUEUE_URGENT_REQUEST:
|
||||||
@@ -680,7 +729,11 @@ rtems_status_code _Message_queue_Submit(
|
|||||||
buffer,
|
buffer,
|
||||||
size,
|
size,
|
||||||
id,
|
id,
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Message_queue_Core_message_queue_mp_support
|
_Message_queue_Core_message_queue_mp_support
|
||||||
|
#else
|
||||||
|
NULL
|
||||||
|
#endif
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -749,6 +802,7 @@ rtems_status_code _Message_queue_Translate_core_message_queue_return_code (
|
|||||||
* Output parameters: NONE
|
* Output parameters: NONE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
void _Message_queue_Core_message_queue_mp_support (
|
void _Message_queue_Core_message_queue_mp_support (
|
||||||
Thread_Control *the_thread,
|
Thread_Control *the_thread,
|
||||||
Objects_Id id
|
Objects_Id id
|
||||||
@@ -762,3 +816,4 @@ void _Message_queue_Core_message_queue_mp_support (
|
|||||||
the_thread
|
the_thread
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -54,10 +54,12 @@ void _Partition_Manager_initialization(
|
|||||||
* Register the MP Process Packet routine.
|
* Register the MP Process Packet routine.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_MPCI_Register_packet_processor(
|
_MPCI_Register_packet_processor(
|
||||||
MP_PACKET_PARTITION,
|
MP_PACKET_PARTITION,
|
||||||
_Partition_MP_Process_packet
|
_Partition_MP_Process_packet
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,9 +105,11 @@ rtems_status_code rtems_partition_create(
|
|||||||
if ( !_Addresses_Is_aligned( starting_address ) )
|
if ( !_Addresses_Is_aligned( starting_address ) )
|
||||||
return RTEMS_INVALID_ADDRESS;
|
return RTEMS_INVALID_ADDRESS;
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( _Attributes_Is_global( attribute_set ) &&
|
if ( _Attributes_Is_global( attribute_set ) &&
|
||||||
!_System_state_Is_multiprocessing )
|
!_System_state_Is_multiprocessing )
|
||||||
return RTEMS_MP_NOT_CONFIGURED;
|
return RTEMS_MP_NOT_CONFIGURED;
|
||||||
|
#endif
|
||||||
|
|
||||||
_Thread_Disable_dispatch(); /* prevents deletion */
|
_Thread_Disable_dispatch(); /* prevents deletion */
|
||||||
|
|
||||||
@@ -116,6 +120,7 @@ rtems_status_code rtems_partition_create(
|
|||||||
return RTEMS_TOO_MANY;
|
return RTEMS_TOO_MANY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( _Attributes_Is_global( attribute_set ) &&
|
if ( _Attributes_Is_global( attribute_set ) &&
|
||||||
!( _Objects_MP_Allocate_and_open( &_Partition_Information, name,
|
!( _Objects_MP_Allocate_and_open( &_Partition_Information, name,
|
||||||
the_partition->Object.id, FALSE ) ) ) {
|
the_partition->Object.id, FALSE ) ) ) {
|
||||||
@@ -123,6 +128,8 @@ rtems_status_code rtems_partition_create(
|
|||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return RTEMS_TOO_MANY;
|
return RTEMS_TOO_MANY;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
the_partition->starting_address = starting_address;
|
the_partition->starting_address = starting_address;
|
||||||
the_partition->length = length;
|
the_partition->length = length;
|
||||||
the_partition->buffer_size = buffer_size;
|
the_partition->buffer_size = buffer_size;
|
||||||
@@ -135,6 +142,7 @@ rtems_status_code rtems_partition_create(
|
|||||||
_Objects_Open( &_Partition_Information, &the_partition->Object, &name );
|
_Objects_Open( &_Partition_Information, &the_partition->Object, &name );
|
||||||
|
|
||||||
*id = the_partition->Object.id;
|
*id = the_partition->Object.id;
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( _Attributes_Is_global( attribute_set ) )
|
if ( _Attributes_Is_global( attribute_set ) )
|
||||||
_Partition_MP_Send_process_packet(
|
_Partition_MP_Send_process_packet(
|
||||||
PARTITION_MP_ANNOUNCE_CREATE,
|
PARTITION_MP_ANNOUNCE_CREATE,
|
||||||
@@ -142,6 +150,7 @@ rtems_status_code rtems_partition_create(
|
|||||||
name,
|
name,
|
||||||
0 /* Not used */
|
0 /* Not used */
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return RTEMS_SUCCESSFUL;
|
return RTEMS_SUCCESSFUL;
|
||||||
@@ -203,15 +212,20 @@ rtems_status_code rtems_partition_delete(
|
|||||||
|
|
||||||
the_partition = _Partition_Get( id, &location );
|
the_partition = _Partition_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Thread_Dispatch();
|
_Thread_Dispatch();
|
||||||
return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
|
return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( the_partition->number_of_used_blocks == 0 ) {
|
if ( the_partition->number_of_used_blocks == 0 ) {
|
||||||
_Objects_Close( &_Partition_Information, &the_partition->Object );
|
_Objects_Close( &_Partition_Information, &the_partition->Object );
|
||||||
_Partition_Free( the_partition );
|
_Partition_Free( the_partition );
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( _Attributes_Is_global( the_partition->attribute_set ) ) {
|
if ( _Attributes_Is_global( the_partition->attribute_set ) ) {
|
||||||
|
|
||||||
_Objects_MP_Close(
|
_Objects_MP_Close(
|
||||||
@@ -226,6 +240,7 @@ rtems_status_code rtems_partition_delete(
|
|||||||
0 /* Not used */
|
0 /* Not used */
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return RTEMS_SUCCESSFUL;
|
return RTEMS_SUCCESSFUL;
|
||||||
@@ -264,9 +279,8 @@ rtems_status_code rtems_partition_get_buffer(
|
|||||||
|
|
||||||
the_partition = _Partition_Get( id, &location );
|
the_partition = _Partition_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Thread_Executing->Wait.return_argument = buffer;
|
_Thread_Executing->Wait.return_argument = buffer;
|
||||||
return(
|
return(
|
||||||
_Partition_MP_Send_request_packet(
|
_Partition_MP_Send_request_packet(
|
||||||
@@ -275,6 +289,11 @@ rtems_status_code rtems_partition_get_buffer(
|
|||||||
0 /* Not used */
|
0 /* Not used */
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
the_buffer = _Partition_Allocate_buffer( the_partition );
|
the_buffer = _Partition_Allocate_buffer( the_partition );
|
||||||
if ( the_buffer ) {
|
if ( the_buffer ) {
|
||||||
@@ -316,16 +335,19 @@ rtems_status_code rtems_partition_return_buffer(
|
|||||||
|
|
||||||
the_partition = _Partition_Get( id, &location );
|
the_partition = _Partition_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
return(
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Partition_MP_Send_request_packet(
|
return _Partition_MP_Send_request_packet(
|
||||||
PARTITION_MP_RETURN_BUFFER_REQUEST,
|
PARTITION_MP_RETURN_BUFFER_REQUEST,
|
||||||
id,
|
id,
|
||||||
buffer
|
buffer
|
||||||
)
|
);
|
||||||
);
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
|
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
|
||||||
_Partition_Free_buffer( the_partition, buffer );
|
_Partition_Free_buffer( the_partition, buffer );
|
||||||
|
|||||||
@@ -156,10 +156,12 @@ rtems_status_code rtems_rate_monotonic_cancel(
|
|||||||
|
|
||||||
the_period = _Rate_monotonic_Get( id, &location );
|
the_period = _Rate_monotonic_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
return RTEMS_INTERNAL_ERROR; /* should never return this */
|
return RTEMS_INTERNAL_ERROR; /* should never return this */
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( !_Thread_Is_executing( the_period->owner ) ) {
|
if ( !_Thread_Is_executing( the_period->owner ) ) {
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
@@ -197,10 +199,12 @@ rtems_status_code rtems_rate_monotonic_delete(
|
|||||||
|
|
||||||
the_period = _Rate_monotonic_Get( id, &location );
|
the_period = _Rate_monotonic_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* should never return this */
|
case OBJECTS_REMOTE: /* should never return this */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
_Objects_Close( &_Rate_monotonic_Information, &the_period->Object );
|
_Objects_Close( &_Rate_monotonic_Information, &the_period->Object );
|
||||||
(void) _Watchdog_Remove( &the_period->Timer );
|
(void) _Watchdog_Remove( &the_period->Timer );
|
||||||
@@ -243,10 +247,12 @@ rtems_status_code rtems_rate_monotonic_get_status(
|
|||||||
|
|
||||||
the_period = _Rate_monotonic_Get( id, &location );
|
the_period = _Rate_monotonic_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* should never return this */
|
case OBJECTS_REMOTE: /* should never return this */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
status->state = the_period->state;
|
status->state = the_period->state;
|
||||||
|
|
||||||
@@ -298,10 +304,12 @@ rtems_status_code rtems_rate_monotonic_period(
|
|||||||
|
|
||||||
the_period = _Rate_monotonic_Get( id, &location );
|
the_period = _Rate_monotonic_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* should never return this */
|
case OBJECTS_REMOTE: /* should never return this */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( !_Thread_Is_executing( the_period->owner ) ) {
|
if ( !_Thread_Is_executing( the_period->owner ) ) {
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
@@ -431,9 +439,10 @@ void _Rate_monotonic_Timeout(
|
|||||||
|
|
||||||
the_period = _Rate_monotonic_Get( id, &location );
|
the_period = _Rate_monotonic_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
case OBJECTS_REMOTE: /* impossible */
|
case OBJECTS_REMOTE: /* impossible */
|
||||||
|
case OBJECTS_ERROR:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
the_thread = the_period->owner;
|
the_thread = the_period->owner;
|
||||||
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
|
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
|
||||||
|
|||||||
@@ -53,10 +53,12 @@ void _Region_Manager_initialization(
|
|||||||
* Register the MP Process Packet routine.
|
* Register the MP Process Packet routine.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_MPCI_Register_packet_processor(
|
_MPCI_Register_packet_processor(
|
||||||
MP_PACKET_REGION,
|
MP_PACKET_REGION,
|
||||||
0 /* XXX _Region_MP_Process_packet */
|
0 /* XXX _Region_MP_Process_packet */
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,7 +130,11 @@ rtems_status_code rtems_region_create(
|
|||||||
_Attributes_Is_priority( attribute_set ) ?
|
_Attributes_Is_priority( attribute_set ) ?
|
||||||
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
|
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
|
||||||
STATES_WAITING_FOR_SEGMENT,
|
STATES_WAITING_FOR_SEGMENT,
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Region_MP_Send_extract_proxy,
|
_Region_MP_Send_extract_proxy,
|
||||||
|
#else
|
||||||
|
NULL,
|
||||||
|
#endif
|
||||||
RTEMS_TIMEOUT
|
RTEMS_TIMEOUT
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -198,10 +204,12 @@ rtems_status_code rtems_region_delete(
|
|||||||
|
|
||||||
the_region = _Region_Get( id, &location );
|
the_region = _Region_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* this error cannot be returned */
|
case OBJECTS_REMOTE: /* this error cannot be returned */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
_Region_Debug_Walk( the_region, 5 );
|
_Region_Debug_Walk( the_region, 5 );
|
||||||
if ( the_region->number_of_used_blocks == 0 ) {
|
if ( the_region->number_of_used_blocks == 0 ) {
|
||||||
@@ -250,10 +258,12 @@ rtems_status_code rtems_region_extend(
|
|||||||
|
|
||||||
the_region = _Region_Get( id, &location );
|
the_region = _Region_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* this error cannot be returned */
|
case OBJECTS_REMOTE: /* this error cannot be returned */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
|
|
||||||
heap_status = _Heap_Extend(
|
heap_status = _Heap_Extend(
|
||||||
@@ -322,10 +332,12 @@ rtems_status_code rtems_region_get_segment(
|
|||||||
executing = _Thread_Executing;
|
executing = _Thread_Executing;
|
||||||
the_region = _Region_Get( id, &location );
|
the_region = _Region_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* this error cannot be returned */
|
case OBJECTS_REMOTE: /* this error cannot be returned */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( size > the_region->maximum_segment_size ) {
|
if ( size > the_region->maximum_segment_size ) {
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
@@ -395,10 +407,12 @@ rtems_status_code rtems_region_get_segment_size(
|
|||||||
executing = _Thread_Executing;
|
executing = _Thread_Executing;
|
||||||
the_region = _Region_Get( id, &location );
|
the_region = _Region_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* this error cannot be returned */
|
case OBJECTS_REMOTE: /* this error cannot be returned */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
|
|
||||||
if ( _Heap_Size_of_user_area( &the_region->Memory, segment, size ) ) {
|
if ( _Heap_Size_of_user_area( &the_region->Memory, segment, size ) ) {
|
||||||
@@ -440,10 +454,13 @@ rtems_status_code rtems_region_return_segment(
|
|||||||
|
|
||||||
the_region = _Region_Get( id, &location );
|
the_region = _Region_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* this error cannot be returned */
|
case OBJECTS_REMOTE: /* this error cannot be returned */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
|
|
||||||
_Region_Debug_Walk( the_region, 3 );
|
_Region_Debug_Walk( the_region, 3 );
|
||||||
|
|||||||
@@ -151,10 +151,12 @@ rtems_status_code rtems_timer_cancel(
|
|||||||
|
|
||||||
the_timer = _Timer_Get( id, &location );
|
the_timer = _Timer_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* should never return this */
|
case OBJECTS_REMOTE: /* should never return this */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
|
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
|
||||||
(void) _Watchdog_Remove( &the_timer->Ticker );
|
(void) _Watchdog_Remove( &the_timer->Ticker );
|
||||||
@@ -188,10 +190,12 @@ rtems_status_code rtems_timer_delete(
|
|||||||
|
|
||||||
the_timer = _Timer_Get( id, &location );
|
the_timer = _Timer_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* should never return this */
|
case OBJECTS_REMOTE: /* should never return this */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
_Objects_Close( &_Timer_Information, &the_timer->Object );
|
_Objects_Close( &_Timer_Information, &the_timer->Object );
|
||||||
(void) _Watchdog_Remove( &the_timer->Ticker );
|
(void) _Watchdog_Remove( &the_timer->Ticker );
|
||||||
@@ -234,10 +238,12 @@ rtems_status_code rtems_timer_fire_after(
|
|||||||
|
|
||||||
the_timer = _Timer_Get( id, &location );
|
the_timer = _Timer_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* should never return this */
|
case OBJECTS_REMOTE: /* should never return this */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
(void) _Watchdog_Remove( &the_timer->Ticker );
|
(void) _Watchdog_Remove( &the_timer->Ticker );
|
||||||
the_timer->the_class = TIMER_INTERVAL;
|
the_timer->the_class = TIMER_INTERVAL;
|
||||||
@@ -289,10 +295,12 @@ rtems_status_code rtems_timer_fire_when(
|
|||||||
|
|
||||||
the_timer = _Timer_Get( id, &location );
|
the_timer = _Timer_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* should never return this */
|
case OBJECTS_REMOTE: /* should never return this */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
(void) _Watchdog_Remove( &the_timer->Ticker );
|
(void) _Watchdog_Remove( &the_timer->Ticker );
|
||||||
the_timer->the_class = TIMER_TIME_OF_DAY;
|
the_timer->the_class = TIMER_TIME_OF_DAY;
|
||||||
@@ -331,10 +339,12 @@ rtems_status_code rtems_timer_reset(
|
|||||||
|
|
||||||
the_timer = _Timer_Get( id, &location );
|
the_timer = _Timer_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* should never return this */
|
case OBJECTS_REMOTE: /* should never return this */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( _Timer_Is_interval_class( the_timer->the_class ) ) {
|
if ( _Timer_Is_interval_class( the_timer->the_class ) ) {
|
||||||
_Watchdog_Reset( &the_timer->Ticker );
|
_Watchdog_Reset( &the_timer->Ticker );
|
||||||
|
|||||||
@@ -39,7 +39,9 @@
|
|||||||
#include <rtems/score/states.h>
|
#include <rtems/score/states.h>
|
||||||
#include <rtems/score/thread.h>
|
#include <rtems/score/thread.h>
|
||||||
#include <rtems/score/threadq.h>
|
#include <rtems/score/threadq.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/score/mpci.h>
|
#include <rtems/score/mpci.h>
|
||||||
|
#endif
|
||||||
#include <rtems/score/sysstate.h>
|
#include <rtems/score/sysstate.h>
|
||||||
|
|
||||||
#include <rtems/score/interr.h>
|
#include <rtems/score/interr.h>
|
||||||
@@ -75,10 +77,12 @@ void _Semaphore_Manager_initialization(
|
|||||||
* Register the MP Process Packet routine.
|
* Register the MP Process Packet routine.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_MPCI_Register_packet_processor(
|
_MPCI_Register_packet_processor(
|
||||||
MP_PACKET_SEMAPHORE,
|
MP_PACKET_SEMAPHORE,
|
||||||
_Semaphore_MP_Process_packet
|
_Semaphore_MP_Process_packet
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,6 +122,7 @@ rtems_status_code rtems_semaphore_create(
|
|||||||
if ( !rtems_is_name_valid( name ) )
|
if ( !rtems_is_name_valid( name ) )
|
||||||
return RTEMS_INVALID_NAME;
|
return RTEMS_INVALID_NAME;
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( _Attributes_Is_global( attribute_set ) ) {
|
if ( _Attributes_Is_global( attribute_set ) ) {
|
||||||
|
|
||||||
if ( !_System_state_Is_multiprocessing )
|
if ( !_System_state_Is_multiprocessing )
|
||||||
@@ -126,7 +131,9 @@ rtems_status_code rtems_semaphore_create(
|
|||||||
if ( _Attributes_Is_inherit_priority( attribute_set ) )
|
if ( _Attributes_Is_inherit_priority( attribute_set ) )
|
||||||
return RTEMS_NOT_DEFINED;
|
return RTEMS_NOT_DEFINED;
|
||||||
|
|
||||||
} else if ( _Attributes_Is_inherit_priority( attribute_set ) ||
|
} else
|
||||||
|
#endif
|
||||||
|
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
|
||||||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
|
_Attributes_Is_priority_ceiling( attribute_set ) ) {
|
||||||
|
|
||||||
if ( ! ( _Attributes_Is_binary_semaphore( attribute_set ) &&
|
if ( ! ( _Attributes_Is_binary_semaphore( attribute_set ) &&
|
||||||
@@ -147,6 +154,7 @@ rtems_status_code rtems_semaphore_create(
|
|||||||
return RTEMS_TOO_MANY;
|
return RTEMS_TOO_MANY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( _Attributes_Is_global( attribute_set ) &&
|
if ( _Attributes_Is_global( attribute_set ) &&
|
||||||
! ( _Objects_MP_Allocate_and_open( &_Semaphore_Information, name,
|
! ( _Objects_MP_Allocate_and_open( &_Semaphore_Information, name,
|
||||||
the_semaphore->Object.id, FALSE ) ) ) {
|
the_semaphore->Object.id, FALSE ) ) ) {
|
||||||
@@ -154,6 +162,7 @@ rtems_status_code rtems_semaphore_create(
|
|||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return RTEMS_TOO_MANY;
|
return RTEMS_TOO_MANY;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
the_semaphore->attribute_set = attribute_set;
|
the_semaphore->attribute_set = attribute_set;
|
||||||
|
|
||||||
@@ -183,7 +192,11 @@ rtems_status_code rtems_semaphore_create(
|
|||||||
OBJECTS_RTEMS_SEMAPHORES,
|
OBJECTS_RTEMS_SEMAPHORES,
|
||||||
&the_mutex_attributes,
|
&the_mutex_attributes,
|
||||||
lock,
|
lock,
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Semaphore_MP_Send_extract_proxy
|
_Semaphore_MP_Send_extract_proxy
|
||||||
|
#else
|
||||||
|
NULL
|
||||||
|
#endif
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -204,7 +217,11 @@ rtems_status_code rtems_semaphore_create(
|
|||||||
OBJECTS_RTEMS_SEMAPHORES,
|
OBJECTS_RTEMS_SEMAPHORES,
|
||||||
&the_semaphore_attributes,
|
&the_semaphore_attributes,
|
||||||
count,
|
count,
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Semaphore_MP_Send_extract_proxy
|
_Semaphore_MP_Send_extract_proxy
|
||||||
|
#else
|
||||||
|
NULL
|
||||||
|
#endif
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,6 +229,7 @@ rtems_status_code rtems_semaphore_create(
|
|||||||
|
|
||||||
*id = the_semaphore->Object.id;
|
*id = the_semaphore->Object.id;
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( _Attributes_Is_global( attribute_set ) )
|
if ( _Attributes_Is_global( attribute_set ) )
|
||||||
_Semaphore_MP_Send_process_packet(
|
_Semaphore_MP_Send_process_packet(
|
||||||
SEMAPHORE_MP_ANNOUNCE_CREATE,
|
SEMAPHORE_MP_ANNOUNCE_CREATE,
|
||||||
@@ -219,6 +237,7 @@ rtems_status_code rtems_semaphore_create(
|
|||||||
name,
|
name,
|
||||||
0 /* Not used */
|
0 /* Not used */
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return RTEMS_SUCCESSFUL;
|
return RTEMS_SUCCESSFUL;
|
||||||
}
|
}
|
||||||
@@ -279,11 +298,16 @@ rtems_status_code rtems_semaphore_delete(
|
|||||||
|
|
||||||
the_semaphore = _Semaphore_Get( id, &location );
|
the_semaphore = _Semaphore_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Thread_Dispatch();
|
_Thread_Dispatch();
|
||||||
return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
|
return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( _Attributes_Is_binary_semaphore( the_semaphore->attribute_set) ) {
|
if ( _Attributes_Is_binary_semaphore( the_semaphore->attribute_set) ) {
|
||||||
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) ) {
|
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) ) {
|
||||||
@@ -293,14 +317,22 @@ rtems_status_code rtems_semaphore_delete(
|
|||||||
else
|
else
|
||||||
_CORE_mutex_Flush(
|
_CORE_mutex_Flush(
|
||||||
&the_semaphore->Core_control.mutex,
|
&the_semaphore->Core_control.mutex,
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Semaphore_MP_Send_object_was_deleted,
|
_Semaphore_MP_Send_object_was_deleted,
|
||||||
|
#else
|
||||||
|
NULL,
|
||||||
|
#endif
|
||||||
CORE_MUTEX_WAS_DELETED
|
CORE_MUTEX_WAS_DELETED
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_CORE_semaphore_Flush(
|
_CORE_semaphore_Flush(
|
||||||
&the_semaphore->Core_control.semaphore,
|
&the_semaphore->Core_control.semaphore,
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Semaphore_MP_Send_object_was_deleted,
|
_Semaphore_MP_Send_object_was_deleted,
|
||||||
|
#else
|
||||||
|
NULL,
|
||||||
|
#endif
|
||||||
CORE_SEMAPHORE_WAS_DELETED
|
CORE_SEMAPHORE_WAS_DELETED
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -308,6 +340,7 @@ rtems_status_code rtems_semaphore_delete(
|
|||||||
|
|
||||||
_Semaphore_Free( the_semaphore );
|
_Semaphore_Free( the_semaphore );
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( _Attributes_Is_global( the_semaphore->attribute_set ) ) {
|
if ( _Attributes_Is_global( the_semaphore->attribute_set ) ) {
|
||||||
|
|
||||||
_Objects_MP_Close( &_Semaphore_Information, the_semaphore->Object.id );
|
_Objects_MP_Close( &_Semaphore_Information, the_semaphore->Object.id );
|
||||||
@@ -319,6 +352,7 @@ rtems_status_code rtems_semaphore_delete(
|
|||||||
0 /* Not used */
|
0 /* Not used */
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return RTEMS_SUCCESSFUL;
|
return RTEMS_SUCCESSFUL;
|
||||||
}
|
}
|
||||||
@@ -354,15 +388,19 @@ rtems_status_code rtems_semaphore_obtain(
|
|||||||
|
|
||||||
the_semaphore = _Semaphore_Get( id, &location );
|
the_semaphore = _Semaphore_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
return _Semaphore_MP_Send_request_packet(
|
return _Semaphore_MP_Send_request_packet(
|
||||||
SEMAPHORE_MP_OBTAIN_REQUEST,
|
SEMAPHORE_MP_OBTAIN_REQUEST,
|
||||||
id,
|
id,
|
||||||
option_set,
|
option_set,
|
||||||
timeout
|
timeout
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( _Options_Is_no_wait( option_set ) )
|
if ( _Options_Is_no_wait( option_set ) )
|
||||||
wait = FALSE;
|
wait = FALSE;
|
||||||
@@ -420,21 +458,30 @@ rtems_status_code rtems_semaphore_release(
|
|||||||
|
|
||||||
the_semaphore = _Semaphore_Get( id, &location );
|
the_semaphore = _Semaphore_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
return _Semaphore_MP_Send_request_packet(
|
return _Semaphore_MP_Send_request_packet(
|
||||||
SEMAPHORE_MP_RELEASE_REQUEST,
|
SEMAPHORE_MP_RELEASE_REQUEST,
|
||||||
id,
|
id,
|
||||||
0, /* Not used */
|
0, /* Not used */
|
||||||
MPCI_DEFAULT_TIMEOUT
|
MPCI_DEFAULT_TIMEOUT
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( _Attributes_Is_binary_semaphore( the_semaphore->attribute_set ) ) {
|
if ( _Attributes_Is_binary_semaphore( the_semaphore->attribute_set ) ) {
|
||||||
mutex_status = _CORE_mutex_Surrender(
|
mutex_status = _CORE_mutex_Surrender(
|
||||||
&the_semaphore->Core_control.mutex,
|
&the_semaphore->Core_control.mutex,
|
||||||
id,
|
id,
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Semaphore_Core_mutex_mp_support
|
_Semaphore_Core_mutex_mp_support
|
||||||
|
#else
|
||||||
|
NULL
|
||||||
|
#endif
|
||||||
);
|
);
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return _Semaphore_Translate_core_mutex_return_code( mutex_status );
|
return _Semaphore_Translate_core_mutex_return_code( mutex_status );
|
||||||
@@ -443,7 +490,11 @@ rtems_status_code rtems_semaphore_release(
|
|||||||
semaphore_status = _CORE_semaphore_Surrender(
|
semaphore_status = _CORE_semaphore_Surrender(
|
||||||
&the_semaphore->Core_control.semaphore,
|
&the_semaphore->Core_control.semaphore,
|
||||||
id,
|
id,
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Semaphore_Core_semaphore_mp_support
|
_Semaphore_Core_semaphore_mp_support
|
||||||
|
#else
|
||||||
|
NULL
|
||||||
|
#endif
|
||||||
);
|
);
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return
|
return
|
||||||
@@ -530,6 +581,7 @@ rtems_status_code _Semaphore_Translate_core_semaphore_return_code (
|
|||||||
* Output parameters: NONE
|
* Output parameters: NONE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
void _Semaphore_Core_mutex_mp_support (
|
void _Semaphore_Core_mutex_mp_support (
|
||||||
Thread_Control *the_thread,
|
Thread_Control *the_thread,
|
||||||
Objects_Id id
|
Objects_Id id
|
||||||
@@ -543,6 +595,7 @@ void _Semaphore_Core_mutex_mp_support (
|
|||||||
the_thread
|
the_thread
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -556,6 +609,7 @@ void _Semaphore_Core_mutex_mp_support (
|
|||||||
* Output parameters: NONE
|
* Output parameters: NONE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
void _Semaphore_Core_semaphore_mp_support (
|
void _Semaphore_Core_semaphore_mp_support (
|
||||||
Thread_Control *the_thread,
|
Thread_Control *the_thread,
|
||||||
Objects_Id id
|
Objects_Id id
|
||||||
@@ -569,3 +623,4 @@ void _Semaphore_Core_semaphore_mp_support (
|
|||||||
the_thread
|
the_thread
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -39,10 +39,12 @@ void _Signal_Manager_initialization( void )
|
|||||||
* Register the MP Process Packet routine.
|
* Register the MP Process Packet routine.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_MPCI_Register_packet_processor(
|
_MPCI_Register_packet_processor(
|
||||||
MP_PACKET_SIGNAL,
|
MP_PACKET_SIGNAL,
|
||||||
_Signal_MP_Process_packet
|
_Signal_MP_Process_packet
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -115,14 +117,19 @@ rtems_status_code rtems_signal_send(
|
|||||||
|
|
||||||
the_thread = _Thread_Get( id, &location );
|
the_thread = _Thread_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
return _Signal_MP_Send_request_packet(
|
return _Signal_MP_Send_request_packet(
|
||||||
SIGNAL_MP_SEND_REQUEST,
|
SIGNAL_MP_SEND_REQUEST,
|
||||||
id,
|
id,
|
||||||
signal_set
|
signal_set
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
|
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
|
||||||
asr = &api->Signal;
|
asr = &api->Signal;
|
||||||
|
|||||||
@@ -206,10 +206,12 @@ void _RTEMS_tasks_Manager_initialization(
|
|||||||
* Register the MP Process Packet routine.
|
* Register the MP Process Packet routine.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_MPCI_Register_packet_processor(
|
_MPCI_Register_packet_processor(
|
||||||
MP_PACKET_TASKS,
|
MP_PACKET_TASKS,
|
||||||
_RTEMS_tasks_MP_Process_packet
|
_RTEMS_tasks_MP_Process_packet
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -245,9 +247,11 @@ rtems_status_code rtems_task_create(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
register Thread_Control *the_thread;
|
register Thread_Control *the_thread;
|
||||||
Objects_MP_Control *the_global_object = NULL;
|
|
||||||
boolean is_fp;
|
boolean is_fp;
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
|
Objects_MP_Control *the_global_object = NULL;
|
||||||
boolean is_global;
|
boolean is_global;
|
||||||
|
#endif
|
||||||
boolean status;
|
boolean status;
|
||||||
rtems_attribute the_attribute_set;
|
rtems_attribute the_attribute_set;
|
||||||
Priority_Control core_priority;
|
Priority_Control core_priority;
|
||||||
@@ -297,6 +301,7 @@ rtems_status_code rtems_task_create(
|
|||||||
|
|
||||||
core_priority = _RTEMS_tasks_Priority_to_Core( initial_priority );
|
core_priority = _RTEMS_tasks_Priority_to_Core( initial_priority );
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( _Attributes_Is_global( the_attribute_set ) ) {
|
if ( _Attributes_Is_global( the_attribute_set ) ) {
|
||||||
|
|
||||||
is_global = TRUE;
|
is_global = TRUE;
|
||||||
@@ -306,6 +311,7 @@ rtems_status_code rtems_task_create(
|
|||||||
|
|
||||||
} else
|
} else
|
||||||
is_global = FALSE;
|
is_global = FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Make sure system is MP if this task is global
|
* Make sure system is MP if this task is global
|
||||||
@@ -334,6 +340,7 @@ rtems_status_code rtems_task_create(
|
|||||||
return RTEMS_TOO_MANY;
|
return RTEMS_TOO_MANY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( is_global ) {
|
if ( is_global ) {
|
||||||
the_global_object = _Objects_MP_Allocate_global_object();
|
the_global_object = _Objects_MP_Allocate_global_object();
|
||||||
|
|
||||||
@@ -343,6 +350,7 @@ rtems_status_code rtems_task_create(
|
|||||||
return RTEMS_TOO_MANY;
|
return RTEMS_TOO_MANY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize the core thread for this task.
|
* Initialize the core thread for this task.
|
||||||
@@ -365,8 +373,10 @@ rtems_status_code rtems_task_create(
|
|||||||
);
|
);
|
||||||
|
|
||||||
if ( !status ) {
|
if ( !status ) {
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( is_global )
|
if ( is_global )
|
||||||
_Objects_MP_Free_global_object( the_global_object );
|
_Objects_MP_Free_global_object( the_global_object );
|
||||||
|
#endif
|
||||||
_RTEMS_tasks_Free( the_thread );
|
_RTEMS_tasks_Free( the_thread );
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return RTEMS_UNSATISFIED;
|
return RTEMS_UNSATISFIED;
|
||||||
@@ -379,6 +389,7 @@ rtems_status_code rtems_task_create(
|
|||||||
|
|
||||||
*id = the_thread->Object.id;
|
*id = the_thread->Object.id;
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( is_global ) {
|
if ( is_global ) {
|
||||||
|
|
||||||
the_thread->is_global = TRUE;
|
the_thread->is_global = TRUE;
|
||||||
@@ -397,6 +408,7 @@ rtems_status_code rtems_task_create(
|
|||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return RTEMS_SUCCESSFUL;
|
return RTEMS_SUCCESSFUL;
|
||||||
@@ -470,11 +482,16 @@ rtems_status_code rtems_task_start(
|
|||||||
|
|
||||||
the_thread = _Thread_Get( id, &location );
|
the_thread = _Thread_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Thread_Dispatch();
|
_Thread_Dispatch();
|
||||||
return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
|
return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( _Thread_Start(
|
if ( _Thread_Start(
|
||||||
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
|
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
|
||||||
@@ -516,11 +533,16 @@ rtems_status_code rtems_task_restart(
|
|||||||
|
|
||||||
the_thread = _Thread_Get( id, &location );
|
the_thread = _Thread_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Thread_Dispatch();
|
_Thread_Dispatch();
|
||||||
return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
|
return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( _Thread_Restart( the_thread, NULL, argument ) ) {
|
if ( _Thread_Restart( the_thread, NULL, argument ) ) {
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
@@ -561,11 +583,16 @@ rtems_status_code rtems_task_delete(
|
|||||||
|
|
||||||
the_thread = _Thread_Get( id, &location );
|
the_thread = _Thread_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Thread_Dispatch();
|
_Thread_Dispatch();
|
||||||
return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
|
return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
the_information = _Objects_Get_information( the_thread->Object.id );
|
the_information = _Objects_Get_information( the_thread->Object.id );
|
||||||
|
|
||||||
@@ -579,6 +606,7 @@ rtems_status_code rtems_task_delete(
|
|||||||
|
|
||||||
_RTEMS_tasks_Free( the_thread );
|
_RTEMS_tasks_Free( the_thread );
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( the_thread->is_global ) {
|
if ( the_thread->is_global ) {
|
||||||
|
|
||||||
_Objects_MP_Close( &_RTEMS_tasks_Information, the_thread->Object.id );
|
_Objects_MP_Close( &_RTEMS_tasks_Information, the_thread->Object.id );
|
||||||
@@ -589,6 +617,7 @@ rtems_status_code rtems_task_delete(
|
|||||||
0 /* Not used */
|
0 /* Not used */
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
_Thread_Enable_dispatch();
|
_Thread_Enable_dispatch();
|
||||||
return RTEMS_SUCCESSFUL;
|
return RTEMS_SUCCESSFUL;
|
||||||
@@ -622,9 +651,9 @@ rtems_status_code rtems_task_suspend(
|
|||||||
|
|
||||||
the_thread = _Thread_Get( id, &location );
|
the_thread = _Thread_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
return _RTEMS_tasks_MP_Send_request_packet(
|
return _RTEMS_tasks_MP_Send_request_packet(
|
||||||
RTEMS_TASKS_MP_SUSPEND_REQUEST,
|
RTEMS_TASKS_MP_SUSPEND_REQUEST,
|
||||||
id,
|
id,
|
||||||
@@ -632,6 +661,11 @@ rtems_status_code rtems_task_suspend(
|
|||||||
0, /* Not used */
|
0, /* Not used */
|
||||||
0 /* Not used */
|
0 /* Not used */
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( !_States_Is_suspended( the_thread->current_state ) ) {
|
if ( !_States_Is_suspended( the_thread->current_state ) ) {
|
||||||
_Thread_Set_state( the_thread, STATES_SUSPENDED );
|
_Thread_Set_state( the_thread, STATES_SUSPENDED );
|
||||||
@@ -669,18 +703,21 @@ rtems_status_code rtems_task_resume(
|
|||||||
|
|
||||||
the_thread = _Thread_Get( id, &location );
|
the_thread = _Thread_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
return(
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_RTEMS_tasks_MP_Send_request_packet(
|
return _RTEMS_tasks_MP_Send_request_packet(
|
||||||
RTEMS_TASKS_MP_RESUME_REQUEST,
|
RTEMS_TASKS_MP_RESUME_REQUEST,
|
||||||
id,
|
id,
|
||||||
0, /* Not used */
|
0, /* Not used */
|
||||||
0, /* Not used */
|
0, /* Not used */
|
||||||
0 /* Not used */
|
0 /* Not used */
|
||||||
)
|
);
|
||||||
);
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( _States_Is_suspended( the_thread->current_state ) ) {
|
if ( _States_Is_suspended( the_thread->current_state ) ) {
|
||||||
_Thread_Resume( the_thread );
|
_Thread_Resume( the_thread );
|
||||||
@@ -728,19 +765,22 @@ rtems_status_code rtems_task_set_priority(
|
|||||||
|
|
||||||
the_thread = _Thread_Get( id, &location );
|
the_thread = _Thread_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Thread_Executing->Wait.return_argument = old_priority;
|
_Thread_Executing->Wait.return_argument = old_priority;
|
||||||
return(
|
return _RTEMS_tasks_MP_Send_request_packet(
|
||||||
_RTEMS_tasks_MP_Send_request_packet(
|
|
||||||
RTEMS_TASKS_MP_SET_PRIORITY_REQUEST,
|
RTEMS_TASKS_MP_SET_PRIORITY_REQUEST,
|
||||||
id,
|
id,
|
||||||
new_priority,
|
new_priority,
|
||||||
0, /* Not used */
|
0, /* Not used */
|
||||||
0 /* Not used */
|
0 /* Not used */
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
*old_priority = the_thread->current_priority;
|
*old_priority = the_thread->current_priority;
|
||||||
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
|
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
|
||||||
@@ -897,9 +937,9 @@ rtems_status_code rtems_task_get_note(
|
|||||||
|
|
||||||
the_thread = _Thread_Get( id, &location );
|
the_thread = _Thread_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Thread_Executing->Wait.return_argument = note;
|
_Thread_Executing->Wait.return_argument = note;
|
||||||
|
|
||||||
return _RTEMS_tasks_MP_Send_request_packet(
|
return _RTEMS_tasks_MP_Send_request_packet(
|
||||||
@@ -909,6 +949,11 @@ rtems_status_code rtems_task_get_note(
|
|||||||
notepad,
|
notepad,
|
||||||
0 /* Not used */
|
0 /* Not used */
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
|
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
|
||||||
*note = api->Notepads[ notepad ];
|
*note = api->Notepads[ notepad ];
|
||||||
@@ -967,9 +1012,9 @@ rtems_status_code rtems_task_set_note(
|
|||||||
|
|
||||||
the_thread = _Thread_Get( id, &location );
|
the_thread = _Thread_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE:
|
case OBJECTS_REMOTE:
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
return _RTEMS_tasks_MP_Send_request_packet(
|
return _RTEMS_tasks_MP_Send_request_packet(
|
||||||
RTEMS_TASKS_MP_SET_NOTE_REQUEST,
|
RTEMS_TASKS_MP_SET_NOTE_REQUEST,
|
||||||
id,
|
id,
|
||||||
@@ -977,6 +1022,10 @@ rtems_status_code rtems_task_set_note(
|
|||||||
notepad,
|
notepad,
|
||||||
note
|
note
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
|
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
|
||||||
|
|||||||
@@ -151,10 +151,12 @@ rtems_status_code rtems_timer_cancel(
|
|||||||
|
|
||||||
the_timer = _Timer_Get( id, &location );
|
the_timer = _Timer_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* should never return this */
|
case OBJECTS_REMOTE: /* should never return this */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
|
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
|
||||||
(void) _Watchdog_Remove( &the_timer->Ticker );
|
(void) _Watchdog_Remove( &the_timer->Ticker );
|
||||||
@@ -188,10 +190,12 @@ rtems_status_code rtems_timer_delete(
|
|||||||
|
|
||||||
the_timer = _Timer_Get( id, &location );
|
the_timer = _Timer_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* should never return this */
|
case OBJECTS_REMOTE: /* should never return this */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
_Objects_Close( &_Timer_Information, &the_timer->Object );
|
_Objects_Close( &_Timer_Information, &the_timer->Object );
|
||||||
(void) _Watchdog_Remove( &the_timer->Ticker );
|
(void) _Watchdog_Remove( &the_timer->Ticker );
|
||||||
@@ -234,10 +238,12 @@ rtems_status_code rtems_timer_fire_after(
|
|||||||
|
|
||||||
the_timer = _Timer_Get( id, &location );
|
the_timer = _Timer_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* should never return this */
|
case OBJECTS_REMOTE: /* should never return this */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
(void) _Watchdog_Remove( &the_timer->Ticker );
|
(void) _Watchdog_Remove( &the_timer->Ticker );
|
||||||
the_timer->the_class = TIMER_INTERVAL;
|
the_timer->the_class = TIMER_INTERVAL;
|
||||||
@@ -289,10 +295,12 @@ rtems_status_code rtems_timer_fire_when(
|
|||||||
|
|
||||||
the_timer = _Timer_Get( id, &location );
|
the_timer = _Timer_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* should never return this */
|
case OBJECTS_REMOTE: /* should never return this */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
(void) _Watchdog_Remove( &the_timer->Ticker );
|
(void) _Watchdog_Remove( &the_timer->Ticker );
|
||||||
the_timer->the_class = TIMER_TIME_OF_DAY;
|
the_timer->the_class = TIMER_TIME_OF_DAY;
|
||||||
@@ -331,10 +339,12 @@ rtems_status_code rtems_timer_reset(
|
|||||||
|
|
||||||
the_timer = _Timer_Get( id, &location );
|
the_timer = _Timer_Get( id, &location );
|
||||||
switch ( location ) {
|
switch ( location ) {
|
||||||
case OBJECTS_ERROR:
|
|
||||||
return RTEMS_INVALID_ID;
|
|
||||||
case OBJECTS_REMOTE: /* should never return this */
|
case OBJECTS_REMOTE: /* should never return this */
|
||||||
return RTEMS_INTERNAL_ERROR;
|
return RTEMS_INTERNAL_ERROR;
|
||||||
|
|
||||||
|
case OBJECTS_ERROR:
|
||||||
|
return RTEMS_INVALID_ID;
|
||||||
|
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
if ( _Timer_Is_interval_class( the_timer->the_class ) ) {
|
if ( _Timer_Is_interval_class( the_timer->the_class ) ) {
|
||||||
_Watchdog_Reset( &the_timer->Ticker );
|
_Watchdog_Reset( &the_timer->Ticker );
|
||||||
|
|||||||
@@ -43,7 +43,9 @@ typedef void *posix_api_configuration_table;
|
|||||||
|
|
||||||
#include <rtems/extension.h>
|
#include <rtems/extension.h>
|
||||||
#include <rtems/io.h>
|
#include <rtems/io.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/score/mpci.h>
|
#include <rtems/score/mpci.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following records define the Multiprocessor Configuration
|
* The following records define the Multiprocessor Configuration
|
||||||
@@ -57,7 +59,11 @@ typedef struct {
|
|||||||
unsigned32 maximum_nodes; /* maximum # nodes in system */
|
unsigned32 maximum_nodes; /* maximum # nodes in system */
|
||||||
unsigned32 maximum_global_objects; /* maximum # global objects */
|
unsigned32 maximum_global_objects; /* maximum # global objects */
|
||||||
unsigned32 maximum_proxies; /* maximum # proxies */
|
unsigned32 maximum_proxies; /* maximum # proxies */
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
MPCI_Control *User_mpci_table; /* pointer to MPCI table */
|
MPCI_Control *User_mpci_table; /* pointer to MPCI table */
|
||||||
|
#else
|
||||||
|
void *User_mpci_table; /* pointer to MPCI table */
|
||||||
|
#endif
|
||||||
} rtems_multiprocessing_table;
|
} rtems_multiprocessing_table;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ extern "C" {
|
|||||||
#include <rtems/rtems/dpmem.h>
|
#include <rtems/rtems/dpmem.h>
|
||||||
#include <rtems/rtems/event.h>
|
#include <rtems/rtems/event.h>
|
||||||
#include <rtems/rtems/message.h>
|
#include <rtems/rtems/message.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/mp.h>
|
#include <rtems/rtems/mp.h>
|
||||||
|
#endif
|
||||||
#include <rtems/rtems/part.h>
|
#include <rtems/rtems/part.h>
|
||||||
#include <rtems/rtems/ratemon.h>
|
#include <rtems/rtems/ratemon.h>
|
||||||
#include <rtems/rtems/region.h>
|
#include <rtems/rtems/region.h>
|
||||||
@@ -152,7 +154,11 @@ const void * _Entry_points[ RTEMS_NUMBER_OF_ENTRY_POINTS ] = {
|
|||||||
(void *) rtems_rate_monotonic_delete, /* 76 */
|
(void *) rtems_rate_monotonic_delete, /* 76 */
|
||||||
(void *) rtems_rate_monotonic_cancel, /* 77 */
|
(void *) rtems_rate_monotonic_cancel, /* 77 */
|
||||||
(void *) rtems_rate_monotonic_period, /* 78 */
|
(void *) rtems_rate_monotonic_period, /* 78 */
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
(void *) rtems_multiprocessing_announce, /* 79 */
|
(void *) rtems_multiprocessing_announce, /* 79 */
|
||||||
|
#else
|
||||||
|
(void *) NULL, /* 79 */
|
||||||
|
#endif
|
||||||
(void *) rtems_debug_enable, /* 80 */
|
(void *) rtems_debug_enable, /* 80 */
|
||||||
(void *) rtems_debug_disable /* 81 */
|
(void *) rtems_debug_disable /* 81 */
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -43,7 +43,9 @@ typedef void *posix_api_configuration_table;
|
|||||||
|
|
||||||
#include <rtems/extension.h>
|
#include <rtems/extension.h>
|
||||||
#include <rtems/io.h>
|
#include <rtems/io.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/score/mpci.h>
|
#include <rtems/score/mpci.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following records define the Multiprocessor Configuration
|
* The following records define the Multiprocessor Configuration
|
||||||
@@ -57,7 +59,11 @@ typedef struct {
|
|||||||
unsigned32 maximum_nodes; /* maximum # nodes in system */
|
unsigned32 maximum_nodes; /* maximum # nodes in system */
|
||||||
unsigned32 maximum_global_objects; /* maximum # global objects */
|
unsigned32 maximum_global_objects; /* maximum # global objects */
|
||||||
unsigned32 maximum_proxies; /* maximum # proxies */
|
unsigned32 maximum_proxies; /* maximum # proxies */
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
MPCI_Control *User_mpci_table; /* pointer to MPCI table */
|
MPCI_Control *User_mpci_table; /* pointer to MPCI table */
|
||||||
|
#else
|
||||||
|
void *User_mpci_table; /* pointer to MPCI table */
|
||||||
|
#endif
|
||||||
} rtems_multiprocessing_table;
|
} rtems_multiprocessing_table;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -35,7 +35,9 @@ extern "C" {
|
|||||||
#include <rtems/rtems/dpmem.h>
|
#include <rtems/rtems/dpmem.h>
|
||||||
#include <rtems/rtems/event.h>
|
#include <rtems/rtems/event.h>
|
||||||
#include <rtems/rtems/message.h>
|
#include <rtems/rtems/message.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/mp.h>
|
#include <rtems/rtems/mp.h>
|
||||||
|
#endif
|
||||||
#include <rtems/rtems/part.h>
|
#include <rtems/rtems/part.h>
|
||||||
#include <rtems/rtems/ratemon.h>
|
#include <rtems/rtems/ratemon.h>
|
||||||
#include <rtems/rtems/region.h>
|
#include <rtems/rtems/region.h>
|
||||||
@@ -152,7 +154,11 @@ const void * _Entry_points[ RTEMS_NUMBER_OF_ENTRY_POINTS ] = {
|
|||||||
(void *) rtems_rate_monotonic_delete, /* 76 */
|
(void *) rtems_rate_monotonic_delete, /* 76 */
|
||||||
(void *) rtems_rate_monotonic_cancel, /* 77 */
|
(void *) rtems_rate_monotonic_cancel, /* 77 */
|
||||||
(void *) rtems_rate_monotonic_period, /* 78 */
|
(void *) rtems_rate_monotonic_period, /* 78 */
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
(void *) rtems_multiprocessing_announce, /* 79 */
|
(void *) rtems_multiprocessing_announce, /* 79 */
|
||||||
|
#else
|
||||||
|
(void *) NULL, /* 79 */
|
||||||
|
#endif
|
||||||
(void *) rtems_debug_enable, /* 80 */
|
(void *) rtems_debug_enable, /* 80 */
|
||||||
(void *) rtems_debug_disable /* 81 */
|
(void *) rtems_debug_disable /* 81 */
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -34,7 +34,9 @@
|
|||||||
#include <rtems/score/heap.h>
|
#include <rtems/score/heap.h>
|
||||||
#include <rtems/score/interr.h>
|
#include <rtems/score/interr.h>
|
||||||
#include <rtems/score/isr.h>
|
#include <rtems/score/isr.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/score/mpci.h>
|
#include <rtems/score/mpci.h>
|
||||||
|
#endif
|
||||||
#include <rtems/score/priority.h>
|
#include <rtems/score/priority.h>
|
||||||
#include <rtems/score/thread.h>
|
#include <rtems/score/thread.h>
|
||||||
#include <rtems/score/tod.h>
|
#include <rtems/score/tod.h>
|
||||||
@@ -107,11 +109,18 @@ rtems_interrupt_level rtems_initialize_executive_early(
|
|||||||
* Initialize the system state based on whether this is an MP system.
|
* Initialize the system state based on whether this is an MP system.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
multiprocessing_table = configuration_table->User_multiprocessing_table;
|
multiprocessing_table = configuration_table->User_multiprocessing_table;
|
||||||
|
|
||||||
_System_state_Handler_initialization(
|
_System_state_Handler_initialization(
|
||||||
(multiprocessing_table) ? TRUE : FALSE
|
(multiprocessing_table) ? TRUE : FALSE
|
||||||
);
|
);
|
||||||
|
#else
|
||||||
|
multiprocessing_table = NULL;
|
||||||
|
|
||||||
|
_System_state_Handler_initialization( FALSE );
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Provided just for user convenience.
|
* Provided just for user convenience.
|
||||||
@@ -179,10 +188,12 @@ rtems_interrupt_level rtems_initialize_executive_early(
|
|||||||
multiprocessing_table->maximum_proxies
|
multiprocessing_table->maximum_proxies
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_MPCI_Handler_initialization(
|
_MPCI_Handler_initialization(
|
||||||
multiprocessing_table->User_mpci_table,
|
multiprocessing_table->User_mpci_table,
|
||||||
RTEMS_TIMEOUT
|
RTEMS_TIMEOUT
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* MANAGERS */
|
/* MANAGERS */
|
||||||
|
|
||||||
@@ -215,7 +226,9 @@ rtems_interrupt_level rtems_initialize_executive_early(
|
|||||||
|
|
||||||
_Thread_Create_idle();
|
_Thread_Create_idle();
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_MPCI_Create_server();
|
_MPCI_Create_server();
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Run the API and BSPs predriver hook.
|
* Run the API and BSPs predriver hook.
|
||||||
@@ -234,12 +247,14 @@ rtems_interrupt_level rtems_initialize_executive_early(
|
|||||||
|
|
||||||
_IO_Initialize_all_drivers();
|
_IO_Initialize_all_drivers();
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( _System_state_Is_multiprocessing ) {
|
if ( _System_state_Is_multiprocessing ) {
|
||||||
_MPCI_Initialization();
|
_MPCI_Initialization();
|
||||||
_MPCI_Internal_packets_Send_process_packet(
|
_MPCI_Internal_packets_Send_process_packet(
|
||||||
MPCI_PACKETS_SYSTEM_VERIFY
|
MPCI_PACKETS_SYSTEM_VERIFY
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Run the APIs and BSPs postdriver hooks.
|
* Run the APIs and BSPs postdriver hooks.
|
||||||
|
|||||||
@@ -31,7 +31,9 @@
|
|||||||
#include <rtems/rtems/dpmem.h>
|
#include <rtems/rtems/dpmem.h>
|
||||||
#include <rtems/rtems/event.h>
|
#include <rtems/rtems/event.h>
|
||||||
#include <rtems/rtems/message.h>
|
#include <rtems/rtems/message.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/rtems/mp.h>
|
#include <rtems/rtems/mp.h>
|
||||||
|
#endif
|
||||||
#include <rtems/rtems/part.h>
|
#include <rtems/rtems/part.h>
|
||||||
#include <rtems/rtems/ratemon.h>
|
#include <rtems/rtems/ratemon.h>
|
||||||
#include <rtems/rtems/region.h>
|
#include <rtems/rtems/region.h>
|
||||||
@@ -58,7 +60,9 @@ void _RTEMS_API_Initialize(
|
|||||||
|
|
||||||
_Interrupt_Manager_initialization();
|
_Interrupt_Manager_initialization();
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Multiprocessing_Manager_initialization();
|
_Multiprocessing_Manager_initialization();
|
||||||
|
#endif
|
||||||
|
|
||||||
_RTEMS_tasks_Manager_initialization(
|
_RTEMS_tasks_Manager_initialization(
|
||||||
api_configuration->maximum_tasks,
|
api_configuration->maximum_tasks,
|
||||||
|
|||||||
@@ -8,10 +8,14 @@ VPATH = @srcdir@
|
|||||||
RTEMS_ROOT = @top_srcdir@
|
RTEMS_ROOT = @top_srcdir@
|
||||||
PROJECT_ROOT = @PROJECT_ROOT@
|
PROJECT_ROOT = @PROJECT_ROOT@
|
||||||
|
|
||||||
|
# We only build multiprocessing related files if HAS_MP was defined
|
||||||
|
MP_PIECES_yes_V = mpci mppkt objectmp threadmp
|
||||||
|
MP_PIECES = $(MP_PIECES_$(HAS_MP)_V)
|
||||||
|
|
||||||
# H_FILES that get installed in the rtems/score subdirectoy
|
# H_FILES that get installed in the rtems/score subdirectoy
|
||||||
H_PIECES= address apiext bitfield chain context copyrt coremsg coremutex \
|
H_PIECES= address apiext bitfield chain context copyrt coremsg coremutex \
|
||||||
coresem heap interr isr mpci mppkt object objectmp \
|
coresem heap interr isr object \
|
||||||
priority stack states sysstate thread threadmp threadq \
|
priority stack states sysstate thread threadq \
|
||||||
tod tqdata userext watchdog wkspace
|
tod tqdata userext watchdog wkspace
|
||||||
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
|
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
|
||||||
|
|
||||||
|
|||||||
@@ -387,7 +387,9 @@ Objects_Information *_Objects_Get_information(
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtems/score/object.inl>
|
#include <rtems/score/object.inl>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/score/objectmp.h>
|
#include <rtems/score/objectmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ extern "C" {
|
|||||||
|
|
||||||
#include <rtems/score/context.h>
|
#include <rtems/score/context.h>
|
||||||
#include <rtems/score/cpu.h>
|
#include <rtems/score/cpu.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/score/mppkt.h>
|
#include <rtems/score/mppkt.h>
|
||||||
|
#endif
|
||||||
#include <rtems/score/object.h>
|
#include <rtems/score/object.h>
|
||||||
#include <rtems/score/priority.h>
|
#include <rtems/score/priority.h>
|
||||||
#include <rtems/score/stack.h>
|
#include <rtems/score/stack.h>
|
||||||
@@ -141,7 +143,9 @@ typedef struct {
|
|||||||
unsigned32 resource_count;
|
unsigned32 resource_count;
|
||||||
Thread_Wait_information Wait;
|
Thread_Wait_information Wait;
|
||||||
Watchdog_Control Timer;
|
Watchdog_Control Timer;
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
MP_packet_Prefix *receive_packet;
|
MP_packet_Prefix *receive_packet;
|
||||||
|
#endif
|
||||||
/****************** end of common block ********************/
|
/****************** end of common block ********************/
|
||||||
Chain_Node Active;
|
Chain_Node Active;
|
||||||
} Thread_Proxy_control;
|
} Thread_Proxy_control;
|
||||||
@@ -171,7 +175,9 @@ struct Thread_Control_struct {
|
|||||||
unsigned32 resource_count;
|
unsigned32 resource_count;
|
||||||
Thread_Wait_information Wait;
|
Thread_Wait_information Wait;
|
||||||
Watchdog_Control Timer;
|
Watchdog_Control Timer;
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
MP_packet_Prefix *receive_packet;
|
MP_packet_Prefix *receive_packet;
|
||||||
|
#endif
|
||||||
/****************** end of common block ********************/
|
/****************** end of common block ********************/
|
||||||
boolean is_global;
|
boolean is_global;
|
||||||
boolean do_post_task_switch_extension;
|
boolean do_post_task_switch_extension;
|
||||||
@@ -619,7 +625,9 @@ Thread _Thread_Idle_body(
|
|||||||
#ifndef __RTEMS_APPLICATION__
|
#ifndef __RTEMS_APPLICATION__
|
||||||
#include <rtems/score/thread.inl>
|
#include <rtems/score/thread.inl>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/score/threadmp.h>
|
#include <rtems/score/threadmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,10 +8,14 @@ VPATH = @srcdir@
|
|||||||
RTEMS_ROOT = @top_srcdir@
|
RTEMS_ROOT = @top_srcdir@
|
||||||
PROJECT_ROOT = @PROJECT_ROOT@
|
PROJECT_ROOT = @PROJECT_ROOT@
|
||||||
|
|
||||||
|
# We only build multiprocessing related files if HAS_MP was defined
|
||||||
|
MP_PIECES_yes_V = mpci mppkt objectmp threadmp
|
||||||
|
MP_PIECES = $(MP_PIECES_$(HAS_MP)_V)
|
||||||
|
|
||||||
# H_FILES that get installed in the rtems/score subdirectoy
|
# H_FILES that get installed in the rtems/score subdirectoy
|
||||||
H_PIECES= address apiext bitfield chain context copyrt coremsg coremutex \
|
H_PIECES= address apiext bitfield chain context copyrt coremsg coremutex \
|
||||||
coresem heap interr isr mpci mppkt object objectmp \
|
coresem heap interr isr object \
|
||||||
priority stack states sysstate thread threadmp threadq \
|
priority stack states sysstate thread threadq \
|
||||||
tod tqdata userext watchdog wkspace
|
tod tqdata userext watchdog wkspace
|
||||||
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
|
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
|
||||||
|
|
||||||
|
|||||||
@@ -387,7 +387,9 @@ Objects_Information *_Objects_Get_information(
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtems/score/object.inl>
|
#include <rtems/score/object.inl>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/score/objectmp.h>
|
#include <rtems/score/objectmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ extern "C" {
|
|||||||
|
|
||||||
#include <rtems/score/context.h>
|
#include <rtems/score/context.h>
|
||||||
#include <rtems/score/cpu.h>
|
#include <rtems/score/cpu.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/score/mppkt.h>
|
#include <rtems/score/mppkt.h>
|
||||||
|
#endif
|
||||||
#include <rtems/score/object.h>
|
#include <rtems/score/object.h>
|
||||||
#include <rtems/score/priority.h>
|
#include <rtems/score/priority.h>
|
||||||
#include <rtems/score/stack.h>
|
#include <rtems/score/stack.h>
|
||||||
@@ -141,7 +143,9 @@ typedef struct {
|
|||||||
unsigned32 resource_count;
|
unsigned32 resource_count;
|
||||||
Thread_Wait_information Wait;
|
Thread_Wait_information Wait;
|
||||||
Watchdog_Control Timer;
|
Watchdog_Control Timer;
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
MP_packet_Prefix *receive_packet;
|
MP_packet_Prefix *receive_packet;
|
||||||
|
#endif
|
||||||
/****************** end of common block ********************/
|
/****************** end of common block ********************/
|
||||||
Chain_Node Active;
|
Chain_Node Active;
|
||||||
} Thread_Proxy_control;
|
} Thread_Proxy_control;
|
||||||
@@ -171,7 +175,9 @@ struct Thread_Control_struct {
|
|||||||
unsigned32 resource_count;
|
unsigned32 resource_count;
|
||||||
Thread_Wait_information Wait;
|
Thread_Wait_information Wait;
|
||||||
Watchdog_Control Timer;
|
Watchdog_Control Timer;
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
MP_packet_Prefix *receive_packet;
|
MP_packet_Prefix *receive_packet;
|
||||||
|
#endif
|
||||||
/****************** end of common block ********************/
|
/****************** end of common block ********************/
|
||||||
boolean is_global;
|
boolean is_global;
|
||||||
boolean do_post_task_switch_extension;
|
boolean do_post_task_switch_extension;
|
||||||
@@ -619,7 +625,9 @@ Thread _Thread_Idle_body(
|
|||||||
#ifndef __RTEMS_APPLICATION__
|
#ifndef __RTEMS_APPLICATION__
|
||||||
#include <rtems/score/thread.inl>
|
#include <rtems/score/thread.inl>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/score/threadmp.h>
|
#include <rtems/score/threadmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,13 @@ VPATH = @srcdir@
|
|||||||
RTEMS_ROOT = @top_srcdir@
|
RTEMS_ROOT = @top_srcdir@
|
||||||
PROJECT_ROOT = @PROJECT_ROOT@
|
PROJECT_ROOT = @PROJECT_ROOT@
|
||||||
|
|
||||||
|
# We only build multiprocessing related files if HAS_MP was defined
|
||||||
|
MP_PIECES_yes_V = mppkt objectmp threadmp
|
||||||
|
MP_PIECES = $(MP_PIECES_$(HAS_MP)_V)
|
||||||
|
|
||||||
I_PIECES= address chain coremsg coremutex coresem heap \
|
I_PIECES= address chain coremsg coremutex coresem heap \
|
||||||
isr mppkt object objectmp priority stack states sysstate thread \
|
isr object priority stack states sysstate thread \
|
||||||
threadmp tod tqdata userext watchdog wkspace
|
tod tqdata userext watchdog wkspace $(MP_PIECES)
|
||||||
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
|
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
|
||||||
|
|
||||||
SRCS=$(I_FILES)
|
SRCS=$(I_FILES)
|
||||||
|
|||||||
@@ -8,9 +8,13 @@ VPATH = @srcdir@
|
|||||||
RTEMS_ROOT = @top_srcdir@
|
RTEMS_ROOT = @top_srcdir@
|
||||||
PROJECT_ROOT = @PROJECT_ROOT@
|
PROJECT_ROOT = @PROJECT_ROOT@
|
||||||
|
|
||||||
|
# We only build multiprocessing related files if HAS_MP was defined
|
||||||
|
MP_PIECES_yes_V = mppkt objectmp threadmp
|
||||||
|
MP_PIECES = $(MP_PIECES_$(HAS_MP)_V)
|
||||||
|
|
||||||
I_PIECES= address chain coremsg coremutex coresem heap \
|
I_PIECES= address chain coremsg coremutex coresem heap \
|
||||||
isr mppkt object objectmp priority stack states sysstate thread \
|
isr object priority stack states sysstate thread \
|
||||||
threadmp tod tqdata userext watchdog wkspace
|
tod tqdata userext watchdog wkspace $(MP_PIECES)
|
||||||
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
|
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
|
||||||
|
|
||||||
SRCS=$(I_FILES)
|
SRCS=$(I_FILES)
|
||||||
|
|||||||
@@ -8,9 +8,13 @@ VPATH = @srcdir@
|
|||||||
RTEMS_ROOT = @top_srcdir@
|
RTEMS_ROOT = @top_srcdir@
|
||||||
PROJECT_ROOT = @PROJECT_ROOT@
|
PROJECT_ROOT = @PROJECT_ROOT@
|
||||||
|
|
||||||
|
# We only build multiprocessing related files if HAS_MP was defined
|
||||||
|
MP_PIECES_yes_V = mppkt objectmp threadmp
|
||||||
|
MP_PIECES = $(MP_PIECES_$(HAS_MP)_V)
|
||||||
|
|
||||||
I_PIECES= address chain coremsg coremutex coresem heap \
|
I_PIECES= address chain coremsg coremutex coresem heap \
|
||||||
isr mppkt object objectmp priority stack states sysstate thread \
|
isr object priority stack states sysstate thread \
|
||||||
threadmp tod tqdata userext watchdog wkspace
|
tod tqdata userext watchdog wkspace $(MP_PIECES)
|
||||||
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
|
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
|
||||||
|
|
||||||
SRCS=$(I_FILES)
|
SRCS=$(I_FILES)
|
||||||
|
|||||||
@@ -8,9 +8,13 @@ VPATH = @srcdir@
|
|||||||
RTEMS_ROOT = @top_srcdir@
|
RTEMS_ROOT = @top_srcdir@
|
||||||
PROJECT_ROOT = @PROJECT_ROOT@
|
PROJECT_ROOT = @PROJECT_ROOT@
|
||||||
|
|
||||||
|
# We only build multiprocessing related files if HAS_MP was defined
|
||||||
|
MP_PIECES_yes_V = mppkt objectmp threadmp
|
||||||
|
MP_PIECES = $(MP_PIECES_$(HAS_MP)_V)
|
||||||
|
|
||||||
I_PIECES= address chain coremsg coremutex coresem heap \
|
I_PIECES= address chain coremsg coremutex coresem heap \
|
||||||
isr mppkt object objectmp priority stack states sysstate thread \
|
isr object priority stack states sysstate thread \
|
||||||
threadmp tod tqdata userext watchdog wkspace
|
tod tqdata userext watchdog wkspace $(MP_PIECES)
|
||||||
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
|
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
|
||||||
|
|
||||||
SRCS=$(I_FILES)
|
SRCS=$(I_FILES)
|
||||||
|
|||||||
@@ -8,10 +8,14 @@ VPATH = @srcdir@
|
|||||||
RTEMS_ROOT = @top_srcdir@
|
RTEMS_ROOT = @top_srcdir@
|
||||||
PROJECT_ROOT = @PROJECT_ROOT@
|
PROJECT_ROOT = @PROJECT_ROOT@
|
||||||
|
|
||||||
|
# We only build multiprocessing related files if HAS_MP was defined
|
||||||
|
MP_PIECES_yes_V = mpci objectmp threadmp
|
||||||
|
MP_PIECES = $(MP_PIECES_$(HAS_MP)_V)
|
||||||
|
|
||||||
# C and C++ source names, if any, go here -- minus the .c or .cc
|
# C and C++ source names, if any, go here -- minus the .c or .cc
|
||||||
C_PIECES=apiext chain coremsg coremutex coresem heap interr \
|
C_PIECES=apiext chain coremsg coremutex coresem heap interr \
|
||||||
isr mpci object objectmp thread threadmp threadq tod userext \
|
isr object thread threadq tod userext \
|
||||||
watchdog wkspace
|
watchdog wkspace $(MP_PIECES)
|
||||||
C_FILES=$(C_PIECES:%=%.c)
|
C_FILES=$(C_PIECES:%=%.c)
|
||||||
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
|
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,9 @@
|
|||||||
#include <rtems/score/states.h>
|
#include <rtems/score/states.h>
|
||||||
#include <rtems/score/thread.h>
|
#include <rtems/score/thread.h>
|
||||||
#include <rtems/score/wkspace.h>
|
#include <rtems/score/wkspace.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/score/mpci.h>
|
#include <rtems/score/mpci.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
@@ -217,8 +219,10 @@ CORE_message_queue_Status _CORE_message_queue_Broadcast(
|
|||||||
|
|
||||||
*(unsigned32 *)the_thread->Wait.return_argument_1 = size;
|
*(unsigned32 *)the_thread->Wait.return_argument_1 = size;
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
|
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
|
||||||
(*api_message_queue_mp_support) ( the_thread, id );
|
(*api_message_queue_mp_support) ( the_thread, id );
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
*count = number_broadcasted;
|
*count = number_broadcasted;
|
||||||
@@ -394,8 +398,10 @@ CORE_message_queue_Status _CORE_message_queue_Submit(
|
|||||||
);
|
);
|
||||||
*(unsigned32 *)the_thread->Wait.return_argument_1 = size;
|
*(unsigned32 *)the_thread->Wait.return_argument_1 = size;
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
|
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
|
||||||
(*api_message_queue_mp_support) ( the_thread, id );
|
(*api_message_queue_mp_support) ( the_thread, id );
|
||||||
|
#endif
|
||||||
|
|
||||||
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
|
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -293,6 +293,7 @@ CORE_mutex_Status _CORE_mutex_Surrender(
|
|||||||
|
|
||||||
if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) {
|
if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) {
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( !_Objects_Is_local_id( the_thread->Object.id ) ) {
|
if ( !_Objects_Is_local_id( the_thread->Object.id ) ) {
|
||||||
|
|
||||||
the_mutex->holder = NULL;
|
the_mutex->holder = NULL;
|
||||||
@@ -301,7 +302,9 @@ CORE_mutex_Status _CORE_mutex_Surrender(
|
|||||||
|
|
||||||
( *api_mutex_mp_support)( the_thread, id );
|
( *api_mutex_mp_support)( the_thread, id );
|
||||||
|
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
|
||||||
the_mutex->holder = the_thread;
|
the_mutex->holder = the_thread;
|
||||||
the_mutex->holder_id = the_thread->Object.id;
|
the_mutex->holder_id = the_thread->Object.id;
|
||||||
|
|||||||
@@ -24,7 +24,9 @@
|
|||||||
#include <rtems/score/states.h>
|
#include <rtems/score/states.h>
|
||||||
#include <rtems/score/thread.h>
|
#include <rtems/score/thread.h>
|
||||||
#include <rtems/score/threadq.h>
|
#include <rtems/score/threadq.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/score/mpci.h>
|
#include <rtems/score/mpci.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -16,8 +16,10 @@
|
|||||||
#include <rtems/system.h>
|
#include <rtems/system.h>
|
||||||
#include <rtems/score/cpu.h>
|
#include <rtems/score/cpu.h>
|
||||||
#include <rtems/score/interr.h>
|
#include <rtems/score/interr.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/score/mpci.h>
|
#include <rtems/score/mpci.h>
|
||||||
#include <rtems/score/mppkt.h>
|
#include <rtems/score/mppkt.h>
|
||||||
|
#endif
|
||||||
#include <rtems/score/states.h>
|
#include <rtems/score/states.h>
|
||||||
#include <rtems/score/thread.h>
|
#include <rtems/score/thread.h>
|
||||||
#include <rtems/score/threadq.h>
|
#include <rtems/score/threadq.h>
|
||||||
|
|||||||
@@ -16,7 +16,9 @@
|
|||||||
#include <rtems/system.h>
|
#include <rtems/system.h>
|
||||||
#include <rtems/score/chain.h>
|
#include <rtems/score/chain.h>
|
||||||
#include <rtems/score/object.h>
|
#include <rtems/score/object.h>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/score/objectmp.h>
|
#include <rtems/score/objectmp.h>
|
||||||
|
#endif
|
||||||
#include <rtems/score/thread.h>
|
#include <rtems/score/thread.h>
|
||||||
#include <rtems/score/wkspace.h>
|
#include <rtems/score/wkspace.h>
|
||||||
#include <rtems/score/sysstate.h>
|
#include <rtems/score/sysstate.h>
|
||||||
@@ -51,11 +53,13 @@ void _Objects_Handler_initialization(
|
|||||||
_Objects_Local_node = node;
|
_Objects_Local_node = node;
|
||||||
_Objects_Maximum_nodes = maximum_nodes;
|
_Objects_Maximum_nodes = maximum_nodes;
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Objects_MP_Handler_initialization(
|
_Objects_MP_Handler_initialization(
|
||||||
node,
|
node,
|
||||||
maximum_nodes,
|
maximum_nodes,
|
||||||
maximum_global_objects
|
maximum_global_objects
|
||||||
);
|
);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -378,7 +382,11 @@ Objects_Name_to_id_errors _Objects_Name_to_id(
|
|||||||
if ( _Objects_Is_local_node( node ) || node == OBJECTS_SEARCH_LOCAL_NODE )
|
if ( _Objects_Is_local_node( node ) || node == OBJECTS_SEARCH_LOCAL_NODE )
|
||||||
return OBJECTS_INVALID_NAME;
|
return OBJECTS_INVALID_NAME;
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
return ( _Objects_MP_Global_name_search( information, name, node, id ) );
|
return ( _Objects_MP_Global_name_search( information, name, node, id ) );
|
||||||
|
#else
|
||||||
|
return OBJECTS_INVALID_NAME;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -423,8 +431,12 @@ Objects_Control *_Objects_Get(
|
|||||||
return( NULL );
|
return( NULL );
|
||||||
}
|
}
|
||||||
*location = OBJECTS_ERROR;
|
*location = OBJECTS_ERROR;
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Objects_MP_Is_remote( information, id, location, &the_object );
|
_Objects_MP_Is_remote( information, id, location, &the_object );
|
||||||
return the_object;
|
return the_object;
|
||||||
|
#else
|
||||||
|
return NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,9 @@ void _Thread_Handler_initialization(
|
|||||||
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
|
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
|
||||||
_Chain_Initialize_empty( &_Thread_Ready_chain[ index ] );
|
_Chain_Initialize_empty( &_Thread_Ready_chain[ index ] );
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
_Thread_MP_Handler_initialization( maximum_proxies );
|
_Thread_MP_Handler_initialization( maximum_proxies );
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize this class of objects.
|
* Initialize this class of objects.
|
||||||
|
|||||||
@@ -97,9 +97,11 @@ void _Thread_queue_Enqueue(
|
|||||||
|
|
||||||
the_thread = _Thread_Executing;
|
the_thread = _Thread_Executing;
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( _Thread_MP_Is_receive( the_thread ) && the_thread->receive_packet )
|
if ( _Thread_MP_Is_receive( the_thread ) && the_thread->receive_packet )
|
||||||
the_thread = _Thread_MP_Allocate_proxy( the_thread_queue->state );
|
the_thread = _Thread_MP_Allocate_proxy( the_thread_queue->state );
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
_Thread_Set_state( the_thread, the_thread_queue->state );
|
_Thread_Set_state( the_thread, the_thread_queue->state );
|
||||||
|
|
||||||
if ( timeout ) {
|
if ( timeout ) {
|
||||||
@@ -255,10 +257,12 @@ void _Thread_queue_Flush(
|
|||||||
Thread_Control *the_thread;
|
Thread_Control *the_thread;
|
||||||
|
|
||||||
while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
|
while ( (the_thread = _Thread_queue_Dequeue( the_thread_queue )) ) {
|
||||||
if ( _Objects_Is_local_id( the_thread->Object.id ) )
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
the_thread->Wait.return_code = status;
|
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
|
||||||
else
|
|
||||||
( *remote_extract_callout )( the_thread );
|
( *remote_extract_callout )( the_thread );
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
the_thread->Wait.return_code = status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -423,8 +427,10 @@ void _Thread_queue_Enqueue_fifo (
|
|||||||
|
|
||||||
_Thread_Unblock( the_thread );
|
_Thread_Unblock( the_thread );
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
|
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
|
||||||
_Thread_MP_Free_proxy( the_thread );
|
_Thread_MP_Free_proxy( the_thread );
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -468,8 +474,10 @@ Thread_Control *_Thread_queue_Dequeue_fifo(
|
|||||||
_Thread_Unblock( the_thread );
|
_Thread_Unblock( the_thread );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
|
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
|
||||||
_Thread_MP_Free_proxy( the_thread );
|
_Thread_MP_Free_proxy( the_thread );
|
||||||
|
#endif
|
||||||
|
|
||||||
return the_thread;
|
return the_thread;
|
||||||
}
|
}
|
||||||
@@ -532,8 +540,10 @@ void _Thread_queue_Extract_fifo(
|
|||||||
|
|
||||||
_Thread_Unblock( the_thread );
|
_Thread_Unblock( the_thread );
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
|
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
|
||||||
_Thread_MP_Free_proxy( the_thread );
|
_Thread_MP_Free_proxy( the_thread );
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -753,8 +763,10 @@ synchronize:
|
|||||||
|
|
||||||
_Thread_Unblock( the_thread );
|
_Thread_Unblock( the_thread );
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
|
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
|
||||||
_Thread_MP_Free_proxy( the_thread );
|
_Thread_MP_Free_proxy( the_thread );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -852,8 +864,10 @@ dequeue:
|
|||||||
_Thread_Unblock( the_thread );
|
_Thread_Unblock( the_thread );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
|
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
|
||||||
_Thread_MP_Free_proxy( the_thread );
|
_Thread_MP_Free_proxy( the_thread );
|
||||||
|
#endif
|
||||||
return( the_thread );
|
return( the_thread );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -929,8 +943,10 @@ void _Thread_queue_Extract_priority(
|
|||||||
_Thread_Unblock( the_thread );
|
_Thread_Unblock( the_thread );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
|
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
|
||||||
_Thread_MP_Free_proxy( the_thread );
|
_Thread_MP_Free_proxy( the_thread );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_ISR_Enable( level );
|
_ISR_Enable( level );
|
||||||
|
|||||||
@@ -130,17 +130,22 @@ ${SAPIOBJ}/exinit.o \
|
|||||||
${SAPIOBJ}/io.o \
|
${SAPIOBJ}/io.o \
|
||||||
${SAPIOBJ}/rtemsapi.o \
|
${SAPIOBJ}/rtemsapi.o \
|
||||||
"
|
"
|
||||||
MPLIST="\
|
|
||||||
${RTEMSOBJ}/mp.o ${RTEMSOBJ}/eventmp.o \
|
if [ -r ${RTEMSOBJ}/mp.o ] ; then
|
||||||
${COREOBJ}/mpci.o ${RTEMSOBJ}/msgmp.o ${COREOBJ}/objectmp.o \
|
MPLIST="\
|
||||||
${RTEMSOBJ}/partmp.o ${RTEMSOBJ}/regionmp.o ${RTEMSOBJ}/semmp.o \
|
${RTEMSOBJ}/mp.o ${RTEMSOBJ}/eventmp.o \
|
||||||
${RTEMSOBJ}/signalmp.o ${RTEMSOBJ}/taskmp.o ${COREOBJ}/threadmp.o \
|
${COREOBJ}/mpci.o ${RTEMSOBJ}/msgmp.o ${COREOBJ}/objectmp.o \
|
||||||
"
|
${RTEMSOBJ}/partmp.o ${RTEMSOBJ}/regionmp.o ${RTEMSOBJ}/semmp.o \
|
||||||
|
${RTEMSOBJ}/signalmp.o ${RTEMSOBJ}/taskmp.o ${COREOBJ}/threadmp.o \
|
||||||
|
"
|
||||||
|
|
||||||
|
MPOBJLIST=${OPTOBJ}/no-msg.rel
|
||||||
|
fi
|
||||||
|
|
||||||
OPTMANLIST="\
|
OPTMANLIST="\
|
||||||
${OPTOBJ}/no-dpmem.rel \
|
${OPTOBJ}/no-dpmem.rel \
|
||||||
${OPTOBJ}/no-event.rel \
|
${OPTOBJ}/no-event.rel \
|
||||||
${OPTOBJ}/no-mp.rel \
|
${MPOBJLIST} \
|
||||||
${OPTOBJ}/no-msg.rel \
|
${OPTOBJ}/no-msg.rel \
|
||||||
${OPTOBJ}/no-part.rel \
|
${OPTOBJ}/no-part.rel \
|
||||||
${OPTOBJ}/no-region.rel \
|
${OPTOBJ}/no-region.rel \
|
||||||
|
|||||||
@@ -11,7 +11,11 @@ PROJECT_ROOT = @PROJECT_ROOT@
|
|||||||
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
|
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
|
||||||
include $(RTEMS_ROOT)/make/directory.cfg
|
include $(RTEMS_ROOT)/make/directory.cfg
|
||||||
|
|
||||||
|
# We only build the multiprocessing support if HAS_MP was defined
|
||||||
|
MP_SUPPORT_yes_V = shmsupp
|
||||||
|
MP_SUPPORT = $(MP_SUPPORT_$(HAS_MP)_V)
|
||||||
|
|
||||||
# wrapup is the one that actually builds and installs the library
|
# wrapup is the one that actually builds and installs the library
|
||||||
# from the individual .rel files built in other directories
|
# from the individual .rel files built in other directories
|
||||||
# NOTE: we pick up HPPA clock and timer from libcpu/hppa
|
# NOTE: we pick up HPPA clock and timer from libcpu/hppa
|
||||||
SUB_DIRS=tools include start startup tty shmsupp wrapup
|
SUB_DIRS=tools include start startup tty $(MP_SUPPORT) wrapup
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ PROJECT_ROOT = @PROJECT_ROOT@
|
|||||||
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
|
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
|
||||||
include $(RTEMS_ROOT)/make/directory.cfg
|
include $(RTEMS_ROOT)/make/directory.cfg
|
||||||
|
|
||||||
|
# We only build the multiprocessing support if HAS_MP was defined
|
||||||
|
MP_SUPPORT_yes_V = shmsupp
|
||||||
|
MP_SUPPORT = $(MP_SUPPORT_$(HAS_MP)_V)
|
||||||
|
|
||||||
# wrapup is the one that actually builds and installs the library
|
# wrapup is the one that actually builds and installs the library
|
||||||
# from the individual .rel files built in other directories
|
# from the individual .rel files built in other directories
|
||||||
SUB_DIRS=include start startup clock console shmsupp timer wrapup
|
SUB_DIRS=include start startup clock console $(MP_SUPPORT) timer wrapup
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ PROJECT_ROOT = @PROJECT_ROOT@
|
|||||||
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
|
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
|
||||||
include $(RTEMS_ROOT)/make/directory.cfg
|
include $(RTEMS_ROOT)/make/directory.cfg
|
||||||
|
|
||||||
|
# We only build the multiprocessing support if HAS_MP was defined
|
||||||
|
MP_SUPPORT_yes_V = shmsupp
|
||||||
|
MP_SUPPORT = $(MP_SUPPORT_$(HAS_MP)_V)
|
||||||
|
|
||||||
# wrapup is the one that actually builds and installs the library
|
# wrapup is the one that actually builds and installs the library
|
||||||
# from the individual .rel files built in other directories
|
# from the individual .rel files built in other directories
|
||||||
SUB_DIRS=include startup clock console shmsupp timer wrapup
|
SUB_DIRS=include startup clock console $(MP_SUPPORT) timer wrapup
|
||||||
|
|||||||
@@ -11,6 +11,10 @@ PROJECT_ROOT = @PROJECT_ROOT@
|
|||||||
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
|
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
|
||||||
include $(RTEMS_ROOT)/make/directory.cfg
|
include $(RTEMS_ROOT)/make/directory.cfg
|
||||||
|
|
||||||
|
# We only build the multiprocessing support if HAS_MP was defined
|
||||||
|
MP_SUPPORT_yes_V = shmsupp
|
||||||
|
MP_SUPPORT = $(MP_SUPPORT_$(HAS_MP)_V)
|
||||||
|
|
||||||
# wrapup is the one that actually builds and installs the library
|
# wrapup is the one that actually builds and installs the library
|
||||||
# from the individual .rel files built in other directories
|
# from the individual .rel files built in other directories
|
||||||
SUB_DIRS=include startup clock console shmsupp timer wrapup
|
SUB_DIRS=include startup clock console $(MP_SUPPORT) timer wrapup
|
||||||
|
|||||||
@@ -11,7 +11,11 @@ PROJECT_ROOT = @PROJECT_ROOT@
|
|||||||
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
|
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
|
||||||
include $(RTEMS_ROOT)/make/directory.cfg
|
include $(RTEMS_ROOT)/make/directory.cfg
|
||||||
|
|
||||||
|
# We only build the multiprocessing support if HAS_MP was defined
|
||||||
|
MP_SUPPORT_yes_V = shmsupp
|
||||||
|
MP_SUPPORT = $(MP_SUPPORT_$(HAS_MP)_V)
|
||||||
|
|
||||||
# wrapup is the one that actually builds and installs the library
|
# wrapup is the one that actually builds and installs the library
|
||||||
# from the individual .rel files built in other directories
|
# from the individual .rel files built in other directories
|
||||||
SUB_DIRS=include startup clock console timer shmsupp wrapup
|
SUB_DIRS=include startup clock console timer $(MP_SUPPORT) wrapup
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ SRCS=README
|
|||||||
|
|
||||||
all: $(SRCS)
|
all: $(SRCS)
|
||||||
|
|
||||||
|
# We only build the multiprocessing support if HAS_MP was defined
|
||||||
|
MP_SUPPORT_yes_V = shmsupp
|
||||||
|
MP_SUPPORT = $(MP_SUPPORT_$(HAS_MP)_V)
|
||||||
|
|
||||||
# wrapup is the one that actually builds and installs the library
|
# wrapup is the one that actually builds and installs the library
|
||||||
# from the individual .rel files built in other directories
|
# from the individual .rel files built in other directories
|
||||||
SUB_DIRS=include startup clock console shmsupp timer wrapup
|
SUB_DIRS=include startup clock console $(MP_SUPPORT) timer wrapup
|
||||||
|
|||||||
@@ -13,14 +13,12 @@ include $(RTEMS_ROOT)/make/directory.cfg
|
|||||||
|
|
||||||
SRCS=README
|
SRCS=README
|
||||||
|
|
||||||
# MP_PARTS are the pieces of the BSP required in a MP environment
|
# We only build the multiprocessing support if HAS_MP was defined
|
||||||
# We only build them if HAS_MP was defined
|
MP_SUPPORT_yes_V = shmsupp
|
||||||
|
MP_SUPPORT = $(MP_SUPPORT_$(HAS_MP)_V)
|
||||||
MP_PARTS_yes_V = shmsupp
|
|
||||||
MP_PARTS = $(MP_PARTS_$(HAS_MP)_V)
|
|
||||||
|
|
||||||
all: $(SRCS)
|
all: $(SRCS)
|
||||||
|
|
||||||
# wrapup is the one that actually builds and installs the library
|
# wrapup is the one that actually builds and installs the library
|
||||||
# from the individual .rel files built in other directories
|
# from the individual .rel files built in other directories
|
||||||
SUB_DIRS=include startup clock console timer $(MP_PARTS) wrapup tools
|
SUB_DIRS=include startup clock console timer $(MP_SUPPORT) wrapup tools
|
||||||
|
|||||||
@@ -9,10 +9,15 @@ RTEMS_ROOT = @top_srcdir@
|
|||||||
PROJECT_ROOT = @PROJECT_ROOT@
|
PROJECT_ROOT = @PROJECT_ROOT@
|
||||||
|
|
||||||
LIB=${ARCH}/libmonitor-tmp.a
|
LIB=${ARCH}/libmonitor-tmp.a
|
||||||
|
|
||||||
# C source names, if any, go here -- minus the .c
|
# C source names, if any, go here -- minus the .c
|
||||||
|
# We only build multiprocessing related files if HAS_MP was defined
|
||||||
|
MP_PIECES_yes_V = mon-mpci
|
||||||
|
MP_PIECES = $(MP_PIECES_$(HAS_MP)_V)
|
||||||
|
|
||||||
C_PIECES=mon-command mon-symbols mon-prmisc mon-monitor mon-object mon-server \
|
C_PIECES=mon-command mon-symbols mon-prmisc mon-monitor mon-object mon-server \
|
||||||
mon-task mon-queue mon-driver mon-dname mon-itask \
|
mon-task mon-queue mon-driver mon-dname mon-itask \
|
||||||
mon-extension mon-manager mon-config mon-mpci
|
mon-extension mon-manager mon-config $(MP_PIECES)
|
||||||
C_FILES=$(C_PIECES:%=%.c)
|
C_FILES=$(C_PIECES:%=%.c)
|
||||||
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
|
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
|
||||||
|
|
||||||
|
|||||||
@@ -42,11 +42,19 @@ rtems_monitor_object_info_t rtems_monitor_object_info[] =
|
|||||||
},
|
},
|
||||||
{ RTEMS_MONITOR_OBJECT_MPCI,
|
{ RTEMS_MONITOR_OBJECT_MPCI,
|
||||||
(void *) 0,
|
(void *) 0,
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
sizeof(rtems_monitor_mpci_t),
|
sizeof(rtems_monitor_mpci_t),
|
||||||
(rtems_monitor_object_next_fn) rtems_monitor_mpci_next,
|
(rtems_monitor_object_next_fn) rtems_monitor_mpci_next,
|
||||||
(rtems_monitor_object_canonical_fn) rtems_monitor_mpci_canonical,
|
(rtems_monitor_object_canonical_fn) rtems_monitor_mpci_canonical,
|
||||||
(rtems_monitor_object_dump_header_fn) rtems_monitor_mpci_dump_header,
|
(rtems_monitor_object_dump_header_fn) rtems_monitor_mpci_dump_header,
|
||||||
(rtems_monitor_object_dump_fn) rtems_monitor_mpci_dump,
|
(rtems_monitor_object_dump_fn) rtems_monitor_mpci_dump,
|
||||||
|
#else
|
||||||
|
0,
|
||||||
|
(rtems_monitor_object_next_fn) 0,
|
||||||
|
(rtems_monitor_object_canonical_fn) 0,
|
||||||
|
(rtems_monitor_object_dump_header_fn) 0,
|
||||||
|
(rtems_monitor_object_dump_fn) 0,
|
||||||
|
#endif
|
||||||
},
|
},
|
||||||
{ RTEMS_MONITOR_OBJECT_INIT_TASK,
|
{ RTEMS_MONITOR_OBJECT_INIT_TASK,
|
||||||
(void *) 0,
|
(void *) 0,
|
||||||
|
|||||||
@@ -200,6 +200,7 @@ typedef struct {
|
|||||||
* MPCI config
|
* MPCI config
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned32 node; /* local node number */
|
unsigned32 node; /* local node number */
|
||||||
unsigned32 maximum_nodes; /* maximum # nodes in system */
|
unsigned32 maximum_nodes; /* maximum # nodes in system */
|
||||||
@@ -214,6 +215,7 @@ typedef struct {
|
|||||||
rtems_monitor_symbol_t send_packet;
|
rtems_monitor_symbol_t send_packet;
|
||||||
rtems_monitor_symbol_t receive_packet;
|
rtems_monitor_symbol_t receive_packet;
|
||||||
} rtems_monitor_mpci_t;
|
} rtems_monitor_mpci_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The generic canonical information union
|
* The generic canonical information union
|
||||||
@@ -227,7 +229,9 @@ typedef union {
|
|||||||
rtems_monitor_driver_t driver;
|
rtems_monitor_driver_t driver;
|
||||||
rtems_monitor_dname_t dname;
|
rtems_monitor_dname_t dname;
|
||||||
rtems_monitor_config_t config;
|
rtems_monitor_config_t config;
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
rtems_monitor_mpci_t mpci;
|
rtems_monitor_mpci_t mpci;
|
||||||
|
#endif
|
||||||
rtems_monitor_init_task_t itask;
|
rtems_monitor_init_task_t itask;
|
||||||
} rtems_monitor_union_t;
|
} rtems_monitor_union_t;
|
||||||
|
|
||||||
@@ -370,10 +374,12 @@ void rtems_monitor_config_dump_header(boolean);
|
|||||||
void rtems_monitor_config_dump(rtems_monitor_config_t *, boolean verbose);
|
void rtems_monitor_config_dump(rtems_monitor_config_t *, boolean verbose);
|
||||||
|
|
||||||
/* mpci.c */
|
/* mpci.c */
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
void rtems_monitor_mpci_canonical(rtems_monitor_mpci_t *, void *);
|
void rtems_monitor_mpci_canonical(rtems_monitor_mpci_t *, void *);
|
||||||
void *rtems_monitor_mpci_next(void *, rtems_monitor_mpci_t *, rtems_id *);
|
void *rtems_monitor_mpci_next(void *, rtems_monitor_mpci_t *, rtems_id *);
|
||||||
void rtems_monitor_mpci_dump_header(boolean);
|
void rtems_monitor_mpci_dump_header(boolean);
|
||||||
void rtems_monitor_mpci_dump(rtems_monitor_mpci_t *, boolean verbose);
|
void rtems_monitor_mpci_dump(rtems_monitor_mpci_t *, boolean verbose);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* itask.c */
|
/* itask.c */
|
||||||
void rtems_monitor_init_task_canonical(rtems_monitor_init_task_t *, void *);
|
void rtems_monitor_init_task_canonical(rtems_monitor_init_task_t *, void *);
|
||||||
|
|||||||
@@ -9,10 +9,15 @@ RTEMS_ROOT = @top_srcdir@
|
|||||||
PROJECT_ROOT = @PROJECT_ROOT@
|
PROJECT_ROOT = @PROJECT_ROOT@
|
||||||
|
|
||||||
LIB=${ARCH}/libmonitor-tmp.a
|
LIB=${ARCH}/libmonitor-tmp.a
|
||||||
|
|
||||||
# C source names, if any, go here -- minus the .c
|
# C source names, if any, go here -- minus the .c
|
||||||
|
# We only build multiprocessing related files if HAS_MP was defined
|
||||||
|
MP_PIECES_yes_V = mon-mpci
|
||||||
|
MP_PIECES = $(MP_PIECES_$(HAS_MP)_V)
|
||||||
|
|
||||||
C_PIECES=mon-command mon-symbols mon-prmisc mon-monitor mon-object mon-server \
|
C_PIECES=mon-command mon-symbols mon-prmisc mon-monitor mon-object mon-server \
|
||||||
mon-task mon-queue mon-driver mon-dname mon-itask \
|
mon-task mon-queue mon-driver mon-dname mon-itask \
|
||||||
mon-extension mon-manager mon-config mon-mpci
|
mon-extension mon-manager mon-config $(MP_PIECES)
|
||||||
C_FILES=$(C_PIECES:%=%.c)
|
C_FILES=$(C_PIECES:%=%.c)
|
||||||
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
|
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
|
||||||
|
|
||||||
|
|||||||
@@ -42,11 +42,19 @@ rtems_monitor_object_info_t rtems_monitor_object_info[] =
|
|||||||
},
|
},
|
||||||
{ RTEMS_MONITOR_OBJECT_MPCI,
|
{ RTEMS_MONITOR_OBJECT_MPCI,
|
||||||
(void *) 0,
|
(void *) 0,
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
sizeof(rtems_monitor_mpci_t),
|
sizeof(rtems_monitor_mpci_t),
|
||||||
(rtems_monitor_object_next_fn) rtems_monitor_mpci_next,
|
(rtems_monitor_object_next_fn) rtems_monitor_mpci_next,
|
||||||
(rtems_monitor_object_canonical_fn) rtems_monitor_mpci_canonical,
|
(rtems_monitor_object_canonical_fn) rtems_monitor_mpci_canonical,
|
||||||
(rtems_monitor_object_dump_header_fn) rtems_monitor_mpci_dump_header,
|
(rtems_monitor_object_dump_header_fn) rtems_monitor_mpci_dump_header,
|
||||||
(rtems_monitor_object_dump_fn) rtems_monitor_mpci_dump,
|
(rtems_monitor_object_dump_fn) rtems_monitor_mpci_dump,
|
||||||
|
#else
|
||||||
|
0,
|
||||||
|
(rtems_monitor_object_next_fn) 0,
|
||||||
|
(rtems_monitor_object_canonical_fn) 0,
|
||||||
|
(rtems_monitor_object_dump_header_fn) 0,
|
||||||
|
(rtems_monitor_object_dump_fn) 0,
|
||||||
|
#endif
|
||||||
},
|
},
|
||||||
{ RTEMS_MONITOR_OBJECT_INIT_TASK,
|
{ RTEMS_MONITOR_OBJECT_INIT_TASK,
|
||||||
(void *) 0,
|
(void *) 0,
|
||||||
|
|||||||
@@ -200,6 +200,7 @@ typedef struct {
|
|||||||
* MPCI config
|
* MPCI config
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned32 node; /* local node number */
|
unsigned32 node; /* local node number */
|
||||||
unsigned32 maximum_nodes; /* maximum # nodes in system */
|
unsigned32 maximum_nodes; /* maximum # nodes in system */
|
||||||
@@ -214,6 +215,7 @@ typedef struct {
|
|||||||
rtems_monitor_symbol_t send_packet;
|
rtems_monitor_symbol_t send_packet;
|
||||||
rtems_monitor_symbol_t receive_packet;
|
rtems_monitor_symbol_t receive_packet;
|
||||||
} rtems_monitor_mpci_t;
|
} rtems_monitor_mpci_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The generic canonical information union
|
* The generic canonical information union
|
||||||
@@ -227,7 +229,9 @@ typedef union {
|
|||||||
rtems_monitor_driver_t driver;
|
rtems_monitor_driver_t driver;
|
||||||
rtems_monitor_dname_t dname;
|
rtems_monitor_dname_t dname;
|
||||||
rtems_monitor_config_t config;
|
rtems_monitor_config_t config;
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
rtems_monitor_mpci_t mpci;
|
rtems_monitor_mpci_t mpci;
|
||||||
|
#endif
|
||||||
rtems_monitor_init_task_t itask;
|
rtems_monitor_init_task_t itask;
|
||||||
} rtems_monitor_union_t;
|
} rtems_monitor_union_t;
|
||||||
|
|
||||||
@@ -370,10 +374,12 @@ void rtems_monitor_config_dump_header(boolean);
|
|||||||
void rtems_monitor_config_dump(rtems_monitor_config_t *, boolean verbose);
|
void rtems_monitor_config_dump(rtems_monitor_config_t *, boolean verbose);
|
||||||
|
|
||||||
/* mpci.c */
|
/* mpci.c */
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
void rtems_monitor_mpci_canonical(rtems_monitor_mpci_t *, void *);
|
void rtems_monitor_mpci_canonical(rtems_monitor_mpci_t *, void *);
|
||||||
void *rtems_monitor_mpci_next(void *, rtems_monitor_mpci_t *, rtems_id *);
|
void *rtems_monitor_mpci_next(void *, rtems_monitor_mpci_t *, rtems_id *);
|
||||||
void rtems_monitor_mpci_dump_header(boolean);
|
void rtems_monitor_mpci_dump_header(boolean);
|
||||||
void rtems_monitor_mpci_dump(rtems_monitor_mpci_t *, boolean verbose);
|
void rtems_monitor_mpci_dump(rtems_monitor_mpci_t *, boolean verbose);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* itask.c */
|
/* itask.c */
|
||||||
void rtems_monitor_init_task_canonical(rtems_monitor_init_task_t *, void *);
|
void rtems_monitor_init_task_canonical(rtems_monitor_init_task_t *, void *);
|
||||||
|
|||||||
@@ -14,6 +14,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtems/system.h>
|
#include <rtems/system.h>
|
||||||
|
#if !defined(RTEMS_MULTIPROCESSING)
|
||||||
|
char rtems_no_multiprocessing;
|
||||||
|
#else
|
||||||
#include <rtems/rtems/status.h>
|
#include <rtems/rtems/status.h>
|
||||||
#include <rtems/rtems/mp.h>
|
#include <rtems/rtems/mp.h>
|
||||||
#include <rtems/score/cpu.h>
|
#include <rtems/score/cpu.h>
|
||||||
@@ -197,5 +200,5 @@ MPCI_Internal_packet *_MPCI_Internal_packets_Get_packet ( void )
|
|||||||
);
|
);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/* end of file */
|
/* end of file */
|
||||||
|
|||||||
@@ -82,13 +82,17 @@
|
|||||||
#define PER_FPTASK (long) (CONTEXT_FP_SIZE)
|
#define PER_FPTASK (long) (CONTEXT_FP_SIZE)
|
||||||
#define PER_GOBTBL (long) (sizeof (Chain_Control)*4)
|
#define PER_GOBTBL (long) (sizeof (Chain_Control)*4)
|
||||||
#define PER_NODE (long) PER_GOBTBL
|
#define PER_NODE (long) PER_GOBTBL
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#define PER_GOBJECT (long) (sizeof (Objects_MP_Control))
|
#define PER_GOBJECT (long) (sizeof (Objects_MP_Control))
|
||||||
|
#else
|
||||||
|
#define PER_GOBJECT (long) 0
|
||||||
|
#endif
|
||||||
#define PER_PROXY (long) (sizeof (Thread_Proxy_control))
|
#define PER_PROXY (long) (sizeof (Thread_Proxy_control))
|
||||||
|
|
||||||
#if (CPU_ALL_TASKS_ARE_FP == TRUE)
|
#if !defined(RTEMS_MULTIPROCESSING) || (CPU_ALL_TASKS_ARE_FP != TRUE)
|
||||||
#define MPCI_RECEIVE_SERVER_FP (long) (sizeof( Context_Control_fp ))
|
|
||||||
#else
|
|
||||||
#define MPCI_RECEIVE_SERVER_FP (long) 0
|
#define MPCI_RECEIVE_SERVER_FP (long) 0
|
||||||
|
#else
|
||||||
|
#define MPCI_RECEIVE_SERVER_FP (long) (sizeof( Context_Control_fp ))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (CPU_IDLE_TASK_IS_FP == TRUE)
|
#if (CPU_IDLE_TASK_IS_FP == TRUE)
|
||||||
@@ -97,6 +101,10 @@
|
|||||||
#define SYSTEM_IDLE_FP (long) 0
|
#define SYSTEM_IDLE_FP (long) 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
|
#define MPCI_RECEIVE_SERVER_STACK_SIZE 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SYSTEM_TASKS \
|
#define SYSTEM_TASKS \
|
||||||
(STACK_MINIMUM_SIZE + \
|
(STACK_MINIMUM_SIZE + \
|
||||||
MPCI_RECEIVE_SERVER_STACK_SIZE + \
|
MPCI_RECEIVE_SERVER_STACK_SIZE + \
|
||||||
@@ -215,7 +223,9 @@ uninitialized =
|
|||||||
|
|
||||||
/*event.h*/ (sizeof _Event_Sync_state) +
|
/*event.h*/ (sizeof _Event_Sync_state) +
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
/*eventmp.h*/ 0 +
|
/*eventmp.h*/ 0 +
|
||||||
|
#endif
|
||||||
|
|
||||||
/*eventset.h*/ 0 +
|
/*eventset.h*/ 0 +
|
||||||
|
|
||||||
@@ -244,32 +254,46 @@ uninitialized =
|
|||||||
|
|
||||||
/*modes.h*/ 0 +
|
/*modes.h*/ 0 +
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
/*mp.h*/ 0 +
|
/*mp.h*/ 0 +
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
/*mpci.h*/ (sizeof _MPCI_Remote_blocked_threads) +
|
/*mpci.h*/ (sizeof _MPCI_Remote_blocked_threads) +
|
||||||
(sizeof _MPCI_Semaphore) +
|
(sizeof _MPCI_Semaphore) +
|
||||||
(sizeof _MPCI_table) +
|
(sizeof _MPCI_table) +
|
||||||
(sizeof _MPCI_Receive_server_tcb) +
|
(sizeof _MPCI_Receive_server_tcb) +
|
||||||
(sizeof _MPCI_Packet_processors) +
|
(sizeof _MPCI_Packet_processors) +
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
/*mppkt.h*/ 0 +
|
/*mppkt.h*/ 0 +
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
/*mptables.h*/ 0 +
|
/*mptables.h*/ 0 +
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
/*msgmp.h*/ 0 +
|
/*msgmp.h*/ 0 +
|
||||||
|
#endif
|
||||||
|
|
||||||
/*object.h*/ (sizeof _Objects_Local_node) +
|
/*object.h*/ (sizeof _Objects_Local_node) +
|
||||||
(sizeof _Objects_Maximum_nodes) +
|
(sizeof _Objects_Maximum_nodes) +
|
||||||
(sizeof _Objects_Information_table) +
|
(sizeof _Objects_Information_table) +
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
/*objectmp.h*/ (sizeof _Objects_MP_Maximum_global_objects) +
|
/*objectmp.h*/ (sizeof _Objects_MP_Maximum_global_objects) +
|
||||||
(sizeof _Objects_MP_Inactive_global_objects) +
|
(sizeof _Objects_MP_Inactive_global_objects) +
|
||||||
|
#endif
|
||||||
|
|
||||||
/*options.h*/ 0 +
|
/*options.h*/ 0 +
|
||||||
|
|
||||||
/*part.h*/ (sizeof _Partition_Information) +
|
/*part.h*/ (sizeof _Partition_Information) +
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
/*partmp.h*/ 0 +
|
/*partmp.h*/ 0 +
|
||||||
|
#endif
|
||||||
|
|
||||||
/*priority.h*/ (sizeof _Priority_Major_bit_map) +
|
/*priority.h*/ (sizeof _Priority_Major_bit_map) +
|
||||||
(sizeof _Priority_Bit_map) +
|
(sizeof _Priority_Bit_map) +
|
||||||
@@ -278,13 +302,17 @@ uninitialized =
|
|||||||
|
|
||||||
/*region.h*/ (sizeof _Region_Information) +
|
/*region.h*/ (sizeof _Region_Information) +
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
/*regionmp.h*/ 0 +
|
/*regionmp.h*/ 0 +
|
||||||
|
#endif
|
||||||
|
|
||||||
/*rtems.h*/ /* Not applicable */
|
/*rtems.h*/ /* Not applicable */
|
||||||
|
|
||||||
/*sem.h*/ (sizeof _Semaphore_Information) +
|
/*sem.h*/ (sizeof _Semaphore_Information) +
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
/*semmp.h*/ 0 +
|
/*semmp.h*/ 0 +
|
||||||
|
#endif
|
||||||
|
|
||||||
/*signal.h*/ 0 +
|
/*signal.h*/ 0 +
|
||||||
|
|
||||||
@@ -301,7 +329,9 @@ uninitialized =
|
|||||||
|
|
||||||
/*system.h*/ (sizeof _CPU_Table) +
|
/*system.h*/ (sizeof _CPU_Table) +
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
/*taskmp.h*/ 0 +
|
/*taskmp.h*/ 0 +
|
||||||
|
#endif
|
||||||
|
|
||||||
/*tasks.h*/ (sizeof _RTEMS_tasks_Information) +
|
/*tasks.h*/ (sizeof _RTEMS_tasks_Information) +
|
||||||
(sizeof _RTEMS_tasks_User_initialization_tasks) +
|
(sizeof _RTEMS_tasks_User_initialization_tasks) +
|
||||||
@@ -319,9 +349,11 @@ uninitialized =
|
|||||||
(sizeof _Thread_Internal_information) +
|
(sizeof _Thread_Internal_information) +
|
||||||
(sizeof _Thread_Idle) +
|
(sizeof _Thread_Idle) +
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
/*threadmp.h*/ (sizeof _Thread_MP_Receive) +
|
/*threadmp.h*/ (sizeof _Thread_MP_Receive) +
|
||||||
(sizeof _Thread_MP_Active_proxies) +
|
(sizeof _Thread_MP_Active_proxies) +
|
||||||
(sizeof _Thread_MP_Inactive_proxies) +
|
(sizeof _Thread_MP_Inactive_proxies) +
|
||||||
|
#endif
|
||||||
|
|
||||||
/*threadq.h*/ (sizeof _Thread_queue_Extract_table) +
|
/*threadq.h*/ (sizeof _Thread_queue_Extract_table) +
|
||||||
|
|
||||||
|
|||||||
12
configure.in
12
configure.in
@@ -19,6 +19,14 @@ AC_ARG_ENABLE(gmake-print-directory, \
|
|||||||
*) AC_MSG_ERROR(bad value ${enableval} for gmake-print-directory option) ;;
|
*) AC_MSG_ERROR(bad value ${enableval} for gmake-print-directory option) ;;
|
||||||
esac],[RTEMS_USE_OWN_PDIR=yes])
|
esac],[RTEMS_USE_OWN_PDIR=yes])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(multiprocessing, \
|
||||||
|
[ --enable-multiprocessing enable multiprocessing interface], \
|
||||||
|
[case "${enableval}" in
|
||||||
|
yes) RTEMS_HAS_MULTIPROCESSING=yes ;;
|
||||||
|
no) RTEMS_HAS_MULTIPROCESSING=no ;;
|
||||||
|
*) AC_MSG_ERROR(bad value ${enableval} for enable-multiprocessing option) ;;
|
||||||
|
esac],[RTEMS_HAS_MULTIPROCESSING=no])
|
||||||
|
|
||||||
AC_ARG_ENABLE(posix, \
|
AC_ARG_ENABLE(posix, \
|
||||||
[ --enable-posix enable posix interface], \
|
[ --enable-posix enable posix interface], \
|
||||||
[case "${enableval}" in
|
[case "${enableval}" in
|
||||||
@@ -426,7 +434,9 @@ if test "$tests_enabled" = "yes"; then
|
|||||||
RTEMS_CHECK_MAKEFILE(c/src/tests/libtests)
|
RTEMS_CHECK_MAKEFILE(c/src/tests/libtests)
|
||||||
RTEMS_CHECK_MAKEFILE(c/src/tests/sptests)
|
RTEMS_CHECK_MAKEFILE(c/src/tests/sptests)
|
||||||
RTEMS_CHECK_MAKEFILE(c/src/tests/tmtests)
|
RTEMS_CHECK_MAKEFILE(c/src/tests/tmtests)
|
||||||
RTEMS_CHECK_MAKEFILE(c/src/tests/mptests)
|
if test "$RTEMS_HAS_MULTIPROCESSING" = "yes"; then
|
||||||
|
RTEMS_CHECK_MAKEFILE(c/src/tests/mptests)
|
||||||
|
fi
|
||||||
if test "$RTEMS_HAS_POSIX_API" = "yes"; then
|
if test "$RTEMS_HAS_POSIX_API" = "yes"; then
|
||||||
RTEMS_CHECK_MAKEFILE(c/src/tests/psxtests)
|
RTEMS_CHECK_MAKEFILE(c/src/tests/psxtests)
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -42,11 +42,19 @@ rtems_monitor_object_info_t rtems_monitor_object_info[] =
|
|||||||
},
|
},
|
||||||
{ RTEMS_MONITOR_OBJECT_MPCI,
|
{ RTEMS_MONITOR_OBJECT_MPCI,
|
||||||
(void *) 0,
|
(void *) 0,
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
sizeof(rtems_monitor_mpci_t),
|
sizeof(rtems_monitor_mpci_t),
|
||||||
(rtems_monitor_object_next_fn) rtems_monitor_mpci_next,
|
(rtems_monitor_object_next_fn) rtems_monitor_mpci_next,
|
||||||
(rtems_monitor_object_canonical_fn) rtems_monitor_mpci_canonical,
|
(rtems_monitor_object_canonical_fn) rtems_monitor_mpci_canonical,
|
||||||
(rtems_monitor_object_dump_header_fn) rtems_monitor_mpci_dump_header,
|
(rtems_monitor_object_dump_header_fn) rtems_monitor_mpci_dump_header,
|
||||||
(rtems_monitor_object_dump_fn) rtems_monitor_mpci_dump,
|
(rtems_monitor_object_dump_fn) rtems_monitor_mpci_dump,
|
||||||
|
#else
|
||||||
|
0,
|
||||||
|
(rtems_monitor_object_next_fn) 0,
|
||||||
|
(rtems_monitor_object_canonical_fn) 0,
|
||||||
|
(rtems_monitor_object_dump_header_fn) 0,
|
||||||
|
(rtems_monitor_object_dump_fn) 0,
|
||||||
|
#endif
|
||||||
},
|
},
|
||||||
{ RTEMS_MONITOR_OBJECT_INIT_TASK,
|
{ RTEMS_MONITOR_OBJECT_INIT_TASK,
|
||||||
(void *) 0,
|
(void *) 0,
|
||||||
|
|||||||
@@ -200,6 +200,7 @@ typedef struct {
|
|||||||
* MPCI config
|
* MPCI config
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned32 node; /* local node number */
|
unsigned32 node; /* local node number */
|
||||||
unsigned32 maximum_nodes; /* maximum # nodes in system */
|
unsigned32 maximum_nodes; /* maximum # nodes in system */
|
||||||
@@ -214,6 +215,7 @@ typedef struct {
|
|||||||
rtems_monitor_symbol_t send_packet;
|
rtems_monitor_symbol_t send_packet;
|
||||||
rtems_monitor_symbol_t receive_packet;
|
rtems_monitor_symbol_t receive_packet;
|
||||||
} rtems_monitor_mpci_t;
|
} rtems_monitor_mpci_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The generic canonical information union
|
* The generic canonical information union
|
||||||
@@ -227,7 +229,9 @@ typedef union {
|
|||||||
rtems_monitor_driver_t driver;
|
rtems_monitor_driver_t driver;
|
||||||
rtems_monitor_dname_t dname;
|
rtems_monitor_dname_t dname;
|
||||||
rtems_monitor_config_t config;
|
rtems_monitor_config_t config;
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
rtems_monitor_mpci_t mpci;
|
rtems_monitor_mpci_t mpci;
|
||||||
|
#endif
|
||||||
rtems_monitor_init_task_t itask;
|
rtems_monitor_init_task_t itask;
|
||||||
} rtems_monitor_union_t;
|
} rtems_monitor_union_t;
|
||||||
|
|
||||||
@@ -370,10 +374,12 @@ void rtems_monitor_config_dump_header(boolean);
|
|||||||
void rtems_monitor_config_dump(rtems_monitor_config_t *, boolean verbose);
|
void rtems_monitor_config_dump(rtems_monitor_config_t *, boolean verbose);
|
||||||
|
|
||||||
/* mpci.c */
|
/* mpci.c */
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
void rtems_monitor_mpci_canonical(rtems_monitor_mpci_t *, void *);
|
void rtems_monitor_mpci_canonical(rtems_monitor_mpci_t *, void *);
|
||||||
void *rtems_monitor_mpci_next(void *, rtems_monitor_mpci_t *, rtems_id *);
|
void *rtems_monitor_mpci_next(void *, rtems_monitor_mpci_t *, rtems_id *);
|
||||||
void rtems_monitor_mpci_dump_header(boolean);
|
void rtems_monitor_mpci_dump_header(boolean);
|
||||||
void rtems_monitor_mpci_dump(rtems_monitor_mpci_t *, boolean verbose);
|
void rtems_monitor_mpci_dump(rtems_monitor_mpci_t *, boolean verbose);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* itask.c */
|
/* itask.c */
|
||||||
void rtems_monitor_init_task_canonical(rtems_monitor_init_task_t *, void *);
|
void rtems_monitor_init_task_canonical(rtems_monitor_init_task_t *, void *);
|
||||||
|
|||||||
@@ -119,7 +119,9 @@ RTEMS_INLINE_ROUTINE boolean _POSIX_Condition_variables_Is_null (
|
|||||||
);
|
);
|
||||||
|
|
||||||
#include <rtems/posix/cond.inl>
|
#include <rtems/posix/cond.inl>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/posix/condmp.h>
|
#include <rtems/posix/condmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,7 +175,9 @@ RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Message_queue_Priority_to_core(
|
|||||||
);
|
);
|
||||||
|
|
||||||
#include <rtems/posix/mqueue.inl>
|
#include <rtems/posix/mqueue.inl>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/posix/mqueuemp.h>
|
#include <rtems/posix/mqueuemp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,9 @@ RTEMS_INLINE_ROUTINE boolean _POSIX_Mutex_Is_null (
|
|||||||
);
|
);
|
||||||
|
|
||||||
#include <rtems/posix/mutex.inl>
|
#include <rtems/posix/mutex.inl>
|
||||||
|
#if defined(RTEMS_MULTIPROCESSING)
|
||||||
#include <rtems/posix/mutexmp.h>
|
#include <rtems/posix/mutexmp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user