2000-12-01 Joel Sherrill <joel@OARcorp.com>

* Added macro support to ITRON API.  This is known to compile.
	* Makefile.am: Added macros directory.
	* configure.in: Removed error check for enabling macros.
	* macros/.cvsignore, macros/Makefile.am,
	macros/rtems/.cvsignore, macros/rtems/Makefile.am,
	macros/rtems/itron/.cvsignore, macros/rtems/itron/Makefile.am,
	macros/rtems/itron/eventflags.inl, macros/rtems/itron/fmempool.inl,
	macros/rtems/itron/intr.inl, macros/rtems/itron/mbox.inl,
	macros/rtems/itron/msgbuffer.inl, macros/rtems/itron/network.inl,
	macros/rtems/itron/port.inl, macros/rtems/itron/semaphore.inl,
	macros/rtems/itron/sysmgmt.inl, macros/rtems/itron/task.inl,
	macros/rtems/itron/time.inl, macros/rtems/itron/vmempool.inl: New files.
This commit is contained in:
Joel Sherrill
2000-12-01 19:00:04 +00:00
parent 2b2bda48c1
commit 7afbca071b
39 changed files with 1676 additions and 12 deletions

View File

@@ -1,3 +1,18 @@
2000-12-01 Joel Sherrill <joel@OARcorp.com>
* Added macro support to ITRON API. This is known to compile.
* Makefile.am: Added macros directory.
* configure.in: Removed error check for enabling macros.
* macros/.cvsignore, macros/Makefile.am,
macros/rtems/.cvsignore, macros/rtems/Makefile.am,
macros/rtems/itron/.cvsignore, macros/rtems/itron/Makefile.am,
macros/rtems/itron/eventflags.inl, macros/rtems/itron/fmempool.inl,
macros/rtems/itron/intr.inl, macros/rtems/itron/mbox.inl,
macros/rtems/itron/msgbuffer.inl, macros/rtems/itron/network.inl,
macros/rtems/itron/port.inl, macros/rtems/itron/semaphore.inl,
macros/rtems/itron/sysmgmt.inl, macros/rtems/itron/task.inl,
macros/rtems/itron/time.inl, macros/rtems/itron/vmempool.inl: New files.
2000-11-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* Makefile.am: Use ... instead of RTEMS_TOPdir in ACLOCAL_AMFLAGS.

View File

@@ -5,7 +5,7 @@
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I ../../../../aclocal
SUBDIRS = include inline src
SUBDIRS = include inline macros src
include $(top_srcdir)/../../../../automake/subdirs.am
include $(top_srcdir)/../../../../automake/local.am

View File

@@ -30,10 +30,6 @@ RTEMS_CHECK_ITRON_API(RTEMS_BSP)
# If RTEMS macros are enabled, then use them. Otherwise, use inlines.
if test "$RTEMS_USE_MACROS" = "yes"; then
INLINEdir="macros"
if test "$HAS_ITRON_API" = "yes"; then
# The problem is that there is currently no code in itron/macros :)
AC_MSG_ERROR(Macros are not implemented for the ITRON API)
fi
else
INLINEdir="inline"
fi
@@ -43,12 +39,6 @@ AM_CONDITIONAL(MACROS,test "$INLINEdir" = "macros" )
## Needed when using automake for libs/rels
RTEMS_CHECK_NEWLIB
# If RTEMS macros are enabled, then use them. Otherwise, refuse to build
if test "$RTEMS_USE_MACROS" = "yes"; then
# The problem is that there is currently no code in itron/macros :)
AC_MSG_ERROR(Macros are not implemented for the ITRON API)
fi
##
## FIXME: We configure and build the macros subdirectory, too.
## Should probably use AM_CONDITIONALs to disable them in future
@@ -63,5 +53,8 @@ include/rtems/itron/Makefile
inline/Makefile
inline/rtems/Makefile
inline/rtems/itron/Makefile
macros/Makefile
macros/rtems/Makefile
macros/rtems/itron/Makefile
)

View File

@@ -0,0 +1,2 @@
Makefile
Makefile.in

View File

@@ -0,0 +1,10 @@
##
## $Id$
##
AUTOMAKE_OPTIONS = foreign 1.4
SUBDIRS = rtems
include $(top_srcdir)/../../../../automake/subdirs.am
include $(top_srcdir)/../../../../automake/local.am

View File

@@ -0,0 +1,2 @@
Makefile
Makefile.in

View File

@@ -0,0 +1,10 @@
##
## $Id$
##
AUTOMAKE_OPTIONS = foreign 1.4
SUBDIRS = itron
include $(top_srcdir)/../../../../automake/subdirs.am
include $(top_srcdir)/../../../../automake/local.am

View File

@@ -0,0 +1,2 @@
Makefile
Makefile.in

View File

