summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score/include
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-09 22:07:23 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-11-09 22:07:23 +0000
commit352c9b2035e32e56f10f261d94955d97f4ab0f1c (patch)
treef433e95ae0ab8d8854ea19b7f4bfab3ffb431726 /c/src/exec/score/include
parentFixed warning where initialized default POSIX API structure did (diff)
downloadrtems-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/include')
-rw-r--r--c/src/exec/score/include/rtems/score/Makefile.in4
-rw-r--r--c/src/exec/score/include/rtems/score/interr.h3
-rw-r--r--c/src/exec/score/include/rtems/score/object.h64
-rw-r--r--c/src/exec/score/include/rtems/score/thread.h5
-rw-r--r--c/src/exec/score/include/rtems/system.h8
5 files changed, 61 insertions, 23 deletions
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