From 7afbca071bcc0b76d20f2a11dc7521503e952e31 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 1 Dec 2000 19:00:04 +0000 Subject: 2000-12-01 Joel Sherrill * 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. --- cpukit/itron/ChangeLog | 15 ++++ cpukit/itron/Makefile.am | 2 +- cpukit/itron/macros/.cvsignore | 2 + cpukit/itron/macros/Makefile.am | 10 +++ cpukit/itron/macros/rtems/.cvsignore | 2 + cpukit/itron/macros/rtems/itron/.cvsignore | 2 + cpukit/itron/macros/rtems/itron/eventflags.inl | 76 ++++++++++++++++++ cpukit/itron/macros/rtems/itron/fmempool.inl | 78 +++++++++++++++++++ cpukit/itron/macros/rtems/itron/intr.inl | 30 ++++++++ cpukit/itron/macros/rtems/itron/mbox.inl | 75 ++++++++++++++++++ cpukit/itron/macros/rtems/itron/msgbuffer.inl | 78 +++++++++++++++++++ cpukit/itron/macros/rtems/itron/network.inl | 30 ++++++++ cpukit/itron/macros/rtems/itron/port.inl | 75 ++++++++++++++++++ cpukit/itron/macros/rtems/itron/semaphore.inl | 102 +++++++++++++++++++++++++ cpukit/itron/macros/rtems/itron/sysmgmt.inl | 30 ++++++++ cpukit/itron/macros/rtems/itron/task.inl | 102 +++++++++++++++++++++++++ cpukit/itron/macros/rtems/itron/time.inl | 30 ++++++++ cpukit/itron/macros/rtems/itron/vmempool.inl | 81 ++++++++++++++++++++ 18 files changed, 819 insertions(+), 1 deletion(-) create mode 100644 cpukit/itron/macros/.cvsignore create mode 100644 cpukit/itron/macros/Makefile.am create mode 100644 cpukit/itron/macros/rtems/.cvsignore create mode 100644 cpukit/itron/macros/rtems/itron/.cvsignore create mode 100644 cpukit/itron/macros/rtems/itron/eventflags.inl create mode 100644 cpukit/itron/macros/rtems/itron/fmempool.inl create mode 100644 cpukit/itron/macros/rtems/itron/intr.inl create mode 100644 cpukit/itron/macros/rtems/itron/mbox.inl create mode 100644 cpukit/itron/macros/rtems/itron/msgbuffer.inl create mode 100644 cpukit/itron/macros/rtems/itron/network.inl create mode 100644 cpukit/itron/macros/rtems/itron/port.inl create mode 100644 cpukit/itron/macros/rtems/itron/semaphore.inl create mode 100644 cpukit/itron/macros/rtems/itron/sysmgmt.inl create mode 100644 cpukit/itron/macros/rtems/itron/task.inl create mode 100644 cpukit/itron/macros/rtems/itron/time.inl create mode 100644 cpukit/itron/macros/rtems/itron/vmempool.inl (limited to 'cpukit/itron') diff --git a/cpukit/itron/ChangeLog b/cpukit/itron/ChangeLog index 2f7da5046f..a254ef712f 100644 --- a/cpukit/itron/ChangeLog +++ b/cpukit/itron/ChangeLog @@ -1,3 +1,18 @@ +2000-12-01 Joel Sherrill + + * 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 * Makefile.am: Use ... instead of RTEMS_TOPdir in ACLOCAL_AMFLAGS. diff --git a/cpukit/itron/Makefile.am b/cpukit/itron/Makefile.am index 90a65b8443..7d2bb3ca04 100644 --- a/cpukit/itron/Makefile.am +++ b/cpukit/itron/Makefile.am @@ -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 diff --git a/cpukit/itron/macros/.cvsignore b/cpukit/itron/macros/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/cpukit/itron/macros/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/cpukit/itron/macros/Makefile.am b/cpukit/itron/macros/Makefile.am new file mode 100644 index 0000000000..32269fcdcd --- /dev/null +++ b/cpukit/itron/macros/Makefile.am @@ -0,0 +1,10 @@ +## +## $Id$ +## + +AUTOMAKE_OPTIONS = foreign 1.4 + +SUBDIRS = rtems + +include $(top_srcdir)/../../../../automake/subdirs.am +include $(top_srcdir)/../../../../automake/local.am diff --git a/cpukit/itron/macros/rtems/.cvsignore b/cpukit/itron/macros/rtems/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/cpukit/itron/macros/rtems/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/cpukit/itron/macros/rtems/itron/.cvsignore b/cpukit/itron/macros/rtems/itron/.cvsignore new file mode 100644 index 0000000000..282522db03 --- /dev/null +++ b/cpukit/itron/macros/rtems/itron/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/cpukit/itron/macros/rtems/itron/eventflags.inl b/cpukit/itron/macros/rtems/itron/eventflags.inl new file mode 100644 index 0000000000..73e6ded0b1 --- /dev/null +++ b/cpukit/itron/macros/rtems/itron/eventflags.inl @@ -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 */ + diff --git a/cpukit/itron/macros/rtems/itron/fmempool.inl b/cpukit/itron/macros/rtems/itron/fmempool.inl new file mode 100644 index 0000000000..5d1f6db314 --- /dev/null +++ b/cpukit/itron/macros/rtems/itron/fmempool.inl @@ -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 */ + diff --git a/cpukit/itron/macros/rtems/itron/intr.inl b/cpukit/itron/macros/rtems/itron/intr.inl new file mode 100644 index 0000000000..93c44eff00 --- /dev/null +++ b/cpukit/itron/macros/rtems/itron/intr.inl @@ -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 */ + diff --git a/cpukit/itron/macros/rtems/itron/mbox.inl b/cpukit/itron/macros/rtems/itron/mbox.inl new file mode 100644 index 0000000000..739cd46f88 --- /dev/null +++ b/cpukit/itron/macros/rtems/itron/mbox.inl @@ -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 */ + diff --git a/cpukit/itron/macros/rtems/itron/msgbuffer.inl b/cpukit/itron/macros/rtems/itron/msgbuffer.inl new file mode 100644 index 0000000000..be33b7d107 --- /dev/null +++ b/cpukit/itron/macros/rtems/itron/msgbuffer.inl @@ -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 */ + diff --git a/cpukit/itron/macros/rtems/itron/network.inl b/cpukit/itron/macros/rtems/itron/network.inl new file mode 100644 index 0000000000..dd833bb079 --- /dev/null +++ b/cpukit/itron/macros/rtems/itron/network.inl @@ -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 */ + diff --git a/cpukit/itron/macros/rtems/itron/port.inl b/cpukit/itron/macros/rtems/itron/port.inl new file mode 100644 index 0000000000..0f402fef3c --- /dev/null +++ b/cpukit/itron/macros/rtems/itron/port.inl @@ -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 */ + diff --git a/cpukit/itron/macros/rtems/itron/semaphore.inl b/cpukit/itron/macros/rtems/itron/semaphore.inl new file mode 100644 index 0000000000..ec435e1648 --- /dev/null +++ b/cpukit/itron/macros/rtems/itron/semaphore.inl @@ -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 */ + diff --git a/cpukit/itron/macros/rtems/itron/sysmgmt.inl b/cpukit/itron/macros/rtems/itron/sysmgmt.inl new file mode 100644 index 0000000000..183232a785 --- /dev/null +++ b/cpukit/itron/macros/rtems/itron/sysmgmt.inl @@ -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 */ + diff --git a/cpukit/itron/macros/rtems/itron/task.inl b/cpukit/itron/macros/rtems/itron/task.inl new file mode 100644 index 0000000000..807a02fc6f --- /dev/null +++ b/cpukit/itron/macros/rtems/itron/task.inl @@ -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 */ diff --git a/cpukit/itron/macros/rtems/itron/time.inl b/cpukit/itron/macros/rtems/itron/time.inl new file mode 100644 index 0000000000..183232a785 --- /dev/null +++ b/cpukit/itron/macros/rtems/itron/time.inl @@ -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 */ + diff --git a/cpukit/itron/macros/rtems/itron/vmempool.inl b/cpukit/itron/macros/rtems/itron/vmempool.inl new file mode 100644 index 0000000000..e235e477ed --- /dev/null +++ b/cpukit/itron/macros/rtems/itron/vmempool.inl @@ -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 */ + -- cgit v1.2.3