@@ -0,0 +1,25 @@
##
## $Id$
##
AUTOMAKE_OPTIONS = foreign 1.4
if MACROS
I_FILES = eventflags.inl fmempool.inl intr.inl mbox.inl msgbuffer.inl \
network.inl port.inl semaphore.inl sysmgmt.inl task.inl time.inl \
vmempool.inl
noinst_HEADERS = $(I_FILES)
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/itron \
$(I_FILES:%=$(PROJECT_INCLUDE)/rtems/itron/%)
$(PROJECT_INCLUDE)/rtems/itron:
@$(mkinstalldirs) $@
$(PROJECT_INCLUDE)/rtems/itron/%.inl: %.inl
$(INSTALL_DATA) $< $@
endif
all-local: $(PREINSTALL_FILES)
include $(top_srcdir)/../../../../automake/local.am

View File

@@ -0,0 +1,76 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_EVENTFLAGS_inl_
#define __ITRON_EVENTFLAGS_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* _ITRON_Eventflags_Allocate
*/
#define _ITRON_Eventflags_Allocate( _flgid ) \
(ITRON_Eventflags_Control *)_ITRON_Objects_Allocate_by_index( \
&_ITRON_Eventflags_Information, \
(_flgid), \
sizeof(ITRON_Eventflags_Control) \
)
/*
* _ITRON_Eventflags_Clarify_allocation_id_error
*/
#define _ITRON_Eventflags_Clarify_allocation_id_error( _id ) \
_ITRON_Objects_Clarify_allocation_id_error( \
&_ITRON_Eventflags_Information, (_id) )
/*
* _ITRON_Eventflags_Clarify_get_id_error
*/
#define _ITRON_Eventflags_Clarify_get_id_error( _id ) \
_ITRON_Objects_Clarify_get_id_error( &_ITRON_Eventflags_Information, (_id) )
/*
* _ITRON_Eventflags_Free
*/
#define _ITRON_Eventflags_Free( _the_eventflags ) \
_ITRON_Objects_Free( &_ITRON_Eventflags_Information, \
&(_the_eventflags)->Object )
/*
* _ITRON_Eventflags_Get
*/
#define _ITRON_Eventflags_Get( _id, _location ) \
(ITRON_Eventflags_Control *) \
_ITRON_Objects_Get( &_ITRON_Eventflags_Information, (_id), (_location) )
/*PAGE
*
* _ITRON_Eventflags_Is_null
*/
#define _ITRON_Eventflags_Is_null( _the_eventflags ) \
( (_the_eventflags) == NULL );
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,78 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_FIXED_MEMORY_POOL_inl_
#define __ITRON_FIXED_MEMORY_POOL_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* _ITRON_Fixed_memory_pool_Allocate
*/
#define _ITRON_Fixed_memory_pool_Allocate( _mpfid ) \
(ITRON_Fixed_memory_pool_Control *)_ITRON_Objects_Allocate_by_index( \
&_ITRON_Fixed_memory_pool_Information, \
(_mpfid), \
sizeof(ITRON_Fixed_memory_pool_Control) \
)
/*
* _ITRON_Fixed_memory_pool_Clarify_allocation_id_error
*/
#define _ITRON_Fixed_memory_pool_Clarify_allocation_id_error( _id ) \
_ITRON_Objects_Clarify_allocation_id_error( \
&_ITRON_Fixed_memory_pool_Information, (_id) )
/*
* _ITRON_Fixed_memory_pool_Clarify_get_id_error
*/
#define _ITRON_Fixed_memory_pool_Clarify_get_id_error( _id ) \
_ITRON_Objects_Clarify_get_id_error( \
&_ITRON_Fixed_memory_pool_Information, (_id) )
/*
* _ITRON_Fixed_memory_pool_Free
*/
#define _ITRON_Fixed_memory_pool_Free( _the_fixed_memory_pool ) \
_ITRON_Objects_Free( \
&_ITRON_Fixed_memory_pool_Information, \
&(_the_fixed_memory_pool)->Object \
)
/*
* _ITRON_Fixed_memory_pool_Get
*/
#define _ITRON_Fixed_memory_pool_Get( _id, _location ) \
(ITRON_Fixed_memory_pool_Control *) \
_ITRON_Objects_Get( &_ITRON_Fixed_memory_pool_Information, \
(_id), (_location) )
/*
* _ITRON_Fixed_memory_pool_Is_null
*/
#define _ITRON_Fixed_memory_pool_Is_null( _the_fixed_memory_pool ) \
( (_the_fixed_memory_pool) == NULL )
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_INTERRUPT_inl_
#define __ITRON_INTERRUPT_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* XXX insert inline routines here
*/
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,75 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_MAILBOX_inl_
#define __ITRON_MAILBOX_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* _ITRON_Mailbox_Allocate
*/
#define _ITRON_Mailbox_Allocate( _mbxid ) \
(ITRON_Mailbox_Control *)_ITRON_Objects_Allocate_by_index( \
&_ITRON_Mailbox_Information, \
(_mbxid), \
sizeof(ITRON_Mailbox_Control) \
)
/*
* _ITRON_Mailbox_Clarify_allocation_id_error
*/
#define _ITRON_Mailbox_Clarify_allocation_id_error( _id ) \
_ITRON_Objects_Clarify_allocation_id_error( \
&_ITRON_Mailbox_Information, (_id) )
/*
* _ITRON_Mailbox_Clarify_get_id_error
*/
#define _ITRON_Mailbox_Clarify_get_id_error( _id ) \
_ITRON_Objects_Clarify_get_id_error( &_ITRON_Mailbox_Information, (_id) )
/*
* _ITRON_Mailbox_Free
*/
#define _ITRON_Mailbox_Free( _the_mailbox ) \
_ITRON_Objects_Free( &_ITRON_Mailbox_Information, &(_the_mailbox)->Object )
/*PAGE
*
* _ITRON_Mailbox_Get
*/
#define _ITRON_Mailbox_Get( _id, _location ) \
(ITRON_Mailbox_Control *) \
_ITRON_Objects_Get( &_ITRON_Mailbox_Information, (_id), (_location) )
/*PAGE
*
* _ITRON_Mailbox_Is_null
*/
#define _ITRON_Mailbox_Is_null( _the_mailbox ) \
( (_the_mailbox) == NULL )
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,78 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_MESSAGE_BUFFER_inl_
#define __ITRON_MESSAGE_BUFFER_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* _ITRON_Message_buffer_Allocate
*/
#define _ITRON_Message_buffer_Allocate( _mbfid ) \
(ITRON_Message_buffer_Control *)_ITRON_Objects_Allocate_by_index( \
&_ITRON_Message_buffer_Information, \
(_mbfid), \
sizeof(ITRON_Message_buffer_Control) \
)
/*
* _ITRON_Message_buffer_Clarify_allocation_id_error
*/
#define _ITRON_Message_buffer_Clarify_allocation_id_error( _id ) \
_ITRON_Objects_Clarify_allocation_id_error( \
&_ITRON_Message_buffer_Information, (_id) )
/*
* _ITRON_Message_buffer_Clarify_get_id_error
*/
#define _ITRON_Message_buffer_Clarify_get_id_error( _id ) \
_ITRON_Objects_Clarify_get_id_error( &_ITRON_Message_buffer_Information, (_id) )
/*
* _ITRON_Message_buffer_Free
*/
#define _ITRON_Message_buffer_Free( _the_message_buffer ) \
_ITRON_Objects_Free( \
&_ITRON_Message_buffer_Information, \
&(_the_message_buffer)->Object \
)
/*PAGE
*
* _ITRON_Message_buffer_Get
*/
#define _ITRON_Message_buffer_Get( _id, _location ) \
(ITRON_Message_buffer_Control *) \
_ITRON_Objects_Get( &_ITRON_Message_buffer_Information, (_id), (_location) )
/*PAGE
*
* _ITRON_Message_buffer_Is_null
*/
#define _ITRON_Message_buffer_Is_null( _the_message_buffer ) \
( (_the_message_buffer) == NULL )
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_NETWORK_inl_
#define __ITRON_NETWORK_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* XXX insert inline routines here
*/
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,75 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_PORT_inl_
#define __ITRON_PORT_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* _ITRON_Port_Allocate
*/
#define _ITRON_Port_Allocate( _porid ) \
(ITRON_Port_Control *)_ITRON_Objects_Allocate_by_index( \
&_ITRON_Port_Information, \
(_porid), \
sizeof(ITRON_Port_Control) \
)
/*
* _ITRON_Port_Clarify_allocation_id_error
*/
#define _ITRON_Port_Clarify_allocation_id_error( _id ) \
_ITRON_Objects_Clarify_allocation_id_error( \
&_ITRON_Port_Information, (_id) )
/*
* _ITRON_Port_Clarify_get_id_error
*/
#define _ITRON_Port_Clarify_get_id_error( _id ) \
_ITRON_Objects_Clarify_get_id_error( &_ITRON_Port_Information, (_id) )
/*
* _ITRON_Port_Free
*/
#define _ITRON_Port_Free( _the_port ) \
_ITRON_Objects_Free( &_ITRON_Port_Information, &(_the_port)->Object )
/*PAGE
*
* _ITRON_Port_Get
*/
#define _ITRON_Port_Get( _id, _location ) \
(ITRON_Port_Control *) \
_ITRON_Objects_Get( &_ITRON_Port_Information, (_id), (_location) )
/*PAGE
*
* _ITRON_Port_Is_null
*/
#define _ITRON_Port_Is_null( _the_port ) \
( (_the_port) == NULL )
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,102 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_SEMAPHORE_inl_
#define __ITRON_SEMAPHORE_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* _ITRON_Semaphore_Allocate
*/
#define _ITRON_Semaphore_Allocate( _semid ) \
(ITRON_Semaphore_Control *)_ITRON_Objects_Allocate_by_index( \
&_ITRON_Semaphore_Information, \
(_semid), \
sizeof(ITRON_Semaphore_Control) \
)
/*
* _ITRON_Semaphore_Clarify_allocation_id_error
*/
#define _ITRON_Semaphore_Clarify_allocation_id_error( _id ) \
_ITRON_Objects_Clarify_allocation_id_error( \
&_ITRON_Semaphore_Information, (_id) )
/*
* _ITRON_Semaphore_Clarify_get_id_error
*/
#define _ITRON_Semaphore_Clarify_get_id_error( _id ) \
_ITRON_Objects_Clarify_get_id_error( &_ITRON_Semaphore_Information, (_id) )
/*
* _ITRON_Semaphore_Free
*/
#define _ITRON_Semaphore_Free( _the_semaphore ) \
_ITRON_Objects_Free( &_ITRON_Semaphore_Information, &(_the_semaphore)->Object )
/*PAGE
*
* _ITRON_Semaphore_Get
*/
#define _ITRON_Semaphore_Get( _id, _location ) \
(ITRON_Semaphore_Control *) \
_ITRON_Objects_Get( &_ITRON_Semaphore_Information, (_id), (_location) )
/*PAGE
*
* _ITRON_Semaphore_Is_null
*/
#define _ITRON_Semaphore_Is_null( _the_semaphore ) \
( (_the_semaphore) == NULL )
/*
* _ITRON_Semaphore_Translate_core_semaphore_return_code
*/
/* XXX fix me */
static ER _ITRON_Semaphore_Translate_core_semaphore_return_code (
unsigned32 the_semaphore_status
)
{
/* XXX need to be able to return "E_RLWAI" */
switch ( the_semaphore_status ) {
case CORE_SEMAPHORE_STATUS_SUCCESSFUL:
return E_OK;
case CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT:
return E_TMOUT;
case CORE_SEMAPHORE_WAS_DELETED:
return E_DLT;
case CORE_SEMAPHORE_TIMEOUT:
return E_TMOUT;
case CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED:
return E_QOVR;
case THREAD_STATUS_PROXY_BLOCKING:
return THREAD_STATUS_PROXY_BLOCKING;
}
return E_OK; /* unreached - only to remove warnings */
}
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_TIME_inl_
#define __ITRON_TIME_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* XXX insert inline routines here
*/
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,102 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_TASK_inl_
#define __ITRON_TASK_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* _ITRON_Task_Allocate
*/
#define _ITRON_Task_Allocate( _tskid ) \
(Thread_Control *)_ITRON_Objects_Allocate_by_index( \
&_ITRON_Task_Information, \
(_tskid), \
sizeof(Thread_Control) \
)
/*
* _ITRON_Task_Clarify_allocation_id_error
*/
#define _ITRON_Task_Clarify_allocation_id_error( _id ) \
_ITRON_Objects_Clarify_allocation_id_error( \
&_ITRON_Task_Information, (_id) )
/*
* _ITRON_Task_Clarify_get_id_error
*/
#define _ITRON_Task_Clarify_get_id_error( _id ) \
_ITRON_Objects_Clarify_get_id_error( &_ITRON_Task_Information, (_id) )
/*
* _ITRON_Task_Free
*/
#define _ITRON_Task_Free( _the_task ) \
_ITRON_Objects_Free( &_ITRON_Task_Information, &(_the_task)->Object )
/*PAGE
*
* _ITRON_Task_Get
*/
/* XXX fix me */
static Thread_Control *_ITRON_Task_Get (
ID id,
Objects_Locations *location
)
{
if ( id == 0 ) {
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
return _Thread_Executing;
}
return (Thread_Control *)
_ITRON_Objects_Get( &_ITRON_Task_Information, id, location );
}
/*PAGE
*
* _ITRON_Task_Is_null
*/
#define _ITRON_Task_Is_null( _the_task ) \
( (_the_task) == NULL )
/*PAGE
*
* _ITRON_tasks_Priority_to_Core
*/
#define _ITRON_Task_Priority_to_Core( _ITRON_priority ) \
((Priority_Control) (_ITRON_priority))
/*PAGE
*
* _ITRON_tasks_Core_to_Priority
*/
#define _ITRON_Task_Core_to_Priority( _core_priority ) \
((PRI) (_core_priority))
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_TIME_inl_
#define __ITRON_TIME_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* XXX insert inline routines here
*/
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,81 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_VARIABLE_MEMORY_POOL_inl_
#define __ITRON_VARIABLE_MEMORY_POOL_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* _ITRON_Variable_memory_pool_Allocate
*/
#define _ITRON_Variable_memory_pool_Allocate( _mplid ) \
(ITRON_Variable_memory_pool_Control *)_ITRON_Objects_Allocate_by_index( \
&_ITRON_Variable_memory_pool_Information, \
(_mplid), \
sizeof(ITRON_Variable_memory_pool_Control) \
)
/*
* _ITRON_Variable_memory_pool_Clarify_allocation_id_error
*/
#define _ITRON_Variable_memory_pool_Clarify_allocation_id_error( _id ) \
_ITRON_Objects_Clarify_allocation_id_error( \
&_ITRON_Variable_memory_pool_Information, (_id) )
/*
* _ITRON_Variable_memory_pool_Clarify_get_id_error
*/
#define _ITRON_Variable_memory_pool_Clarify_get_id_error( _id ) \
_ITRON_Objects_Clarify_get_id_error( &_ITRON_Variable_memory_pool_Information, (_id) )
/*
* _ITRON_Variable_memory_pool_Free
*/
#define _ITRON_Variable_memory_pool_Free( _the_variable_memory_pool ) \
_ITRON_Objects_Free( \
&_ITRON_Variable_memory_pool_Information, \
&(_the_variable_memory_pool)->Object \
)
/*PAGE
*
* _ITRON_Variable_memory_pool_Get
*/
#define _ITRON_Variable_memory_pool_Get( _id, _location ) \
(ITRON_Variable_memory_pool_Control *) _ITRON_Objects_Get( \
&_ITRON_Variable_memory_pool_Information, \
(_id), \
(_location) \
)
/*PAGE
*
* _ITRON_Variable_memory_pool_Is_null
*/
#define _ITRON_Variable_memory_pool_Is_null( _the_variable_memory_pool ) \
( (_the_variable_memory_pool) == NULL )
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -1,3 +1,18 @@
2000-12-01 Joel Sherrill <joel@OARcorp.com>
* Added macro support to ITRON API. This is known to compile.
* Makefile.am: Added macros directory.
* configure.in: Removed error check for enabling macros.
* macros/.cvsignore, macros/Makefile.am,
macros/rtems/.cvsignore, macros/rtems/Makefile.am,
macros/rtems/itron/.cvsignore, macros/rtems/itron/Makefile.am,
macros/rtems/itron/eventflags.inl, macros/rtems/itron/fmempool.inl,
macros/rtems/itron/intr.inl, macros/rtems/itron/mbox.inl,
macros/rtems/itron/msgbuffer.inl, macros/rtems/itron/network.inl,
macros/rtems/itron/port.inl, macros/rtems/itron/semaphore.inl,
macros/rtems/itron/sysmgmt.inl, macros/rtems/itron/task.inl,
macros/rtems/itron/time.inl, macros/rtems/itron/vmempool.inl: New files.
2000-11-09 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* Makefile.am: Use ... instead of RTEMS_TOPdir in ACLOCAL_AMFLAGS.

