diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-09 22:07:23 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-09 22:07:23 +0000 |
commit | 352c9b2035e32e56f10f261d94955d97f4ab0f1c (patch) | |
tree | f433e95ae0ab8d8854ea19b7f4bfab3ffb431726 /c/src/exec/score | |
parent | Fixed warning where initialized default POSIX API structure did (diff) | |
download | rtems-352c9b2035e32e56f10f261d94955d97f4ab0f1c.tar.bz2 |
This patch adds the basic framework for the ITRON 3.0 API implementation
for RTEMS.
Diffstat (limited to 'c/src/exec/score')
-rw-r--r-- | c/src/exec/score/cpu/configure.in | 3 | ||||
-rw-r--r-- | c/src/exec/score/include/rtems/score/Makefile.in | 4 | ||||
-rw-r--r-- | c/src/exec/score/include/rtems/score/interr.h | 3 | ||||
-rw-r--r-- | c/src/exec/score/include/rtems/score/object.h | 64 | ||||
-rw-r--r-- | c/src/exec/score/include/rtems/score/thread.h | 5 | ||||
-rw-r--r-- | c/src/exec/score/include/rtems/system.h | 8 |
6 files changed, 64 insertions, 23 deletions
diff --git a/c/src/exec/score/cpu/configure.in b/c/src/exec/score/cpu/configure.in index 5602c780eb..dc468089ae 100644 --- a/c/src/exec/score/cpu/configure.in +++ b/c/src/exec/score/cpu/configure.in @@ -13,6 +13,7 @@ RTEMS_CANONICAL_TARGET_CPU AM_MAINTAINER_MODE RTEMS_ENABLE_MULTIPROCESSING RTEMS_ENABLE_POSIX +RTEMS_ENABLE_ITRON RTEMS_ENABLE_INLINES RTEMS_ENABLE_LIBCDIR @@ -35,6 +36,7 @@ RTEMS_CHECK_NEWLIB RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP) RTEMS_CHECK_MULTIPROCESSING(RTEMS_BSP) RTEMS_CHECK_POSIX_API(RTEMS_BSP) +RTEMS_CHECK_ITRON_API(RTEMS_BSP) RTEMS_CHECK_SYSV_UNIX @@ -42,6 +44,7 @@ RTEMS_CHECK_SYSV_UNIX RTEMS_CHECK_MAKEFILE($RTEMS_CPU) AM_CONDITIONAL(HAS_POSIX,test "$HAS_POSIX_API" = "yes") +AM_CONDITIONAL(HAS_ITRON,test "$HAS_ITRON_API" = "yes") # Try to explicitly list a Makefile here AC_OUTPUT( diff --git a/c/src/exec/score/include/rtems/score/Makefile.in b/c/src/exec/score/include/rtems/score/Makefile.in index d0c6b21300..7dc33b70a7 100644 --- a/c/src/exec/score/include/rtems/score/Makefile.in +++ b/c/src/exec/score/include/rtems/score/Makefile.in @@ -93,6 +93,10 @@ $(TARGOPTS): @if test "$(HAS_POSIX_API)" = "yes"; then \ echo "#define RTEMS_POSIX_API 1" >>$@; \ fi + echo "SHOULD BE HAS_ITRON_API not RTEMS_HAS_ITRON_API XXX " + @if test "$(RTEMS_HAS_ITRON_API)" = "yes"; then \ + echo "#define RTEMS_ITRON_API 1" >>$@; \ + fi @if test "$(RTEMS_USE_NEWLIB)" = "yes"; then \ echo "#define RTEMS_NEWLIB 1" >>$@; \ echo "#define MALLOC_PROVIDED 1" >>$@; \ diff --git a/c/src/exec/score/include/rtems/score/interr.h b/c/src/exec/score/include/rtems/score/interr.h index e999ceff7a..f3fba47f66 100644 --- a/c/src/exec/score/include/rtems/score/interr.h +++ b/c/src/exec/score/include/rtems/score/interr.h @@ -30,7 +30,8 @@ extern "C" { typedef enum { INTERNAL_ERROR_CORE, INTERNAL_ERROR_RTEMS_API, - INTERNAL_ERROR_POSIX_API + INTERNAL_ERROR_POSIX_API, + INTERNAL_ERROR_ITRON_API } Internal_errors_Source; /* diff --git a/c/src/exec/score/include/rtems/score/object.h b/c/src/exec/score/include/rtems/score/object.h index 7c72719679..9f4a6a929d 100644 --- a/c/src/exec/score/include/rtems/score/object.h +++ b/c/src/exec/score/include/rtems/score/object.h @@ -86,30 +86,38 @@ typedef unsigned32 Objects_Id; */ typedef enum { - OBJECTS_NO_CLASS = 0, - OBJECTS_INTERNAL_THREADS = 1, - OBJECTS_RTEMS_TASKS = 2, - OBJECTS_POSIX_THREADS = 3, - OBJECTS_RTEMS_TIMERS = 4, - OBJECTS_RTEMS_SEMAPHORES = 5, - OBJECTS_RTEMS_MESSAGE_QUEUES = 6, - OBJECTS_RTEMS_PARTITIONS = 7, - OBJECTS_RTEMS_REGIONS = 8, - OBJECTS_RTEMS_PORTS = 9, - OBJECTS_RTEMS_PERIODS = 10, - OBJECTS_RTEMS_EXTENSIONS = 11, - OBJECTS_POSIX_KEYS = 12, - OBJECTS_POSIX_INTERRUPTS = 13, - OBJECTS_POSIX_MESSAGE_QUEUES = 14, - OBJECTS_POSIX_MUTEXES = 15, - OBJECTS_POSIX_SEMAPHORES = 16, - OBJECTS_POSIX_CONDITION_VARIABLES = 17 + OBJECTS_NO_CLASS = 0, + OBJECTS_INTERNAL_THREADS = 1, + OBJECTS_RTEMS_TASKS = 2, + OBJECTS_POSIX_THREADS = 3, + OBJECTS_ITRON_TASKS = 4, + OBJECTS_RTEMS_TIMERS = 5, + OBJECTS_RTEMS_SEMAPHORES = 6, + OBJECTS_RTEMS_MESSAGE_QUEUES = 7, + OBJECTS_RTEMS_PARTITIONS = 8, + OBJECTS_RTEMS_REGIONS = 9, + OBJECTS_RTEMS_PORTS = 10, + OBJECTS_RTEMS_PERIODS = 11, + OBJECTS_RTEMS_EXTENSIONS = 12, + OBJECTS_POSIX_KEYS = 13, + OBJECTS_POSIX_INTERRUPTS = 14, + OBJECTS_POSIX_MESSAGE_QUEUES = 15, + OBJECTS_POSIX_MUTEXES = 16, + OBJECTS_POSIX_SEMAPHORES = 17, + OBJECTS_POSIX_CONDITION_VARIABLES = 18, + OBJECTS_ITRON_EVENTFLAGS = 19, + OBJECTS_ITRON_MAILBOXES = 20, + OBJECTS_ITRON_MESSAGE_BUFFERS = 21, + OBJECTS_ITRON_PORTS = 22, + OBJECTS_ITRON_SEMAPHORES = 23, + OBJECTS_ITRON_VARIABLE_MEMORY_POOLS = 24, + OBJECTS_ITRON_FIXED_MEMORY_POOLS = 25 } Objects_Classes; #define OBJECTS_CLASSES_FIRST OBJECTS_NO_CLASS -#define OBJECTS_CLASSES_LAST OBJECTS_POSIX_CONDITION_VARIABLES +#define OBJECTS_CLASSES_LAST OBJECTS_ITRON_FIXED_MEMORY_POOLS #define OBJECTS_CLASSES_FIRST_THREAD_CLASS OBJECTS_INTERNAL_THREADS -#define OBJECTS_CLASSES_LAST_THREAD_CLASS OBJECTS_POSIX_THREADS +#define OBJECTS_CLASSES_LAST_THREAD_CLASS OBJECTS_ITRON_TASKS /* * This enumerated type lists the locations which may be returned @@ -284,6 +292,22 @@ Objects_Control *_Objects_Allocate( Objects_Information *information ); +/* + * _Objects_Allocate_by_index + * + * DESCRIPTION: + * + * This function allocates the object control block + * specified by the index from the inactive chain of + * free object control blocks. + */ + +Objects_Control *_Objects_Allocate_by_index( + Objects_Information *information, + unsigned32 index, + unsigned32 sizeof_control +); + /*PAGE * * _Objects_Free diff --git a/c/src/exec/score/include/rtems/score/thread.h b/c/src/exec/score/include/rtems/score/thread.h index 1ca0005490..26452bffbe 100644 --- a/c/src/exec/score/include/rtems/score/thread.h +++ b/c/src/exec/score/include/rtems/score/thread.h @@ -166,11 +166,12 @@ typedef struct { typedef enum { THREAD_API_RTEMS, - THREAD_API_POSIX + THREAD_API_POSIX, + THREAD_API_ITRON } Thread_APIs; #define THREAD_API_FIRST THREAD_API_RTEMS -#define THREAD_API_LAST THREAD_API_POSIX +#define THREAD_API_LAST THREAD_API_ITRON struct Thread_Control_struct { Objects_Control Object; diff --git a/c/src/exec/score/include/rtems/system.h b/c/src/exec/score/include/rtems/system.h index 4d7f550141..423952aa56 100644 --- a/c/src/exec/score/include/rtems/system.h +++ b/c/src/exec/score/include/rtems/system.h @@ -69,6 +69,14 @@ extern "C" { #define POSIX_EXTERN extern #endif +#ifdef ITRON_API_INIT +#undef ITRON_EXTERN +#define ITRON_EXTERN +#else +#undef ITRON_EXTERN +#define ITRON_EXTERN extern +#endif + /* * The following (in conjunction with compiler arguments) are used * to choose between the use of static inline functions and macro |