View File

@@ -5,7 +5,7 @@
AUTOMAKE_OPTIONS = foreign 1.4
ACLOCAL_AMFLAGS = -I ../../../../aclocal
SUBDIRS = include inline src
SUBDIRS = include inline macros src
include $(top_srcdir)/../../../../automake/subdirs.am
include $(top_srcdir)/../../../../automake/local.am

View File

@@ -0,0 +1,2 @@
Makefile
Makefile.in

View File

@@ -0,0 +1,10 @@
##
## $Id$
##
AUTOMAKE_OPTIONS = foreign 1.4
SUBDIRS = rtems
include $(top_srcdir)/../../../../automake/subdirs.am
include $(top_srcdir)/../../../../automake/local.am

View File

@@ -0,0 +1,2 @@
Makefile
Makefile.in

View File

@@ -0,0 +1,2 @@
Makefile
Makefile.in

View File

@@ -0,0 +1,76 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_EVENTFLAGS_inl_
#define __ITRON_EVENTFLAGS_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* _ITRON_Eventflags_Allocate
*/
#define _ITRON_Eventflags_Allocate( _flgid ) \
(ITRON_Eventflags_Control *)_ITRON_Objects_Allocate_by_index( \
&_ITRON_Eventflags_Information, \
(_flgid), \
sizeof(ITRON_Eventflags_Control) \
)
/*
* _ITRON_Eventflags_Clarify_allocation_id_error
*/
#define _ITRON_Eventflags_Clarify_allocation_id_error( _id ) \
_ITRON_Objects_Clarify_allocation_id_error( \
&_ITRON_Eventflags_Information, (_id) )
/*
* _ITRON_Eventflags_Clarify_get_id_error
*/
#define _ITRON_Eventflags_Clarify_get_id_error( _id ) \
_ITRON_Objects_Clarify_get_id_error( &_ITRON_Eventflags_Information, (_id) )
/*
* _ITRON_Eventflags_Free
*/
#define _ITRON_Eventflags_Free( _the_eventflags ) \
_ITRON_Objects_Free( &_ITRON_Eventflags_Information, \
&(_the_eventflags)->Object )
/*
* _ITRON_Eventflags_Get
*/
#define _ITRON_Eventflags_Get( _id, _location ) \
(ITRON_Eventflags_Control *) \
_ITRON_Objects_Get( &_ITRON_Eventflags_Information, (_id), (_location) )
/*PAGE
*
* _ITRON_Eventflags_Is_null
*/
#define _ITRON_Eventflags_Is_null( _the_eventflags ) \
( (_the_eventflags) == NULL );
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,78 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_FIXED_MEMORY_POOL_inl_
#define __ITRON_FIXED_MEMORY_POOL_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* _ITRON_Fixed_memory_pool_Allocate
*/
#define _ITRON_Fixed_memory_pool_Allocate( _mpfid ) \
(ITRON_Fixed_memory_pool_Control *)_ITRON_Objects_Allocate_by_index( \
&_ITRON_Fixed_memory_pool_Information, \
(_mpfid), \
sizeof(ITRON_Fixed_memory_pool_Control) \
)
/*
* _ITRON_Fixed_memory_pool_Clarify_allocation_id_error
*/
#define _ITRON_Fixed_memory_pool_Clarify_allocation_id_error( _id ) \
_ITRON_Objects_Clarify_allocation_id_error( \
&_ITRON_Fixed_memory_pool_Information, (_id) )
/*
* _ITRON_Fixed_memory_pool_Clarify_get_id_error
*/
#define _ITRON_Fixed_memory_pool_Clarify_get_id_error( _id ) \
_ITRON_Objects_Clarify_get_id_error( \
&_ITRON_Fixed_memory_pool_Information, (_id) )
/*
* _ITRON_Fixed_memory_pool_Free
*/
#define _ITRON_Fixed_memory_pool_Free( _the_fixed_memory_pool ) \
_ITRON_Objects_Free( \
&_ITRON_Fixed_memory_pool_Information, \
&(_the_fixed_memory_pool)->Object \
)
/*
* _ITRON_Fixed_memory_pool_Get
*/
#define _ITRON_Fixed_memory_pool_Get( _id, _location ) \
(ITRON_Fixed_memory_pool_Control *) \
_ITRON_Objects_Get( &_ITRON_Fixed_memory_pool_Information, \
(_id), (_location) )
/*
* _ITRON_Fixed_memory_pool_Is_null
*/
#define _ITRON_Fixed_memory_pool_Is_null( _the_fixed_memory_pool ) \
( (_the_fixed_memory_pool) == NULL )
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_INTERRUPT_inl_
#define __ITRON_INTERRUPT_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* XXX insert inline routines here
*/
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,75 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_MAILBOX_inl_
#define __ITRON_MAILBOX_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* _ITRON_Mailbox_Allocate
*/
#define _ITRON_Mailbox_Allocate( _mbxid ) \
(ITRON_Mailbox_Control *)_ITRON_Objects_Allocate_by_index( \
&_ITRON_Mailbox_Information, \
(_mbxid), \
sizeof(ITRON_Mailbox_Control) \
)
/*
* _ITRON_Mailbox_Clarify_allocation_id_error
*/
#define _ITRON_Mailbox_Clarify_allocation_id_error( _id ) \
_ITRON_Objects_Clarify_allocation_id_error( \
&_ITRON_Mailbox_Information, (_id) )
/*
* _ITRON_Mailbox_Clarify_get_id_error
*/
#define _ITRON_Mailbox_Clarify_get_id_error( _id ) \
_ITRON_Objects_Clarify_get_id_error( &_ITRON_Mailbox_Information, (_id) )
/*
* _ITRON_Mailbox_Free
*/
#define _ITRON_Mailbox_Free( _the_mailbox ) \
_ITRON_Objects_Free( &_ITRON_Mailbox_Information, &(_the_mailbox)->Object )
/*PAGE
*
* _ITRON_Mailbox_Get
*/
#define _ITRON_Mailbox_Get( _id, _location ) \
(ITRON_Mailbox_Control *) \
_ITRON_Objects_Get( &_ITRON_Mailbox_Information, (_id), (_location) )
/*PAGE
*
* _ITRON_Mailbox_Is_null
*/
#define _ITRON_Mailbox_Is_null( _the_mailbox ) \
( (_the_mailbox) == NULL )
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,78 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_MESSAGE_BUFFER_inl_
#define __ITRON_MESSAGE_BUFFER_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* _ITRON_Message_buffer_Allocate
*/
#define _ITRON_Message_buffer_Allocate( _mbfid ) \
(ITRON_Message_buffer_Control *)_ITRON_Objects_Allocate_by_index( \
&_ITRON_Message_buffer_Information, \
(_mbfid), \
sizeof(ITRON_Message_buffer_Control) \
)
/*
* _ITRON_Message_buffer_Clarify_allocation_id_error
*/
#define _ITRON_Message_buffer_Clarify_allocation_id_error( _id ) \
_ITRON_Objects_Clarify_allocation_id_error( \
&_ITRON_Message_buffer_Information, (_id) )
/*
* _ITRON_Message_buffer_Clarify_get_id_error
*/
#define _ITRON_Message_buffer_Clarify_get_id_error( _id ) \
_ITRON_Objects_Clarify_get_id_error( &_ITRON_Message_buffer_Information, (_id) )
/*
* _ITRON_Message_buffer_Free
*/
#define _ITRON_Message_buffer_Free( _the_message_buffer ) \
_ITRON_Objects_Free( \
&_ITRON_Message_buffer_Information, \
&(_the_message_buffer)->Object \
)
/*PAGE
*
* _ITRON_Message_buffer_Get
*/
#define _ITRON_Message_buffer_Get( _id, _location ) \
(ITRON_Message_buffer_Control *) \
_ITRON_Objects_Get( &_ITRON_Message_buffer_Information, (_id), (_location) )
/*PAGE
*
* _ITRON_Message_buffer_Is_null
*/
#define _ITRON_Message_buffer_Is_null( _the_message_buffer ) \
( (_the_message_buffer) == NULL )
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_NETWORK_inl_
#define __ITRON_NETWORK_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* XXX insert inline routines here
*/
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,75 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_PORT_inl_
#define __ITRON_PORT_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* _ITRON_Port_Allocate
*/
#define _ITRON_Port_Allocate( _porid ) \
(ITRON_Port_Control *)_ITRON_Objects_Allocate_by_index( \
&_ITRON_Port_Information, \
(_porid), \
sizeof(ITRON_Port_Control) \
)
/*
* _ITRON_Port_Clarify_allocation_id_error
*/
#define _ITRON_Port_Clarify_allocation_id_error( _id ) \
_ITRON_Objects_Clarify_allocation_id_error( \
&_ITRON_Port_Information, (_id) )
/*
* _ITRON_Port_Clarify_get_id_error
*/
#define _ITRON_Port_Clarify_get_id_error( _id ) \
_ITRON_Objects_Clarify_get_id_error( &_ITRON_Port_Information, (_id) )
/*
* _ITRON_Port_Free
*/
#define _ITRON_Port_Free( _the_port ) \
_ITRON_Objects_Free( &_ITRON_Port_Information, &(_the_port)->Object )
/*PAGE
*
* _ITRON_Port_Get
*/
#define _ITRON_Port_Get( _id, _location ) \
(ITRON_Port_Control *) \
_ITRON_Objects_Get( &_ITRON_Port_Information, (_id), (_location) )
/*PAGE
*
* _ITRON_Port_Is_null
*/
#define _ITRON_Port_Is_null( _the_port ) \
( (_the_port) == NULL )
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,102 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_SEMAPHORE_inl_
#define __ITRON_SEMAPHORE_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* _ITRON_Semaphore_Allocate
*/
#define _ITRON_Semaphore_Allocate( _semid ) \
(ITRON_Semaphore_Control *)_ITRON_Objects_Allocate_by_index( \
&_ITRON_Semaphore_Information, \
(_semid), \
sizeof(ITRON_Semaphore_Control) \
)
/*
* _ITRON_Semaphore_Clarify_allocation_id_error
*/
#define _ITRON_Semaphore_Clarify_allocation_id_error( _id ) \
_ITRON_Objects_Clarify_allocation_id_error( \
&_ITRON_Semaphore_Information, (_id) )
/*
* _ITRON_Semaphore_Clarify_get_id_error
*/
#define _ITRON_Semaphore_Clarify_get_id_error( _id ) \
_ITRON_Objects_Clarify_get_id_error( &_ITRON_Semaphore_Information, (_id) )
/*
* _ITRON_Semaphore_Free
*/
#define _ITRON_Semaphore_Free( _the_semaphore ) \
_ITRON_Objects_Free( &_ITRON_Semaphore_Information, &(_the_semaphore)->Object )
/*PAGE
*
* _ITRON_Semaphore_Get
*/
#define _ITRON_Semaphore_Get( _id, _location ) \
(ITRON_Semaphore_Control *) \
_ITRON_Objects_Get( &_ITRON_Semaphore_Information, (_id), (_location) )
/*PAGE
*
* _ITRON_Semaphore_Is_null
*/
#define _ITRON_Semaphore_Is_null( _the_semaphore ) \
( (_the_semaphore) == NULL )
/*
* _ITRON_Semaphore_Translate_core_semaphore_return_code
*/
/* XXX fix me */
static ER _ITRON_Semaphore_Translate_core_semaphore_return_code (
unsigned32 the_semaphore_status
)
{
/* XXX need to be able to return "E_RLWAI" */
switch ( the_semaphore_status ) {
case CORE_SEMAPHORE_STATUS_SUCCESSFUL:
return E_OK;
case CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT:
return E_TMOUT;
case CORE_SEMAPHORE_WAS_DELETED:
return E_DLT;
case CORE_SEMAPHORE_TIMEOUT:
return E_TMOUT;
case CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED:
return E_QOVR;
case THREAD_STATUS_PROXY_BLOCKING:
return THREAD_STATUS_PROXY_BLOCKING;
}
return E_OK; /* unreached - only to remove warnings */
}
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_TIME_inl_
#define __ITRON_TIME_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* XXX insert inline routines here
*/
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,102 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_TASK_inl_
#define __ITRON_TASK_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* _ITRON_Task_Allocate
*/
#define _ITRON_Task_Allocate( _tskid ) \
(Thread_Control *)_ITRON_Objects_Allocate_by_index( \
&_ITRON_Task_Information, \
(_tskid), \
sizeof(Thread_Control) \
)
/*
* _ITRON_Task_Clarify_allocation_id_error
*/
#define _ITRON_Task_Clarify_allocation_id_error( _id ) \
_ITRON_Objects_Clarify_allocation_id_error( \
&_ITRON_Task_Information, (_id) )
/*
* _ITRON_Task_Clarify_get_id_error
*/
#define _ITRON_Task_Clarify_get_id_error( _id ) \
_ITRON_Objects_Clarify_get_id_error( &_ITRON_Task_Information, (_id) )
/*
* _ITRON_Task_Free
*/
#define _ITRON_Task_Free( _the_task ) \
_ITRON_Objects_Free( &_ITRON_Task_Information, &(_the_task)->Object )
/*PAGE
*
* _ITRON_Task_Get
*/
/* XXX fix me */
static Thread_Control *_ITRON_Task_Get (
ID id,
Objects_Locations *location
)
{
if ( id == 0 ) {
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
return _Thread_Executing;
}
return (Thread_Control *)
_ITRON_Objects_Get( &_ITRON_Task_Information, id, location );
}
/*PAGE
*
* _ITRON_Task_Is_null
*/
#define _ITRON_Task_Is_null( _the_task ) \
( (_the_task) == NULL )
/*PAGE
*
* _ITRON_tasks_Priority_to_Core
*/
#define _ITRON_Task_Priority_to_Core( _ITRON_priority ) \
((Priority_Control) (_ITRON_priority))
/*PAGE
*
* _ITRON_tasks_Core_to_Priority
*/
#define _ITRON_Task_Core_to_Priority( _core_priority ) \
((PRI) (_core_priority))
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_TIME_inl_
#define __ITRON_TIME_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* XXX insert inline routines here
*/
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */

View File

@@ -0,0 +1,81 @@
/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* $Id$
*/
#ifndef __ITRON_VARIABLE_MEMORY_POOL_inl_
#define __ITRON_VARIABLE_MEMORY_POOL_inl_
#ifdef __cplusplus
extern "C" {
#endif
/*
* _ITRON_Variable_memory_pool_Allocate
*/
#define _ITRON_Variable_memory_pool_Allocate( _mplid ) \
(ITRON_Variable_memory_pool_Control *)_ITRON_Objects_Allocate_by_index( \
&_ITRON_Variable_memory_pool_Information, \
(_mplid), \
sizeof(ITRON_Variable_memory_pool_Control) \
)
/*
* _ITRON_Variable_memory_pool_Clarify_allocation_id_error
*/
#define _ITRON_Variable_memory_pool_Clarify_allocation_id_error( _id ) \
_ITRON_Objects_Clarify_allocation_id_error( \
&_ITRON_Variable_memory_pool_Information, (_id) )
/*
* _ITRON_Variable_memory_pool_Clarify_get_id_error
*/
#define _ITRON_Variable_memory_pool_Clarify_get_id_error( _id ) \
_ITRON_Objects_Clarify_get_id_error( &_ITRON_Variable_memory_pool_Information, (_id) )
/*
* _ITRON_Variable_memory_pool_Free
*/
#define _ITRON_Variable_memory_pool_Free( _the_variable_memory_pool ) \
_ITRON_Objects_Free( \
&_ITRON_Variable_memory_pool_Information, \
&(_the_variable_memory_pool)->Object \
)
/*PAGE
*
* _ITRON_Variable_memory_pool_Get
*/
#define _ITRON_Variable_memory_pool_Get( _id, _location ) \
(ITRON_Variable_memory_pool_Control *) _ITRON_Objects_Get( \
&_ITRON_Variable_memory_pool_Information, \
(_id), \
(_location) \
)
/*PAGE
*
* _ITRON_Variable_memory_pool_Is_null
*/
#define _ITRON_Variable_memory_pool_Is_null( _the_variable_memory_pool ) \
( (_the_variable_memory_pool) == NULL )
#ifdef __cplusplus
}
#endif
#endif
/* end of include file */