diff options
Diffstat (limited to '')
60 files changed, 0 insertions, 4348 deletions
diff --git a/c/src/exec/itron/src/.cvsignore b/c/src/exec/itron/src/.cvsignore deleted file mode 100644 index 9188ae45da..0000000000 --- a/c/src/exec/itron/src/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -Makefile -Makefile.in -stamp-h -stamp-h.in -config.h -config.h.in diff --git a/c/src/exec/itron/src/Makefile.am b/c/src/exec/itron/src/Makefile.am deleted file mode 100644 index 0c8ca41d51..0000000000 --- a/c/src/exec/itron/src/Makefile.am +++ /dev/null @@ -1,66 +0,0 @@ -## -## $Id$ -## - -LIB=$(ARCH)/libitron.a - -INCLUDES = -I. - -TASK_C_FILES = task.c cre_tsk.c del_tsk.c sta_tsk.c ext_tsk.c exd_tsk.c \ - ter_tsk.c dis_dsp.c ena_dsp.c chg_pri.c rot_rdq.c rel_wai.c get_tid.c \ - ref_tsk.c - -TASKSYNC_C_FILES = sus_tsk.c rsm_tsk.c frsm_tsk.c slp_tsk.c tslp_tsk.c \ - wup_tsk.c can_wup.c - -SEMAPHORE_C_FILES = itronsem.c cre_sem.c del_sem.c preq_sem.c ref_sem.c \ - sig_sem.c twai_sem.c wai_sem.c - -EVENTFLAGS_C_FILES = eventflags.c - -MAILBOX_C_FILES = mbox.c - -MSGBUFFER_C_FILES = msgbuffer.c msgbuffertranslatereturncode.c cre_mbf.c \ - del_mbf.c prcv_mbf.c psnd_mbf.c rcv_mbf.c ref_mbf.c snd_mbf.c trcv_mbf.c \ - tsnd_mbf.c - -RENDEZVOUS_C_FILES = port.c - -INTERRUPT_C_FILES = itronintr.c - -VARIABLE_MEMORY_POOL_C_FILES = vmempool.c - -FIXED_MEMORY_POOL_C_FILES = fmempool.c - -TIME_C_FILES = itrontime.c - -CONFIGURATION_C_FILES = sysmgmt.c - -NETWORK_C_FILES = network.c - -C_FILES = $(TASK_C_FILES) $(TASKSYNC_C_FILES) $(SEMAPHORE_C_FILES) \ - $(EVENTFLAGS_C_FILES) $(MAILBOX_C_FILES) $(MSGBUFFER_C_FILES) \ - $(RENDEZVOUS_C_FILES) $(INTERRUPT_C_FILES) \ - $(VARIABLE_MEMORY_POOL_C_FILES) $(FIXED_MEMORY_POOL_C_FILES) \ - $(TIME_C_FILES) -C_O_FILES = $(C_FILES:%.c=${ARCH}/%.o) - -OBJS = $(C_O_FILES) - -include $(top_srcdir)/../automake/multilib.am -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/lib.am - -AM_CPPFLAGS += -D__RTEMS_INSIDE__ - -all-local: ${ARCH} ${LIB} - -$(LIB): ${OBJS} - $(make-library) - -UNUSED_C_FILES = cre_mbx.c del_mbx.c mboxtranslatereturncode.c network.c \ - prcv_mbx.c rcv_mbx.c ref_mbx.c snd_mbx.c sysmgmt.c trcv_mbx.c - -EXTRA_DIST = $(C_FILES) $(UNUSED_C_FILES) - -include $(top_srcdir)/../automake/local.am diff --git a/c/src/exec/itron/src/TODO b/c/src/exec/itron/src/TODO deleted file mode 100644 index 8b87f58c8a..0000000000 --- a/c/src/exec/itron/src/TODO +++ /dev/null @@ -1,13 +0,0 @@ -# -# $Id$ -# - -The overall status including a major item todo list is in the Status -chapter of the RTEMS ITRON API User's Guide. This file contains very -short things that need to be addressed. - -+ unlimited object not support for allocate by index. Support either - needs to be added for this type of object or the manager initialization - code needs to consider it a fatal error to configure the object class - in this mode. - diff --git a/c/src/exec/itron/src/can_wup.c b/c/src/exec/itron/src/can_wup.c deleted file mode 100644 index 57fb24f8d0..0000000000 --- a/c/src/exec/itron/src/can_wup.c +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - -/* - * can_wup - Cancel Wakeup Request - */ - -ER can_wup( - INT *p_wupcnt, - ID tskid -) -{ - register Thread_Control *the_thread; - Objects_Locations location; - - the_thread = _ITRON_Task_Get( tskid, &location ); - switch ( location ) { - case OBJECTS_REMOTE: - case OBJECTS_ERROR: - return _ITRON_Task_Clarify_get_id_error( tskid ); - - case OBJECTS_LOCAL: - /* - * XXX - FILL ME IN. - */ - break; - } - - _ITRON_return_errorno( E_OK ); -} - diff --git a/c/src/exec/itron/src/chg_pri.c b/c/src/exec/itron/src/chg_pri.c deleted file mode 100644 index 9e0641c118..0000000000 --- a/c/src/exec/itron/src/chg_pri.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - -/* - * chg_pri - Change Task Priority - */ - -ER chg_pri( - ID tskid, - PRI tskpri -) -{ - register Thread_Control *the_thread; - Objects_Locations location; - Priority_Control new_priority; - - the_thread = _ITRON_Task_Get( tskid, &location ); - switch ( location ) { - case OBJECTS_REMOTE: - case OBJECTS_ERROR: - return _ITRON_Task_Clarify_get_id_error( tskid ); - - case OBJECTS_LOCAL: - if (_States_Is_dormant( the_thread->current_state )) - _ITRON_return_errorno( E_OBJ ); - - if (( tskpri <= 0 ) || ( tskpri >= 256 )) - _ITRON_return_errorno( E_PAR ); - - new_priority = _ITRON_Task_Priority_to_Core( tskpri ); - the_thread->real_priority = new_priority; - - /* - * The priority should not be changed until later if priority - * inheratance has occured. - */ - - if ( the_thread->resource_count == 0 || - the_thread->current_priority > new_priority ) - _Thread_Change_priority( the_thread, new_priority, FALSE ); - - break; - } - - _ITRON_return_errorno( E_OK ); -} - - diff --git a/c/src/exec/itron/src/cre_mbf.c b/c/src/exec/itron/src/cre_mbf.c deleted file mode 100644 index 18b40c1520..0000000000 --- a/c/src/exec/itron/src/cre_mbf.c +++ /dev/null @@ -1,89 +0,0 @@ -/* - * ITRON Message Buffer Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/msgbuffer.h> -#include <rtems/itron/task.h> - -/* - * cre_mbf - Create MessageBuffer - */ - -ER cre_mbf( - ID mbfid, - T_CMBF *pk_cmbf -) -{ - CORE_message_queue_Attributes the_msgq_attributes; - ITRON_Message_buffer_Control *the_message_buffer; - - /* - * Bad pointer to the attributes structure - */ - - if ( !pk_cmbf ) - return E_PAR; - - /* - * Bits were set that were note defined. - */ - - if (pk_cmbf->mbfatr & ~(TA_TPRI)) - return E_RSATR; - - if (pk_cmbf->bufsz < 0 || pk_cmbf->maxmsz < 0) - return E_PAR; - - if (pk_cmbf->bufsz < pk_cmbf->maxmsz) - return E_PAR; - - _Thread_Disable_dispatch(); /* prevents deletion */ - - the_message_buffer = _ITRON_Message_buffer_Allocate(mbfid); - if ( !the_message_buffer ) { - _Thread_Enable_dispatch(); - return _ITRON_Message_buffer_Clarify_allocation_id_error(mbfid); - } - - if ( pk_cmbf->mbfatr & TA_TPRI ) - the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; - else - the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; - - _CORE_message_queue_Initialize( - &the_message_buffer->message_queue, - &the_msgq_attributes, - pk_cmbf->bufsz / pk_cmbf->maxmsz, - pk_cmbf->maxmsz - ); - - _ITRON_Objects_Open( &_ITRON_Message_buffer_Information, - &the_message_buffer->Object ); - - /* - * If multiprocessing were supported, this is where we would announce - * the existence of the semaphore to the rest of the system. - */ - -#if defined(RTEMS_MULTIPROCESSING) -#endif - - _Thread_Enable_dispatch(); - - return E_OK; -} diff --git a/c/src/exec/itron/src/cre_mbx.c b/c/src/exec/itron/src/cre_mbx.c deleted file mode 100644 index ed586512f5..0000000000 --- a/c/src/exec/itron/src/cre_mbx.c +++ /dev/null @@ -1,107 +0,0 @@ -/* - * ITRON 3.0 Mailbox Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/mbox.h> -#include <rtems/itron/task.h> - -/* - * cre_mbx - Create Mailbox - * - * Creates a Mailbox according to the following spec: - * - * ------Parameters------------------------- - * ID mbxid MailboxID - * T_CMBX *pk_cmbx Packet to Create Mailbox - * ----------------------------------------- - * -*pk_cmbx members*- - * VP exinf ExtendedInformation - * ATR mbxatr MailboxAttributes - * (the use of the following information - * is implementation dependent) - * INT bufcnt BufferMessageCount - * (CPU and/or implementation-dependent information - * may also be included) - * - * ----Return Parameters-------------------- - * ER ercd ErrorCode - * ----------------------------------------- - * - * - * ----C Language Interface----------------- - * ER ercd = cre_mbx ( ID mbxid, T_CMBX *pk_cmbx ) ; - * ----------------------------------------- - * - */ - -ER cre_mbx( - ID mbxid, - T_CMBX *pk_cmbx -) -{ - register ITRON_Mailbox_Control *the_mailbox; - CORE_message_queue_Attributes the_mailbox_attributes; - - if ( !pk_cmbx ) - return E_PAR; - - if ((pk_cmbx->mbxatr & (TA_TPRI | TA_MPRI)) != 0 ) - return E_RSATR; - - _Thread_Disable_dispatch(); /* protects object pointer */ - - the_mailbox = _ITRON_Mailbox_Allocate( mbxid ); - if ( !the_mailbox ) { - _Thread_Enable_dispatch(); - return _ITRON_Mailbox_Clarify_allocation_id_error( mbxid ); - } - - the_mailbox->count = pk_cmbx->bufcnt; - if (pk_cmbx->mbxatr & TA_MPRI) - the_mailbox->do_message_priority = TRUE; - else - the_mailbox->do_message_priority = FALSE; - - if (pk_cmbx->mbxatr & TA_TPRI) - the_mailbox_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; - else - the_mailbox_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; - - if ( !_CORE_message_queue_Initialize( - &the_mailbox->message_queue, - OBJECTS_ITRON_MAILBOXES, - &the_mailbox_attributes, - the_mailbox->count, - sizeof(T_MSG *), - NULL ) ) { /* Multiprocessing not supported */ - _ITRON_Mailbox_Free(the_mailbox); - _ITRON_return_errorno( E_OBJ ); - } - - _ITRON_Objects_Open( &_ITRON_Mailbox_Information, &the_mailbox->Object ); - - /* - * If multiprocessing were supported, this is where we would announce - * the existence of the semaphore to the rest of the system. - */ - -#if defined(RTEMS_MULTIPROCESSING) -#endif - - _ITRON_return_errorno( E_OK ); -} diff --git a/c/src/exec/itron/src/cre_sem.c b/c/src/exec/itron/src/cre_sem.c deleted file mode 100644 index 44671a3921..0000000000 --- a/c/src/exec/itron/src/cre_sem.c +++ /dev/null @@ -1,98 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/semaphore.h> -#include <rtems/itron/task.h> -#include <rtems/score/tod.h> - -/* - * cre_sem - Create Semaphore - * - * This function implements the ITRON 3.0 cre_sem() service. - */ - -ER cre_sem( - ID semid, - T_CSEM *pk_csem -) -{ - CORE_semaphore_Attributes the_semaphore_attributes; - ITRON_Semaphore_Control *the_semaphore; - - /* - * Bad pointer to the attributes structure - */ - - if ( !pk_csem ) - return E_PAR; - - /* - * Bits were set that were note defined. - */ - - if ( pk_csem->sematr & _ITRON_SEMAPHORE_UNUSED_ATTRIBUTES ) - return E_RSATR; - - /* - * Initial semaphore count exceeds the maximum. - */ - - if ( pk_csem->isemcnt > pk_csem->maxsem ) - return E_PAR; - - /* - * This error is not in the specification but this condition - * does not make sense. - */ - - if ( pk_csem->maxsem == 0 ) - return E_PAR; - - _Thread_Disable_dispatch(); /* prevents deletion */ - - the_semaphore = _ITRON_Semaphore_Allocate( semid ); - if ( !the_semaphore ) { - _Thread_Enable_dispatch(); - return _ITRON_Semaphore_Clarify_allocation_id_error( semid ); - } - - if ( pk_csem->sematr & TA_TPRI ) - the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; - else - the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; - - the_semaphore_attributes.maximum_count = pk_csem->maxsem; - - _CORE_semaphore_Initialize( - &the_semaphore->semaphore, - &the_semaphore_attributes, - pk_csem->isemcnt - ); - - _ITRON_Objects_Open( &_ITRON_Semaphore_Information, &the_semaphore->Object ); - - /* - * If multiprocessing were supported, this is where we would announce - * the existence of the semaphore to the rest of the system. - */ - -#if defined(RTEMS_MULTIPROCESSING) -#endif - - _Thread_Enable_dispatch(); - return E_OK; -} diff --git a/c/src/exec/itron/src/cre_tsk.c b/c/src/exec/itron/src/cre_tsk.c deleted file mode 100644 index 892722e766..0000000000 --- a/c/src/exec/itron/src/cre_tsk.c +++ /dev/null @@ -1,124 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - - -/* - * cre_tsk - Create Task - */ - -ER cre_tsk( - ID tskid, - T_CTSK *pk_ctsk -) -{ - register Thread_Control *the_thread; - boolean status; - Priority_Control core_priority; - - /* - * Validate Parameters. - */ - - if ( pk_ctsk == NULL ) - return E_PAR; - - if ((pk_ctsk->tskatr != TA_ASM ) && - (pk_ctsk->tskatr != TA_HLNG) && - (pk_ctsk->tskatr != TA_COP0) && - (pk_ctsk->tskatr != TA_COP1) && - (pk_ctsk->tskatr != TA_COP2) && - (pk_ctsk->tskatr != TA_COP3) && - (pk_ctsk->tskatr != TA_COP4) && - (pk_ctsk->tskatr != TA_COP5) && - (pk_ctsk->tskatr != TA_COP6) && - (pk_ctsk->tskatr != TA_COP7)) - return E_RSATR; - - if (( pk_ctsk->itskpri <= 0 ) || ( pk_ctsk->itskpri >= 256 )) - return E_PAR; - if ( pk_ctsk->task == NULL ) - return E_PAR; - if ( pk_ctsk->stksz < 0 ) - return E_PAR; - - /* - * Disable dispatching. - */ - - _Thread_Disable_dispatch(); - - /* - * allocate the thread. - */ - - the_thread = _ITRON_Task_Allocate( tskid ); - if ( !the_thread ) - _ITRON_return_errorno( _ITRON_Task_Clarify_allocation_id_error( tskid ) ); - - /* - * Initialize the core thread for this task. - */ - - core_priority = _ITRON_Task_Priority_to_Core( pk_ctsk->itskpri ); - status = _Thread_Initialize( - &_ITRON_Task_Information, - the_thread, - NULL, - pk_ctsk->stksz, -#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) - TRUE, /* XXX - All tasks FP (if the HW supports it) for now */ -#else - FALSE, -#endif - core_priority, - TRUE, /* preemptible */ - THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE, - NULL, /* no budget algorithm callout */ - 0, - NULL - ); - - if ( !status ) { - _ITRON_Task_Free( the_thread ); - _ITRON_return_errorno( E_NOMEM ); - } - - /* - * This insures we evaluate the process-wide signals pending when we - * first run. - * - * NOTE: Since the thread starts with all unblocked, this is necessary. - */ - - the_thread->do_post_task_switch_extension = TRUE; - - the_thread->Start.entry_point = (Thread_Entry) pk_ctsk->task; - - _ITRON_return_errorno( E_OK ); -} - - - - diff --git a/c/src/exec/itron/src/del_mbf.c b/c/src/exec/itron/src/del_mbf.c deleted file mode 100644 index 4f89cf8f8c..0000000000 --- a/c/src/exec/itron/src/del_mbf.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * ITRON Message Buffer Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/msgbuffer.h> -#include <rtems/itron/task.h> - -/* - * del_mbf - Delete MessageBuffer - */ - -ER del_mbf( - ID mbfid -) -{ - ITRON_Message_buffer_Control *the_message_buffer; - Objects_Locations location; - - the_message_buffer = _ITRON_Message_buffer_Get(mbfid, &location); - switch (location) { - case OBJECTS_REMOTE: - case OBJECTS_ERROR: /* Multiprocessing not supported */ - return _ITRON_Message_buffer_Clarify_get_id_error(mbfid); - - case OBJECTS_LOCAL: - _CORE_message_queue_Flush(&the_message_buffer->message_queue); - _ITRON_Objects_Close( &_ITRON_Message_buffer_Information, - &the_message_buffer->Object); - _ITRON_Message_buffer_Free(the_message_buffer); - - /* - * If multiprocessing were supported, this is where we would announce - * the existence of the semaphore to the rest of the system. - */ - -#if defined(RTEMS_MULTIPROCESSING) -#endif - _Thread_Enable_dispatch(); - return E_OK; - } - - return E_OK; -} diff --git a/c/src/exec/itron/src/del_mbx.c b/c/src/exec/itron/src/del_mbx.c deleted file mode 100644 index e448336502..0000000000 --- a/c/src/exec/itron/src/del_mbx.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * ITRON 3.0 Mailbox Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/mbox.h> -#include <rtems/itron/task.h> - -/* - * del_mbx - Delete Mailbox - * - * - * ------Parameters-------------- - * ID mbxid The Mailbox's ID - * ------------------------------ - * - * -----Return Parameters------- - * ER ercd Itron Error Code - * ----------------------------- - * - * -----C Language Interface---- - * ER ercd = del_mbx(ID mbxid); - * ----------------------------- - * - */ - -ER del_mbx( - ID mbxid -) -{ - register ITRON_Mailbox_Control *the_mailbox; - Objects_Locations location; - - the_mailbox= _ITRON_Mailbox_Get( mbxid, &location ); - switch ( location ) { - case OBJECTS_ERROR: - case OBJECTS_REMOTE: - return _ITRON_Mailbox_Clarify_get_id_error( mbxid ); - - case OBJECTS_LOCAL: - _Objects_Close( &_ITRON_Mailbox_Information, &the_mailbox->Object ); - - _CORE_message_queue_Close( - &the_mailbox->message_queue, - NULL, /* Multiprocessing not supported */ - CORE_MESSAGE_QUEUE_STATUS_WAS_DELETED - ); - - _ITRON_Mailbox_Free(the_mailbox); - break; - } - - _ITRON_return_errorno( E_OK ); -} diff --git a/c/src/exec/itron/src/del_sem.c b/c/src/exec/itron/src/del_sem.c deleted file mode 100644 index 4d507bd8bd..0000000000 --- a/c/src/exec/itron/src/del_sem.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/semaphore.h> -#include <rtems/itron/task.h> -#include <rtems/score/tod.h> - -/* - * del_sem - Delete Semaphore - * - * This function implements the ITRON 3.0 del_sem() service. - */ - -ER del_sem( - ID semid -) -{ - ITRON_Semaphore_Control *the_semaphore; - Objects_Locations location; - - the_semaphore = _ITRON_Semaphore_Get( semid, &location ); - switch ( location ) { - case OBJECTS_REMOTE: /* Multiprocessing not supported */ - case OBJECTS_ERROR: - return _ITRON_Semaphore_Clarify_get_id_error( semid ); - - case OBJECTS_LOCAL: - _CORE_semaphore_Flush( - &the_semaphore->semaphore, - NULL, /* Multiprocessing not supported */ - CORE_SEMAPHORE_WAS_DELETED - ); - - _ITRON_Objects_Close( - &_ITRON_Semaphore_Information, - &the_semaphore->Object - ); - - _ITRON_Semaphore_Free( the_semaphore ); - - /* - * If multiprocessing were supported, this is where we would announce - * the destruction of the semaphore to the rest of the system. - */ - -#if defined(RTEMS_MULTIPROCESSING) -#endif - - _Thread_Enable_dispatch(); - return E_OK; - - } - return E_OK; -} diff --git a/c/src/exec/itron/src/del_tsk.c b/c/src/exec/itron/src/del_tsk.c deleted file mode 100644 index 4b4a5b45c0..0000000000 --- a/c/src/exec/itron/src/del_tsk.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - - -/* - * del_tsk - Delete Task - */ - -ER del_tsk( - ID tskid -) -{ - register Thread_Control *the_thread; - Objects_Locations location; - ER result = E_OK; /* to avoid warning */ - - the_thread = _ITRON_Task_Get( tskid, &location ); - switch ( location ) { - case OBJECTS_REMOTE: - case OBJECTS_ERROR: - return _ITRON_Task_Clarify_get_id_error( tskid ); - - case OBJECTS_LOCAL: - - if ( _Thread_Is_executing( the_thread ) ) - _ITRON_return_errorno( E_OBJ ); - - if ( !_States_Is_dormant( the_thread->current_state ) ) - _ITRON_return_errorno( E_OBJ ); - - result = _ITRON_Delete_task( the_thread ); - break; - } - - _ITRON_return_errorno( result ); -} - diff --git a/c/src/exec/itron/src/dis_dsp.c b/c/src/exec/itron/src/dis_dsp.c deleted file mode 100644 index 3c83e8788a..0000000000 --- a/c/src/exec/itron/src/dis_dsp.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - - -/* - * dis_dsp - Disable Dispatch - */ - -ER dis_dsp( void ) -{ - /* - * Disable dispatch for protection - */ - - _Thread_Disable_dispatch(); - - return E_OK; -} - - diff --git a/c/src/exec/itron/src/ena_dsp.c b/c/src/exec/itron/src/ena_dsp.c deleted file mode 100644 index d4abd4f0c4..0000000000 --- a/c/src/exec/itron/src/ena_dsp.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - - -/* - * ena_dsp - Enable Dispatch - */ - -ER ena_dsp( void ) -{ - _Thread_Enable_dispatch(); - - return E_OK; -} - diff --git a/c/src/exec/itron/src/eventflags.c b/c/src/exec/itron/src/eventflags.c deleted file mode 100644 index 86296fca5d..0000000000 --- a/c/src/exec/itron/src/eventflags.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/eventflags.h> - -/* - * _ITRON_Eventflags_Manager_initialization - * - * This routine initializes all event flags manager related data structures. - * - * Input parameters: - * maximum_eventflags - maximum configured eventflags - * - * Output parameters: NONE - */ - -void _ITRON_Eventflags_Manager_initialization( - unsigned32 maximum_eventflags -) -{ - _Objects_Initialize_information( - &_ITRON_Eventflags_Information, /* object information table */ - OBJECTS_ITRON_API, /* object API */ - OBJECTS_ITRON_EVENTFLAGS, /* object class */ - maximum_eventflags, /* maximum objects of this class */ - sizeof( ITRON_Eventflags_Control ), - /* size of this object's control block */ - FALSE, /* TRUE if names for this object are strings */ - ITRON_MAXIMUM_NAME_LENGTH /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - FALSE, /* TRUE if this is a global object class */ - NULL /* Proxy extraction support callout */ -#endif - ); - - /* - * Register the MP Process Packet routine. - * - * NOTE: No MP Support YET in RTEMS ITRON implementation. - */ - -} - -/* - * cre_flg - Create Eventflag - */ - -ER cre_flg( - ID flgid, - T_CFLG *pk_cflg -) -{ - return E_OK; -} - -/* - * del_flg - Delete Eventflag - */ - -ER del_flg( - ID flgid -) -{ - return E_OK; -} - -/* - * set_flg - Set Eventflag - */ - -ER set_flg( - ID flgid, - UINT setptn -) -{ - return E_OK; -} - -/* - * clr_flg - Clear Eventflag - */ - -ER clr_flg( - ID flgid, - UINT clrptn -) -{ - return E_OK; -} - -/* - * wai_flg - Wait on Eventflag - */ - -ER wai_flg( - UINT *p_flgptn, - ID flgid, - UINT waiptn, - UINT wfmode -) -{ - return E_OK; -} - -/* - * pol_flg - Wait for Eventflag(Polling) - */ - -ER pol_flg( - UINT *p_flgptn, - ID flgid, - UINT waiptn, - UINT wfmode -) -{ - return E_OK; -} - -/* - * twai_flg - Wait on Eventflag with Timeout - */ - -ER twai_flg( - UINT *p_flgptn, - ID flgid, - UINT waiptn, - UINT wfmode, - TMO tmout -) -{ - return E_OK; -} - -/* - * ref_flg - Reference Eventflag Status - */ - -ER ref_flg( - T_RFLG *pk_rflg, - ID flgid -) -{ - return E_OK; -} - diff --git a/c/src/exec/itron/src/exd_tsk.c b/c/src/exec/itron/src/exd_tsk.c deleted file mode 100644 index 2d6432da13..0000000000 --- a/c/src/exec/itron/src/exd_tsk.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> -#include <assert.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - -/* - * exd_tsk - Exit and Delete Task - */ - -void exd_tsk( void ) -{ - Objects_Information *the_information; - - _Thread_Disable_dispatch(); - - the_information = _Objects_Get_information( _Thread_Executing->Object.id ); - - /* This should never happen if _Thread_Get() works right */ - assert( the_information ); - - _Thread_Set_state( _Thread_Executing, STATES_DORMANT ); - _ITRON_Delete_task( _Thread_Executing ); - - _Thread_Enable_dispatch(); -} - diff --git a/c/src/exec/itron/src/ext_tsk.c b/c/src/exec/itron/src/ext_tsk.c deleted file mode 100644 index b9e4b6f4da..0000000000 --- a/c/src/exec/itron/src/ext_tsk.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - - -/* - * ext_tsk - Exit Issuing Task - */ - -void ext_tsk( void ) -{ - /* - * Figure out what to do if this happens. - * We can not return regardless - if ( _ITRON_Is_in_non_task_state() ) - return E_CTX; - */ - - _Thread_Disable_dispatch(); - - _Thread_Set_state( _Thread_Executing, STATES_DORMANT ); - _Thread_Reset( _Thread_Executing, NULL, 0 ); - - _Thread_Enable_dispatch(); -} diff --git a/c/src/exec/itron/src/fmempool.c b/c/src/exec/itron/src/fmempool.c deleted file mode 100644 index 0058a2a090..0000000000 --- a/c/src/exec/itron/src/fmempool.c +++ /dev/null @@ -1,143 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/fmempool.h> - -/* - * _ITRON_Fixed_memory_pool_Manager_initialization - * - * This routine initializes all fixed memory pool manager related - * data structures. - * - * Input parameters: - * maximum_fixed_memory_pools - maximum configured fixed memory pools - * - * Output parameters: NONE - */ - -void _ITRON_Fixed_memory_pool_Manager_initialization( - unsigned32 maximum_fixed_memory_pools -) -{ - _Objects_Initialize_information( - &_ITRON_Fixed_memory_pool_Information, /* object information table */ - OBJECTS_ITRON_API, /* object API */ - OBJECTS_ITRON_FIXED_MEMORY_POOLS, /* object class */ - maximum_fixed_memory_pools, /* maximum objects of this class */ - sizeof( ITRON_Fixed_memory_pool_Control ), - /* size of this object's control block */ - FALSE, /* TRUE if names for this object are strings */ - ITRON_MAXIMUM_NAME_LENGTH /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - FALSE, /* TRUE if this is a global object class */ - NULL /* Proxy extraction support callout */ -#endif - ); - - /* - * Register the MP Process Packet routine. - * - * NOTE: No MP Support YET in RTEMS ITRON implementation. - */ - -} - -/* - * cre_mpf - Create Fixed-Size Memorypool - */ - -ER cre_mpf( - ID mpfid, - T_CMPF *pk_cmpf -) -{ - return E_OK; -} - -/* - * del_mpf - Delete Fixed-Size Memorypool - */ - -ER del_mpf( - ID mpfid -) -{ - return E_OK; -} - -/* - * get_blf - Get Fixed-Size Memory Block - */ - -ER get_blf( - VP *p_blf, - ID mpfid -) -{ - return E_OK; -} - -/* - * pget_blf - Poll and Get Fixed-Size Memory Block - */ - -ER pget_blf( - VP *p_blf, - ID mpfid -) -{ - return E_OK; -} - -/* - * tget_blf - Get Fixed-Size Memory Block with Timeout - */ - -ER tget_blf( - VP *p_blf, - ID mpfid, - TMO tmout -) -{ - return E_OK; -} - -/* - * rel_blf - Release Fixed-Size Memory Block - */ - -ER rel_blf( - ID mpfid, - VP blf -) -{ - return E_OK; -} - -/* - * ref_mpf - Reference Fixed-Size Memorypool Status - */ - -ER ref_mpf( - T_RMPF *pk_rmpf, - ID mpfid -) -{ - return E_OK; -} - diff --git a/c/src/exec/itron/src/frsm_tsk.c b/c/src/exec/itron/src/frsm_tsk.c deleted file mode 100644 index c77238afc1..0000000000 --- a/c/src/exec/itron/src/frsm_tsk.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - - -/* - * frsm_tsk - Forcibly Resume Suspended Task - */ - -ER frsm_tsk( - ID tskid -) -{ - register Thread_Control *the_thread; - Objects_Locations location; - - the_thread = _ITRON_Task_Get( tskid, &location ); - switch ( location ) { - case OBJECTS_REMOTE: - case OBJECTS_ERROR: - return _ITRON_Task_Clarify_get_id_error( tskid ); - - case OBJECTS_LOCAL: - if ( _Thread_Is_executing( the_thread ) ) - _ITRON_return_errorno( E_OBJ ); - - if (_States_Is_dormant( the_thread->current_state )) - _ITRON_return_errorno( E_OBJ ); - - if ( ! _States_Is_suspended(the_thread->current_state) ) - _ITRON_return_errorno( E_OK ); - - _Thread_Resume( the_thread, TRUE ); - break; - } - - _ITRON_return_errorno( E_OK ); - -} - - diff --git a/c/src/exec/itron/src/get_tid.c b/c/src/exec/itron/src/get_tid.c deleted file mode 100644 index a082291714..0000000000 --- a/c/src/exec/itron/src/get_tid.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - -/* - * get_tid - Get Task Identifier - */ - -ER get_tid( - ID *p_tskid -) -{ - /* - * This does not support multiprocessing. The id handling will have - * to be enhanced to support multiprocessing. - */ - - *p_tskid = _Objects_Get_index( _Thread_Executing->Object.id ); - return E_OK; -} - diff --git a/c/src/exec/itron/src/itronintr.c b/c/src/exec/itron/src/itronintr.c deleted file mode 100644 index 7aaa57fe8f..0000000000 --- a/c/src/exec/itron/src/itronintr.c +++ /dev/null @@ -1,111 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/intr.h> - -/* - * def_int - Define Interrupt Handler - */ - -ER def_int( - UINT dintno, - T_DINT *pk_dint -) -{ - return E_OK; -} - -/* - * ret_int - Return from Interrupt Handler - */ - -void ret_int( void ) -{ -} - -/* - * ret_wup - Return and Wakeup Task - */ - -void ret_wup( - ID tskid -) -{ -} - -/* - * loc_cpu - Lock CPU - */ - -ER loc_cpu( void ) -{ - return E_OK; -} - -/* - * unl_cpu - Unlock CPU - */ - -ER unl_cpu( void ) -{ - return E_OK; -} - -/* - * dis_int - Disable Interrupt - */ - -ER dis_int( - UINT eintno -) -{ - return E_OK; -} - -/* - * ena_int - Enable Interrupt - */ - -ER ena_int( - UINT eintno -) -{ - return E_OK; -} - -/* - * chg_iXX - Change Interrupt Mask(Level or Priority) - */ - -ER chg_iXX( - UINT iXXXX -) -{ - return E_OK; -} - -/* - * ref_iXX - Reference Interrupt Mask(Level or Priority) - */ - -ER ref_iXX( - UINT *p_iXXXX -) -{ - return E_OK; -} - diff --git a/c/src/exec/itron/src/itronsem.c b/c/src/exec/itron/src/itronsem.c deleted file mode 100644 index adb3637b83..0000000000 --- a/c/src/exec/itron/src/itronsem.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/semaphore.h> -#include <rtems/itron/task.h> -#include <rtems/score/tod.h> - -/* - * _ITRON_Semaphore_Manager_initialization - * - * DESCRIPTION: - * - * This routine initializes all semaphore manager related data structures. - * - * Input parameters: - * maximum_semaphores - maximum configured semaphores - * - * Output parameters: NONE - */ - -void _ITRON_Semaphore_Manager_initialization( - unsigned32 maximum_semaphores -) -{ - _Objects_Initialize_information( - &_ITRON_Semaphore_Information, /* object information table */ - OBJECTS_ITRON_API, /* object API */ - OBJECTS_ITRON_SEMAPHORES, /* object class */ - maximum_semaphores, /* maximum objects of this class */ - sizeof( ITRON_Semaphore_Control ), /* size of this object's control block */ - FALSE, /* TRUE if names for this object are strings */ - ITRON_MAXIMUM_NAME_LENGTH /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - FALSE, /* TRUE if this is a global object class */ - NULL /* Proxy extraction support callout */ -#endif - ); - - /* - * Register the MP Process Packet routine. - * - * NOTE: No MP Support YET in RTEMS ITRON implementation. - */ - -} - diff --git a/c/src/exec/itron/src/itrontime.c b/c/src/exec/itron/src/itrontime.c deleted file mode 100644 index fda7f9e030..0000000000 --- a/c/src/exec/itron/src/itrontime.c +++ /dev/null @@ -1,248 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/tod.h> - -#include <rtems/itron/time.h> - -/* - * set_tim - Set System Clock - */ - -void converTime(SYSTIME ms, TOD_Control *time) -{ - int millisecond; - -/* XXX need to dereference structure */ -#if 0 - milisecond = ms % 1000; - tempSecond = ms / 1000; -#else - millisecond = 0; -#endif -} - - -/* - * set_tim - Set System Clock - */ - -ER set_tim( - SYSTIME *pk_tim -) -{ - Watchdog_Interval temp; /* an integer in seconds after conversion from SYSTIME */ - TOD_Control the_tod; - -/* convert *pk_tim which is 48 bits integer in binary into an ordinary - integer in milliseconds */ - -/* XXX */ temp = 0; - if(temp > 0) { - _Thread_Disable_dispatch(); - _TOD_Set(&the_tod, temp); - _Thread_Enable_dispatch(); - if(_TOD_Validate(&the_tod)){ - return E_OK; - } - } - return E_SYS; -} - -/* - * get_tim - Get System Clock - */ - -ER get_tim( - SYSTIME *pk_tim -) -{ - return E_OK; -} - -/* - * dly_tsk - Delay Task - */ - -ER dly_tsk( - DLYTIME dlytim -) -{ - Watchdog_Interval ticks; - - ticks = TOD_MILLISECONDS_TO_TICKS(dlytim); - - _Thread_Disable_dispatch(); - if ( ticks == 0 ) { - _Thread_Yield_processor(); - } else { - _Thread_Set_state( _Thread_Executing, STATES_DELAYING ); - _Watchdog_Initialize( - &_Thread_Executing->Timer, - _Thread_Delay_ended, - _Thread_Executing->Object.id, - NULL - ); - _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); - } - _Thread_Enable_dispatch(); - return E_OK; -} - -/* - * def_cyc - Define Cyclic Handler - */ - -ER def_cyc( - HNO cycno, - T_DCYC *pk_dcyc -) -{ - Watchdog_Control *object; -#if 0 - Watchdog_Interval timeInterval; -#endif - -/* XXX */ object = 0; - if ( pk_dcyc->cycatr != TA_HLNG) - return E_RSATR; -#if 0 - timeInterval = pk_dcyc->cyctim / 1000; - object->delta_interval = timeInterval; -#endif - _Watchdog_Initialize( - object, - pk_dcyc->cychdr, - cycno, - pk_dcyc->exinf); - _Watchdog_Deactivate(object); - - return E_OK; -} - -/* - * act_cyc - Activate Cyclic Handler - */ - -ER act_cyc( - HNO cycno, - UINT cycact -) -{ - Watchdog_Control *object; - - if(cycact != TCY_OFF || cycact != TCY_ON) - return E_PAR; - -#if 0 - if( object->Object_ID != cycno) - return E_NOEXS; -#endif - - _Watchdog_Activate(object); - - return E_OK; -} - -/* - * ref_cyc - Reference Cyclic Handler Status - */ - -ER ref_cyc( - T_RCYC *pk_rcyc, - HNO cycno -) -{ -#if 0 - int timeElapse_since_actCyclic; -#endif - T_DCYC *pk_dcyc; -#if 0 - Watchdog_Control *object; -#endif - -/* XXX */ pk_dcyc = 0; - -/* XXX will to use a "get" routine to map from id to object pointer */ -/* XXX and the object pointer should be of type specific to this manager */ -#if 0 - if( object->Object_ID == cycno)) -#else - if ( 1 ) -#endif - { - pk_rcyc->exinf = pk_dcyc->exinf; - pk_rcyc->cycact = pk_dcyc->cycact; -#if 0 - pk_rcyc->lfttim = pk_dcyc->cyctim - timeElapse_since_actCyclic; -#endif - - return E_OK; - } - else - return E_NOEXS; -} - -/* - * def_alm - Define Alarm Handler - */ - -ER def_alm( - HNO almno, - T_DALM *pk_dalm -) -{ -#if 0 - Objects_Control *objectAlrm; - Watchdog_Interval timeInterval; - - timeInterval = pk_dalm->almtim / 1000; - (void) _Watchdog_Remove(&objectAlrm); - _Watchdog_Initialize( - objectAlrm, - pk_dalm->almhdr, - almno, - pk_dalm->exinf); - _Watchdong_Insert_seconds(objectAlrm,timeInterval); - _Thread_Enable_dispatch(); -#endif - - return E_OK; -} - -/* - * ref_alm - Reference Alarm Handler Status - */ - -ER ref_alm( - T_RALM *pk_ralm, - HNO almno -) -{ - - return E_OK; -} - -/* - * ret_tmr - Return from Timer Handler - */ - -void ret_tmr( void ) -{ -} - diff --git a/c/src/exec/itron/src/mbox.c b/c/src/exec/itron/src/mbox.c deleted file mode 100644 index 7990a11976..0000000000 --- a/c/src/exec/itron/src/mbox.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * ITRON 3.0 Mailbox Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/mbox.h> -#include <rtems/itron/task.h> - -/* - * _ITRON_Mailbox_Manager_initialization - * - * This routine initializes all mailboxes manager related data structures. - * - * Input parameters: - * maximum_mailboxes - maximum configured mailboxes - * - * Output parameters: NONE - */ - -void _ITRON_Mailbox_Manager_initialization( - unsigned32 maximum_mailboxes -) -{ - _Objects_Initialize_information( - &_ITRON_Mailbox_Information, /* object information table */ - OBJECTS_ITRON_API, /* object API */ - OBJECTS_ITRON_MAILBOXES, /* object class */ - maximum_mailboxes, /* maximum objects of this class */ - sizeof( ITRON_Mailbox_Control ), /* size of this object's control block */ - FALSE, /* TRUE if names for this object are strings */ - ITRON_MAXIMUM_NAME_LENGTH /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - FALSE, /* TRUE if this is a global object class */ - NULL /* Proxy extraction support callout */ -#endif - ); - - /* - * Register the MP Process Packet routine. - * - * NOTE: No MP Support YET in RTEMS ITRON implementation. - */ - -} diff --git a/c/src/exec/itron/src/mboxtranslatereturncode.c b/c/src/exec/itron/src/mboxtranslatereturncode.c deleted file mode 100644 index 6931d3b2b5..0000000000 --- a/c/src/exec/itron/src/mboxtranslatereturncode.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * ITRON 3.0 Mailbox Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/mbox.h> -#include <rtems/itron/task.h> - -/* - * _ITRON_Mailbox_Translate_core_message_queue_return_code - * - * This routine translates a core message queue object status - * into the appropriate ITRON status code. - */ - -ER _ITRON_Mailbox_Translate_core_message_queue_return_code( - CORE_message_queue_Status status -) -{ - switch (status) { - case CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL: - return E_OK; - case CORE_MESSAGE_QUEUE_STATUS_TOO_MANY: - return E_TMOUT; - case CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE: - return E_PAR; - case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT: - return E_TMOUT; - case CORE_MESSAGE_QUEUE_STATUS_TIMEOUT: - return E_TMOUT; - default: - return E_ID; - } -} diff --git a/c/src/exec/itron/src/msgbuffer.c b/c/src/exec/itron/src/msgbuffer.c deleted file mode 100644 index df49314ec6..0000000000 --- a/c/src/exec/itron/src/msgbuffer.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * ITRON Message Buffer Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/msgbuffer.h> -#include <rtems/itron/task.h> - -/* - * _ITRON_Message_buffer_Manager_initialization - * - * This routine initializes all message buffer manager related data - * structures. - * - * Input parameters: - * maximum_message_buffers - maximum configured message buffers - * - * Output parameters: NONE - */ - -void _ITRON_Message_buffer_Manager_initialization( - unsigned32 maximum_message_buffers -) -{ - _Objects_Initialize_information( - &_ITRON_Message_buffer_Information, /* object information table */ - OBJECTS_ITRON_API, /* object API */ - OBJECTS_ITRON_MESSAGE_BUFFERS, /* object class */ - maximum_message_buffers, /* maximum objects of this class */ - sizeof( ITRON_Message_buffer_Control ), - /* size of this object's control block */ - FALSE, /* TRUE if names for this object are strings */ - ITRON_MAXIMUM_NAME_LENGTH /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - FALSE, /* TRUE if this is a global object class */ - NULL /* Proxy extraction support callout */ -#endif - ); - - /* - * Register the MP Process Packet routine. - * - * NOTE: No MP Support YET in RTEMS ITRON implementation. - */ -} - diff --git a/c/src/exec/itron/src/msgbuffertranslatereturncode.c b/c/src/exec/itron/src/msgbuffertranslatereturncode.c deleted file mode 100644 index bfb82007c0..0000000000 --- a/c/src/exec/itron/src/msgbuffertranslatereturncode.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * ITRON Message Buffer Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/msgbuffer.h> -#include <rtems/itron/task.h> - -/* - * _ITRON_Message_buffer_Translate_core_message_buffer_return_code - * - * This routine translates a core message buffer object status - * into the appropriate ITRON status code. - */ - -ER _ITRON_Message_buffer_Translate_core_message_buffer_return_code( - CORE_message_queue_Status status -) -{ - switch (status) { - case CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL: - return E_OK; - case CORE_MESSAGE_QUEUE_STATUS_TOO_MANY: - return E_TMOUT; - case CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE: - return E_PAR; - case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT: - return E_TMOUT; - case CORE_MESSAGE_QUEUE_STATUS_TIMEOUT: - return E_TMOUT; - default: - return E_ID; - } -} diff --git a/c/src/exec/itron/src/network.c b/c/src/exec/itron/src/network.c deleted file mode 100644 index e359dd4933..0000000000 --- a/c/src/exec/itron/src/network.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/network.h> - -/* - * nrea_dat - Read Data from another Node - */ - -ER nrea_dat( - INT *p_reasz, - VP dstadr, - NODE srcnode, - VP srcadr, - INT datsz -) -{ - return E_OK; -} - -/* - * nwri_dat - Write Data to another Node - */ - -ER nwri_dat( - INT *p_wrisz, - NODE dstnode, - VP dstadr, - VP srcadr, - INT datsz -) -{ - return E_OK; -} - -/* - * nget_nod - Get Local Node Number - */ - -ER nget_nod( - NODE *p_node -) -{ - return E_OK; -} - -/* - * nget_ver - Get Version Information of another Node - */ - -ER nget_ver( - T_VER *pk_ver, - NODE node -) -{ - return E_OK; -} - diff --git a/c/src/exec/itron/src/port.c b/c/src/exec/itron/src/port.c deleted file mode 100644 index 4377368d22..0000000000 --- a/c/src/exec/itron/src/port.c +++ /dev/null @@ -1,212 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/port.h> - -/* - * _ITRON_Port_Manager_initialization - * - * This routine initializes all ports manager related data structures. - * - * Input parameters: - * maximum_ports - maximum configured ports - * - * Output parameters: NONE - */ - -void _ITRON_Port_Manager_initialization( - unsigned32 maximum_ports -) -{ - _Objects_Initialize_information( - &_ITRON_Port_Information, /* object information table */ - OBJECTS_ITRON_API, /* object API */ - OBJECTS_ITRON_PORTS, /* object class */ - maximum_ports, /* maximum objects of this class */ - sizeof( ITRON_Port_Control ), /* size of this object's control block */ - FALSE, /* TRUE if names for this object are strings */ - ITRON_MAXIMUM_NAME_LENGTH /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - FALSE, /* TRUE if this is a global object class */ - NULL /* Proxy extraction support callout */ -#endif - ); - - /* - * Register the MP Process Packet routine. - * - * NOTE: No MP Support YET in RTEMS ITRON implementation. - */ - -} - -/* - * cre_por - Create Port for Rendezvous - */ - -ER cre_por( - ID porid, - T_CPOR *pk_cpor -) -{ - return E_OK; -} - -/* - * del_por - Delete Port for Rendezvous - */ - -ER del_por( - ID porid -) -{ - return E_OK; -} - -/* - * cal_por - Call Port for Rendezvous Poll - */ - -ER cal_por( - VP msg, - INT *p_rmsgsz, - ID porid, - UINT calptn, - INT cmsgsz -) -{ - return E_OK; -} - -/* - * pcal_por - Poll and Call Port for Rendezvous - */ - -ER pcal_por( - VP msg, - INT *p_rmsgsz, - ID porid, - UINT calptn, - INT cmsgsz -) -{ - return E_OK; -} - -/* - * tcal_por - Call Port for Rendezvous with Timeout - */ - -ER tcal_por( - VP msg, - INT *p_rmsgsz, - ID porid, - UINT calptn, - INT cmsgsz, - TMO tmout -) -{ - return E_OK; -} - -/* - * acp_por - Accept Port for Rendezvous Poll - */ - -ER acp_por( - RNO *p_rdvno, - VP msg, - INT *p_cmsgsz, - ID porid, - UINT acpptn -) -{ - return E_OK; -} - -/* - * pacp_por - Poll and Accept Port for Rendezvous - */ - -ER pacp_por( - RNO *p_rdvno, - VP msg, - INT *p_cmsgsz, - ID porid, - UINT acpptn -) -{ - return E_OK; -} - -/* - * tacp_por - Accept Port for Rendezvous with Timeout - */ - -ER tacp_por( - RNO *p_rdvno, - VP msg, - INT *p_cmsgsz, - ID porid, - UINT acpptn, - TMO tmout -) -{ - return E_OK; -} - -/* - * fwd_por - Forward Rendezvous to Other Port - */ - -ER fwd_por( - ID porid, - UINT calptn, - RNO rdvno, - VP msg, - INT cmsgsz -) -{ - return E_OK; -} - -/* - * rpl_rdv - Reply Rendezvous - */ - -ER rpl_rdv( - RNO rdvno, - VP msg, - INT rmsgsz -) -{ - return E_OK; -} - -/* - * ref_por - Reference Port Status - */ - -ER ref_por( - T_RPOR *pk_rpor, - ID porid -) -{ - return E_OK; -} - diff --git a/c/src/exec/itron/src/prcv_mbf.c b/c/src/exec/itron/src/prcv_mbf.c deleted file mode 100644 index 5376e23e41..0000000000 --- a/c/src/exec/itron/src/prcv_mbf.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * ITRON Message Buffer Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/msgbuffer.h> -#include <rtems/itron/task.h> - -/* - * prcv_mbf - Poll and Receive Message from MessageBuffer - */ - -ER prcv_mbf( - VP msg, - INT *p_msgsz, - ID mbfid -) -{ - return trcv_mbf(msg, p_msgsz, mbfid, TMO_POL); -} diff --git a/c/src/exec/itron/src/prcv_mbx.c b/c/src/exec/itron/src/prcv_mbx.c deleted file mode 100644 index b7c6b6b841..0000000000 --- a/c/src/exec/itron/src/prcv_mbx.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * ITRON 3.0 Mailbox Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/mbox.h> -#include <rtems/itron/task.h> - -/* - * prcv_msg - Poll and Receive Message from Mailbox - */ - -ER prcv_msg( - T_MSG **ppk_msg, - ID mbxid -) -{ - return trcv_msg( ppk_msg, mbxid, TMO_POL ); -} diff --git a/c/src/exec/itron/src/preq_sem.c b/c/src/exec/itron/src/preq_sem.c deleted file mode 100644 index db1473cb51..0000000000 --- a/c/src/exec/itron/src/preq_sem.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/semaphore.h> -#include <rtems/itron/task.h> -#include <rtems/score/tod.h> - -/* - * preq_sem - Poll and Request Semaphore - * - * This function implements the ITRON 3.0 preq_sem() service. - */ - -ER preq_sem( - ID semid -) -{ - return twai_sem( semid, TMO_POL ); -} diff --git a/c/src/exec/itron/src/psnd_mbf.c b/c/src/exec/itron/src/psnd_mbf.c deleted file mode 100644 index e86e2ff244..0000000000 --- a/c/src/exec/itron/src/psnd_mbf.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * ITRON Message Buffer Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/msgbuffer.h> -#include <rtems/itron/task.h> - -/* - * psnd_mbf - Poll and Send Message to MessageBuffer - */ - -ER psnd_mbf( - ID mbfid, - VP msg, - INT msgsz -) -{ - return tsnd_mbf( mbfid, msg, msgsz, TMO_POL ); -} diff --git a/c/src/exec/itron/src/rcv_mbf.c b/c/src/exec/itron/src/rcv_mbf.c deleted file mode 100644 index 05dc57ba02..0000000000 --- a/c/src/exec/itron/src/rcv_mbf.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * ITRON Message Buffer Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/msgbuffer.h> -#include <rtems/itron/task.h> - -/* - * rcv_mbf - Receive Message from MessageBuffer - */ - -ER rcv_mbf( - VP msg, - INT *p_msgsz, - ID mbfid -) -{ - return trcv_mbf(msg, p_msgsz, mbfid, TMO_FEVR); -} diff --git a/c/src/exec/itron/src/rcv_mbx.c b/c/src/exec/itron/src/rcv_mbx.c deleted file mode 100644 index ae5a4f613a..0000000000 --- a/c/src/exec/itron/src/rcv_mbx.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * ITRON 3.0 Mailbox Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/mbox.h> -#include <rtems/itron/task.h> - -/* - * rcv_msg - Receive Message from Mailbox - */ - -ER rcv_msg( - T_MSG **ppk_msg, - ID mbxid -) -{ - return trcv_msg( ppk_msg, mbxid, TMO_FEVR ); -} diff --git a/c/src/exec/itron/src/ref_mbf.c b/c/src/exec/itron/src/ref_mbf.c deleted file mode 100644 index 113870c0d6..0000000000 --- a/c/src/exec/itron/src/ref_mbf.c +++ /dev/null @@ -1,83 +0,0 @@ -/* - * ITRON Message Buffer Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/msgbuffer.h> -#include <rtems/itron/task.h> - -/* - * ref_mbf - Reference Message Buffer Status - */ - -ER ref_mbf( - T_RMBF *pk_rmbf, - ID mbfid -) -{ - ITRON_Message_buffer_Control *the_message_buffer; - Objects_Locations location; - CORE_message_queue_Control *the_core_msgq; - - if ( !pk_rmbf ) - return E_PAR; /* XXX check this error code */ - - the_message_buffer = _ITRON_Message_buffer_Get( mbfid, &location ); - switch ( location ) { - case OBJECTS_REMOTE: /* Multiprocessing not supported */ - case OBJECTS_ERROR: - return _ITRON_Message_buffer_Clarify_get_id_error( mbfid ); - - case OBJECTS_LOCAL: - the_core_msgq = &the_message_buffer->message_queue; - - /* - * Fill in the size of message to be sent - */ - - if (the_core_msgq->number_of_pending_messages == 0) { - pk_rmbf->msgsz = 0; - } else { - pk_rmbf->msgsz = ((CORE_message_queue_Buffer_control *) - the_core_msgq->Pending_messages.first)->Contents.size; - } - - /* - * Fill in the size of free buffer - */ - - pk_rmbf->frbufsz = - (the_core_msgq->maximum_pending_messages - - the_core_msgq->number_of_pending_messages) * - the_core_msgq->maximum_message_size; - - - /* - * Fill in whether or not there is a waiting task - */ - - if ( !_Thread_queue_First(&the_core_msgq->Wait_queue ) ) - pk_rmbf->wtsk = FALSE; - else - pk_rmbf->wtsk = TRUE; - - pk_rmbf->stsk = FALSE; - _Thread_Enable_dispatch(); - return E_OK; - } - return E_OK; -} diff --git a/c/src/exec/itron/src/ref_mbx.c b/c/src/exec/itron/src/ref_mbx.c deleted file mode 100644 index 6ae4e597bd..0000000000 --- a/c/src/exec/itron/src/ref_mbx.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * ITRON 3.0 Mailbox Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/mbox.h> -#include <rtems/itron/task.h> - -/* - * ref_mbx - Reference Mailbox Status - */ - -ER ref_mbx( - T_RMBX *pk_rmbx, - ID mbxid -) -{ - register ITRON_Mailbox_Control *the_mailbox; - Objects_Locations location; - Chain_Control *pending; - - if ( !pk_rmbx ) - return E_PAR; - - the_mailbox = _ITRON_Mailbox_Get( mbxid, &location ); - switch ( location ) { - case OBJECTS_REMOTE: - case OBJECTS_ERROR: - return _ITRON_Mailbox_Clarify_get_id_error( mbxid ); - - case OBJECTS_LOCAL: - - pending = &the_mailbox->message_queue.Pending_messages; - if ( _Chain_Is_empty( pending ) ) - pk_rmbx->pk_msg = NULL; - else - pk_rmbx->pk_msg = (T_MSG *) pending->first; - - /* - * Fill in whether or not there is a waiting task - */ - - if ( !_Thread_queue_First( &the_mailbox->message_queue.Wait_queue ) ) - pk_rmbx->wtsk = FALSE; - else - pk_rmbx->wtsk = TRUE; - - break; - } - _ITRON_return_errorno( E_OK ); -} - diff --git a/c/src/exec/itron/src/ref_sem.c b/c/src/exec/itron/src/ref_sem.c deleted file mode 100644 index b10625615b..0000000000 --- a/c/src/exec/itron/src/ref_sem.c +++ /dev/null @@ -1,66 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/semaphore.h> -#include <rtems/itron/task.h> -#include <rtems/score/tod.h> - -/* - * ref_sem - Reference Semaphore Status - * - * This function implements the ITRON 3.0 ref_sem() service. - */ - -ER ref_sem( - ID semid, - T_RSEM *pk_rsem -) -{ - ITRON_Semaphore_Control *the_semaphore; - Objects_Locations location; - - if ( !pk_rsem ) - return E_PAR; /* XXX check this error code */ - - the_semaphore = _ITRON_Semaphore_Get( semid, &location ); - switch ( location ) { - case OBJECTS_REMOTE: /* Multiprocessing not supported */ - case OBJECTS_ERROR: - return _ITRON_Semaphore_Clarify_get_id_error( semid ); - - case OBJECTS_LOCAL: - /* - * Fill in the current semaphore count - */ - - pk_rsem->semcnt = _CORE_semaphore_Get_count( &the_semaphore->semaphore ); - - /* - * Fill in whether or not there is a waiting task - */ - - if ( !_Thread_queue_First( &the_semaphore->semaphore.Wait_queue ) ) - pk_rsem->wtsk = FALSE; - else - pk_rsem->wtsk = TRUE; - - _Thread_Enable_dispatch(); - return E_OK; - } - return E_OK; -} - diff --git a/c/src/exec/itron/src/ref_tsk.c b/c/src/exec/itron/src/ref_tsk.c deleted file mode 100644 index ec28c4f45e..0000000000 --- a/c/src/exec/itron/src/ref_tsk.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - - -/* - * ref_tsk - Reference Task Status - */ - -ER ref_tsk( - T_RTSK *pk_rtsk, - ID tskid -) -{ - register Thread_Control *the_thread; - Objects_Locations location; - Priority_Control core_priority; - - if (!pk_rtsk) - return E_PAR; - - the_thread = _ITRON_Task_Get( tskid, &location ); - switch ( location ) { - case OBJECTS_REMOTE: - case OBJECTS_ERROR: - return _ITRON_Task_Clarify_get_id_error( tskid ); - - case OBJECTS_LOCAL: - - if ( location != OBJECTS_LOCAL ) - return _ITRON_Task_Clarify_get_id_error( tskid ); - - /* - * The following are extended functions [level X ]. - * XXX - tskwait, wid, wupcnt, and tskatr are presently not implemented. - */ - - pk_rtsk->tskwait = 0; - pk_rtsk->wid = 0; - pk_rtsk->wupcnt = 0; - pk_rtsk->suscnt = the_thread->suspend_count; - pk_rtsk->tskatr = 0; /* XXX - Not correctly implemented */ - pk_rtsk->task = (FP) the_thread->Start.entry_point; - core_priority = the_thread->Start.initial_priority; - pk_rtsk->itskpri = _ITRON_Task_Core_to_Priority( core_priority ); - pk_rtsk->stksz = the_thread->Start.Initial_stack.size; - - /* - * The following are required. - */ - - pk_rtsk->exinf = NULL; /* extended information */ - pk_rtsk->tskpri = - _ITRON_Task_Core_to_Priority(the_thread->current_priority); - - /* - * Mask in the tskstat information - * Convert the task state XXX double check this - */ - - pk_rtsk->tskstat = 0; - if ( the_thread == _Thread_Executing ) - pk_rtsk->tskstat |= TTS_RUN; - if ( _States_Is_ready(the_thread->current_state) ) - pk_rtsk->tskstat |= TTS_RDY; - if ( _States_Is_dormant( the_thread->current_state) ) - pk_rtsk->tskstat |= TTS_DMT; - if ( _States_Is_suspended(the_thread->current_state) ) - pk_rtsk->tskstat |= TTS_SUS; - if ( _States_Is_blocked(the_thread->current_state) ) - pk_rtsk->tskstat |= TTS_WAI; - - break; - } - - _ITRON_return_errorno( E_OK ); - -} - - - - diff --git a/c/src/exec/itron/src/rel_wai.c b/c/src/exec/itron/src/rel_wai.c deleted file mode 100644 index 6c7b47dbf4..0000000000 --- a/c/src/exec/itron/src/rel_wai.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - -/* - * rel_wai - Release Wait of Other Task - */ - -ER rel_wai( - ID tskid -) -{ - register Thread_Control *the_thread; - Objects_Locations location; - - the_thread = _ITRON_Task_Get( tskid, &location ); - switch ( location ) { - case OBJECTS_REMOTE: - case OBJECTS_ERROR: - return _ITRON_Task_Clarify_get_id_error( tskid ); - - case OBJECTS_LOCAL: - /* - * XXX - FILL ME IN. - */ - - break; - } - - _ITRON_return_errorno( E_OK ); -} - - - diff --git a/c/src/exec/itron/src/rot_rdq.c b/c/src/exec/itron/src/rot_rdq.c deleted file mode 100644 index 56a992d558..0000000000 --- a/c/src/exec/itron/src/rot_rdq.c +++ /dev/null @@ -1,57 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - -/* - * rot_rdq - Rotate Tasks on the Ready Queue - */ - -ER rot_rdq( - PRI tskpri -) -{ - PRI priority; - - - if (( tskpri <= 0 ) || ( tskpri >= 256 )) - return E_PAR; - - _Thread_Disable_dispatch(); - - /* - * Yield of processor will rotate the queue for this processor. - */ - - priority = _ITRON_Task_Core_to_Priority(_Thread_Executing->current_priority); - if ( priority == tskpri ) - _Thread_Yield_processor(); - else { - _Thread_Rotate_Ready_Queue( _ITRON_Task_Core_to_Priority( tskpri ) ); - } - _Thread_Enable_dispatch(); - - return E_OK; -} - - diff --git a/c/src/exec/itron/src/rsm_tsk.c b/c/src/exec/itron/src/rsm_tsk.c deleted file mode 100644 index 2c4946f6a4..0000000000 --- a/c/src/exec/itron/src/rsm_tsk.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - - -/* - * rsm_tsk - Resume Suspended Task - */ - -ER rsm_tsk( - ID tskid -) -{ - register Thread_Control *the_thread; - Objects_Locations location; - - the_thread = _ITRON_Task_Get( tskid, &location ); - switch ( location ) { - case OBJECTS_REMOTE: - case OBJECTS_ERROR: - return _ITRON_Task_Clarify_get_id_error( tskid ); - - case OBJECTS_LOCAL: - - if ( _Thread_Is_executing( the_thread ) ) - _ITRON_return_errorno( E_OBJ ); - - if ( _States_Is_dormant( the_thread->current_state )) - _ITRON_return_errorno( E_OBJ ); - - if ( ! _States_Is_suspended(the_thread->current_state) ) - _ITRON_return_errorno( E_OK ); - - _Thread_Resume( the_thread, FALSE ); - break; - } - - _ITRON_return_errorno( E_OK ); -} - diff --git a/c/src/exec/itron/src/sig_sem.c b/c/src/exec/itron/src/sig_sem.c deleted file mode 100644 index 90bf6d36c1..0000000000 --- a/c/src/exec/itron/src/sig_sem.c +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/semaphore.h> -#include <rtems/itron/task.h> -#include <rtems/score/tod.h> - -/* - * sig_sem - Signal Semaphore - * - * This function implements the ITRON 3.0 sig_sem() service. - */ - -ER sig_sem( - ID semid -) -{ - ITRON_Semaphore_Control *the_semaphore; - Objects_Locations location; - CORE_semaphore_Status status; - - the_semaphore = _ITRON_Semaphore_Get( semid, &location ); - switch ( location ) { - case OBJECTS_REMOTE: /* Multiprocessing not supported */ - case OBJECTS_ERROR: - return _ITRON_Semaphore_Clarify_get_id_error( semid ); - - case OBJECTS_LOCAL: - /* - * XXX maxsemcnt - */ - - status = _CORE_semaphore_Surrender( - &the_semaphore->semaphore, - the_semaphore->Object.id, - NULL /* Multiprocessing not supported */ - ); - _Thread_Enable_dispatch(); - return _ITRON_Semaphore_Translate_core_semaphore_return_code( status ); - } - return E_OK; -} diff --git a/c/src/exec/itron/src/slp_tsk.c b/c/src/exec/itron/src/slp_tsk.c deleted file mode 100644 index 0e22f34a80..0000000000 --- a/c/src/exec/itron/src/slp_tsk.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - - - -/* - * slp_tsk - Sleep Task - */ - -ER slp_tsk( void ) -{ - return E_OK; -} diff --git a/c/src/exec/itron/src/snd_mbf.c b/c/src/exec/itron/src/snd_mbf.c deleted file mode 100644 index 08142ab15b..0000000000 --- a/c/src/exec/itron/src/snd_mbf.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * ITRON Message Buffer Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/msgbuffer.h> -#include <rtems/itron/task.h> - -/* - * snd_mbf - Send Message to MessageBuffer - */ - -ER snd_mbf( - ID mbfid, - VP msg, - INT msgsz -) -{ - return tsnd_mbf( mbfid, msg, msgsz, TMO_FEVR ); -} diff --git a/c/src/exec/itron/src/snd_mbx.c b/c/src/exec/itron/src/snd_mbx.c deleted file mode 100644 index 588eb8585c..0000000000 --- a/c/src/exec/itron/src/snd_mbx.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * ITRON 3.0 Mailbox Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/mbox.h> -#include <rtems/itron/task.h> - -/* - * snd_msg - Send Message to Mailbox - */ - -ER snd_msg( - ID mbxid, - T_MSG *pk_msg -) -{ - register ITRON_Mailbox_Control *the_mailbox; - Objects_Locations location; - unsigned32 message_priority; - void *message_contents; - CORE_message_queue_Status msg_status; - - if ( !pk_msg ) - return E_PAR; - - the_mailbox = _ITRON_Mailbox_Get( mbxid, &location ); - switch ( location ) { - case OBJECTS_REMOTE: - case OBJECTS_ERROR: - return _ITRON_Mailbox_Clarify_get_id_error( mbxid ); - - case OBJECTS_LOCAL: - if ( the_mailbox->do_message_priority ) - message_priority = pk_msg->msgpri; - else - message_priority = CORE_MESSAGE_QUEUE_SEND_REQUEST; - - message_contents = pk_msg; - msg_status = _CORE_message_queue_Submit( - &the_mailbox->message_queue, - &message_contents, - sizeof(T_MSG *), - the_mailbox->Object.id, - NULL, /* multiprocessing not supported */ - message_priority, - FALSE, /* do not allow sender to block */ - 0 /* no timeout */ - ); - break; - } - - _ITRON_return_errorno( - _ITRON_Mailbox_Translate_core_message_queue_return_code( msg_status ) - ); -} diff --git a/c/src/exec/itron/src/sta_tsk.c b/c/src/exec/itron/src/sta_tsk.c deleted file mode 100644 index 5675eca9b2..0000000000 --- a/c/src/exec/itron/src/sta_tsk.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - - -/* - * sta_tsk - Start Task - */ - -ER sta_tsk( - ID tskid, - INT stacd -) -{ - register Thread_Control *the_thread; - Objects_Locations location; - boolean status; - - the_thread = _ITRON_Task_Get( tskid, &location ); - switch ( location ) { - case OBJECTS_REMOTE: - case OBJECTS_ERROR: - return _ITRON_Task_Clarify_get_id_error( tskid ); - - case OBJECTS_LOCAL: - - if ( !_States_Is_dormant( the_thread->current_state ) ) - _ITRON_return_errorno( E_OBJ ); - - status = _Thread_Start( - the_thread, - THREAD_START_NUMERIC, /* XXX should be able to say we have no arg */ - the_thread->Start.entry_point, - 0, /* XXX supercore forces us to have an arg */ - 0 /* unused */ - ); - - /* - * This error can not happen entry_point is checked in create. - if ( !status ) - _ITRON_return_errorno( E_OBJ ); - */ - - break; - } - - _ITRON_return_errorno( E_OK ); -} - - - - diff --git a/c/src/exec/itron/src/sus_tsk.c b/c/src/exec/itron/src/sus_tsk.c deleted file mode 100644 index b40be824ea..0000000000 --- a/c/src/exec/itron/src/sus_tsk.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <limits.h> -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - - -/* - * Task-Dependent Synchronization Functions - */ - -/* - * sus_tsk - Suspend Other Task - */ - -ER sus_tsk( - ID tskid -) -{ - register Thread_Control *the_thread; - Objects_Locations location; - - the_thread = _ITRON_Task_Get( tskid, &location ); - switch ( location ) { - case OBJECTS_REMOTE: - case OBJECTS_ERROR: - return _ITRON_Task_Clarify_get_id_error( tskid ); - - case OBJECTS_LOCAL: - - if ( _Thread_Is_executing( the_thread ) ) - _ITRON_return_errorno( E_OBJ ); - - if (the_thread->suspend_count == INT_MAX ) - _ITRON_return_errorno( E_QOVR ); - - _Thread_Suspend( the_thread ); - break; - } - - _ITRON_return_errorno( E_OK ); -} - - - - - - - diff --git a/c/src/exec/itron/src/sysmgmt.c b/c/src/exec/itron/src/sysmgmt.c deleted file mode 100644 index 14e31c965a..0000000000 --- a/c/src/exec/itron/src/sysmgmt.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/sysmgmt.h> - -/* - * get_ver - Get Version Information - */ - -ER get_ver( - T_VER *pk_ver -) -{ - return E_OK; -} - -/* - * ref_sys - Reference System Status - */ - -ER ref_sys( - T_RSYS *pk_rsys -) -{ - return E_OK; -} - -/* - * ref_cfg - Reference Configuration Information - */ - -ER ref_cfg( - T_RCFG *pk_rcfg -) -{ - return E_OK; -} - -/* - * def_svc - Define Extended SVC Handler - */ - -ER def_svc( - FN s_fncd, - T_DSVC *pk_dsvc -) -{ - return E_OK; -} - -/* - * def_exc - Define Exception Handler - */ - -ER def_exc( - UINT exckind, - T_DEXC *pk_dexc -) -{ - return E_OK; -} - diff --git a/c/src/exec/itron/src/task.c b/c/src/exec/itron/src/task.c deleted file mode 100644 index 75c845288e..0000000000 --- a/c/src/exec/itron/src/task.c +++ /dev/null @@ -1,227 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - -/* - * _ITRON_Task_Create_extension - * - * This routine is an extension routine that is invoked as part - * of creating any type of task or thread in the system. If the - * task is created via another API, then this routine is invoked - * and this API given the opportunity to initialize its extension - * area. - */ - -boolean _ITRON_Task_Create_extension( - Thread_Control *executing, - Thread_Control *created -) -{ - ITRON_API_Control *api; - - api = _Workspace_Allocate( sizeof( ITRON_API_Control ) ); - - if ( !api ) - return FALSE; - - created->API_Extensions[ THREAD_API_ITRON ] = api; - - /* - * Initialize the ITRON API extension - */ - - return TRUE; -} - -/* - * _ITRON_Task_Delete_extension - * - * This extension routine is invoked when a task is deleted. - */ - -User_extensions_routine _ITRON_Task_Delete_extension( - Thread_Control *executing, - Thread_Control *deleted -) -{ - (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_ITRON ] ); - - deleted->API_Extensions[ THREAD_API_ITRON ] = NULL; -} - -/* - * _ITRON_Task_Initialize_user_tasks - * - * This routine creates and starts all configured user - * initialzation threads. - */ - -void _ITRON_Task_Initialize_user_tasks( void ) -{ - unsigned32 index; - unsigned32 maximum; - ER return_value; - itron_initialization_tasks_table *user_tasks; - - /* - * NOTE: This is slightly different from the Ada implementation. - */ - - user_tasks = _ITRON_Task_User_initialization_tasks; - maximum = _ITRON_Task_Number_of_initialization_tasks; - - if ( !user_tasks || maximum == 0 ) - return; - - for ( index=0 ; index < maximum ; index++ ) { - - return_value = cre_tsk( - user_tasks[ index ].id, - &user_tasks[ index ].attributes - ); - - if ( return_value != E_OK ) - _Internal_error_Occurred( INTERNAL_ERROR_ITRON_API, TRUE, return_value ); - - return_value = sta_tsk( user_tasks[ index ].id, 0 ); - - if ( return_value != E_OK ) - _Internal_error_Occurred( INTERNAL_ERROR_ITRON_API, TRUE, return_value ); - - } -} - -/*PAGE - * - * _ITRON_Delete_task - */ - -ER _ITRON_Delete_task( - Thread_Control *the_thread -) -{ - Objects_Information *the_information; - - the_information = _Objects_Get_information( the_thread->Object.id ); - if ( !the_information ) { - return E_OBJ; /* XXX - should never happen */ - } - - _Thread_Close( the_information, the_thread ); - - _ITRON_Task_Free( the_thread ); - - return E_OK; -} - -/* - * At this point in time, the ITRON API does not need any other - * extensions. See the POSIX and RTEMS API extensions for - * examples of how they can be used. - */ - -/* - * Extension Tables - */ - -API_extensions_Control _ITRON_Task_API_extensions = { - { NULL, NULL }, - NULL, /* predriver */ - _ITRON_Task_Initialize_user_tasks, /* postdriver */ - NULL /* post switch */ -}; - -User_extensions_Control _ITRON_Task_User_extensions = { - { NULL, NULL }, - { { NULL, NULL }, NULL }, - { _ITRON_Task_Create_extension, /* create */ - NULL, /* start */ - NULL, /* restart */ - _ITRON_Task_Delete_extension, /* delete */ - NULL, /* switch */ - NULL, /* begin */ - NULL, /* exitted */ - NULL /* fatal */ - } -}; - -/* - * _ITRON_Task_Manager_initialization - * - * This routine initializes all Task Manager related data structures. - * - * Input parameters: - * maximum_tasks - number of tasks to initialize - * - * Output parameters: NONE - */ - -void _ITRON_Task_Manager_initialization( - unsigned32 maximum_tasks, - unsigned32 number_of_initialization_tasks, - itron_initialization_tasks_table *user_tasks -) -{ - - _ITRON_Task_Number_of_initialization_tasks = number_of_initialization_tasks; - _ITRON_Task_User_initialization_tasks = user_tasks; - - /* - * There may not be any ITRON_initialization tasks configured. - */ - -#if 0 - if ( user_tasks == NULL || number_of_initialization_tasks == 0 ) - _Internal_error_Occurred( INTERNAL_ERROR_ITRON_API, TRUE, -1 ); -#endif - - _Objects_Initialize_information( - &_ITRON_Task_Information, /* object information table */ - OBJECTS_ITRON_API, /* object API */ - OBJECTS_ITRON_TASKS, /* object class */ - maximum_tasks, /* maximum objects of this class */ - sizeof( Thread_Control ), /* size of this object's control block */ - FALSE, /* TRUE if names for this object are strings */ - ITRON_MAXIMUM_NAME_LENGTH /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - FALSE, /* TRUE if this is a global object class */ - NULL /* Proxy extraction support callout */ -#endif - ); - - /* - * Add all the extensions for this API - */ - - _User_extensions_Add_API_set( &_ITRON_Task_User_extensions ); - - _API_extensions_Add( &_ITRON_Task_API_extensions ); - - /* - * XXX MP not supported - * Register the MP Process Packet routine. - */ - -} diff --git a/c/src/exec/itron/src/ter_tsk.c b/c/src/exec/itron/src/ter_tsk.c deleted file mode 100644 index dc0e6d3c5f..0000000000 --- a/c/src/exec/itron/src/ter_tsk.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - - -/* - * ter_tsk - Terminate Other Task - Set State to DORMANT - */ - -ER ter_tsk( - ID tskid -) -{ - register Thread_Control *the_thread; - Objects_Locations location; - - the_thread = _ITRON_Task_Get( tskid, &location ); - switch ( location ) { - case OBJECTS_REMOTE: - case OBJECTS_ERROR: - return _ITRON_Task_Clarify_get_id_error( tskid ); - - case OBJECTS_LOCAL: - - if ( _Thread_Is_executing( the_thread ) ) - _ITRON_return_errorno( E_OBJ ); - - if ( _States_Is_dormant( the_thread->current_state ) ) - _ITRON_return_errorno( E_OBJ ); - - _Thread_Restart( the_thread, NULL, 0 ); - _Thread_Set_state( the_thread, STATES_DORMANT ); - break; - } - - _ITRON_return_errorno( E_OK ); -} - - - - - - - diff --git a/c/src/exec/itron/src/trcv_mbf.c b/c/src/exec/itron/src/trcv_mbf.c deleted file mode 100644 index a83b8379bd..0000000000 --- a/c/src/exec/itron/src/trcv_mbf.c +++ /dev/null @@ -1,84 +0,0 @@ -/* - * ITRON Message Buffer Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/msgbuffer.h> -#include <rtems/itron/task.h> - -/* - * trcv_mbf - Receive Message from MessageBuffer with Timeout - */ - -ER trcv_mbf( - VP msg, - INT *p_msgsz, - ID mbfid, - TMO tmout -) -{ - ITRON_Message_buffer_Control *the_message_buffer; - Objects_Locations location; - CORE_message_queue_Status status; - boolean wait; - Watchdog_Interval interval; - - interval = 0; - if (tmout == TMO_POL) { - wait = FALSE; - } else { - wait = TRUE; - if (tmout != TMO_FEVR) - interval = TOD_MILLISECONDS_TO_TICKS(tmout); - } - - if (wait && _ITRON_Is_in_non_task_state() ) - return E_CTX; - - if (!p_msgsz || !msg || tmout <= -2) - return E_PAR; - - the_message_buffer = _ITRON_Message_buffer_Get(mbfid, &location); - switch (location) { - case OBJECTS_REMOTE: - case OBJECTS_ERROR: /* Multiprocessing not supported */ - return _ITRON_Message_buffer_Clarify_get_id_error(mbfid); - - case OBJECTS_LOCAL: - _CORE_message_queue_Seize( - &the_message_buffer->message_queue, - the_message_buffer->Object.id, - msg, - p_msgsz, - wait, - interval - ); - _Thread_Enable_dispatch(); - status = (CORE_message_queue_Status)_Thread_Executing->Wait.return_code; - return - _ITRON_Message_buffer_Translate_core_message_buffer_return_code(status); - } - - /* - * If multiprocessing were supported, this is where we would announce - * the existence of the semaphore to the rest of the system. - */ - -#if defined(RTEMS_MULTIPROCESSING) -#endif - return E_OK; -} diff --git a/c/src/exec/itron/src/trcv_mbx.c b/c/src/exec/itron/src/trcv_mbx.c deleted file mode 100644 index 0b54db03f7..0000000000 --- a/c/src/exec/itron/src/trcv_mbx.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - * ITRON 3.0 Mailbox Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/mbox.h> -#include <rtems/itron/task.h> - -/* - * trcv_msg - Receive Message from Mailbox with Timeout - */ - -ER trcv_msg( - T_MSG **ppk_msg, - ID mbxid, - TMO tmout -) -{ - register ITRON_Mailbox_Control *the_mailbox; - Watchdog_Interval interval; - boolean wait; - Objects_Locations location; - unsigned32 size; - - if (!ppk_msg) - return E_PAR; - - interval = 0; - if ( tmout == TMO_POL ) { - wait = FALSE; - } else { - wait = TRUE; - if ( tmout != TMO_FEVR ) - interval = TOD_MILLISECONDS_TO_TICKS(tmout); - } - - if ( wait && _ITRON_Is_in_non_task_state() ) - return E_CTX; - - the_mailbox = _ITRON_Mailbox_Get( mbxid, &location ); - switch ( location ) { - case OBJECTS_REMOTE: - case OBJECTS_ERROR: - return _ITRON_Mailbox_Clarify_get_id_error( mbxid ); - - case OBJECTS_LOCAL: - - _CORE_message_queue_Seize( - &the_mailbox->message_queue, - the_mailbox->Object.id, - ppk_msg, - &size, - wait, - interval - ); - break; - } - - _ITRON_return_errorno( - _ITRON_Mailbox_Translate_core_message_queue_return_code( - _Thread_Executing->Wait.return_code ) ); -} diff --git a/c/src/exec/itron/src/tslp_tsk.c b/c/src/exec/itron/src/tslp_tsk.c deleted file mode 100644 index ab297b0f6b..0000000000 --- a/c/src/exec/itron/src/tslp_tsk.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - - -/* - * tslp_tsk - Sleep Task with Timeout - */ - -ER tslp_tsk( - TMO tmout -) -{ - return E_OK; -} - - diff --git a/c/src/exec/itron/src/tsnd_mbf.c b/c/src/exec/itron/src/tsnd_mbf.c deleted file mode 100644 index 91a91f87d2..0000000000 --- a/c/src/exec/itron/src/tsnd_mbf.c +++ /dev/null @@ -1,90 +0,0 @@ -/* - * ITRON Message Buffer Manager - * - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/msgbuffer.h> -#include <rtems/itron/task.h> - -#include <assert.h> /* only for blocking */ - -/* - * tsnd_mbf - Send Message to MessageBuffer with Timeout - */ - -ER tsnd_mbf( - ID mbfid, - VP msg, - INT msgsz, - TMO tmout -) -{ - ITRON_Message_buffer_Control *the_message_buffer; - Objects_Locations location; - Watchdog_Interval interval; - boolean wait; - CORE_message_queue_Status msg_status; - - if (msgsz <= 0 || !msg) - return E_PAR; - - interval = 0; - if ( tmout == TMO_POL ) { - wait = FALSE; - } else { - wait = TRUE; - if ( tmout != TMO_FEVR ) - interval = TOD_MILLISECONDS_TO_TICKS(tmout); - } - - if ( wait && _ITRON_Is_in_non_task_state() ) - return E_CTX; - - the_message_buffer = _ITRON_Message_buffer_Get(mbfid, &location); - switch (location) { - case OBJECTS_REMOTE: - case OBJECTS_ERROR: /* Multiprocessing not supported */ - return _ITRON_Message_buffer_Clarify_get_id_error(mbfid); - - case OBJECTS_LOCAL: - /* XXX Submit needs to take into account blocking */ - msg_status = _CORE_message_queue_Submit( - &the_message_buffer->message_queue, - msg, - msgsz, - the_message_buffer->Object.id, - NULL, - CORE_MESSAGE_QUEUE_SEND_REQUEST, - wait, /* sender may block */ - interval /* timeout interval */ - ); - _Thread_Enable_dispatch(); - return _ITRON_Message_buffer_Translate_core_message_buffer_return_code( - msg_status - ); - } - - /* - * If multiprocessing were supported, this is where we would announce - * the existence of the semaphore to the rest of the system. - */ - -#if defined(RTEMS_MULTIPROCESSING) -#endif - - return E_OK; -} diff --git a/c/src/exec/itron/src/twai_sem.c b/c/src/exec/itron/src/twai_sem.c deleted file mode 100644 index 27122b7970..0000000000 --- a/c/src/exec/itron/src/twai_sem.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/semaphore.h> -#include <rtems/itron/task.h> -#include <rtems/score/tod.h> - -/* - * twai_sem - Wait on Semaphore with Timeout - * - * This function implements the ITRON 3.0 twai_sem() service. - */ - -ER twai_sem( - ID semid, - TMO tmout -) -{ - ITRON_Semaphore_Control *the_semaphore; - Objects_Locations location; - Watchdog_Interval interval; - boolean wait; - CORE_semaphore_Status status; - - interval = 0; - if ( tmout == TMO_POL ) { - wait = FALSE; - } else { - wait = TRUE; - if ( tmout != TMO_FEVR ) - interval = TOD_MILLISECONDS_TO_TICKS(tmout); - } - - if ( wait && _ITRON_Is_in_non_task_state() ) - return E_CTX; - - the_semaphore = _ITRON_Semaphore_Get( semid, &location ); - switch ( location ) { - case OBJECTS_REMOTE: /* Multiprocessing not supported */ - case OBJECTS_ERROR: - return _ITRON_Semaphore_Clarify_get_id_error( semid ); - - case OBJECTS_LOCAL: - _CORE_semaphore_Seize( - &the_semaphore->semaphore, - the_semaphore->Object.id, - wait, /* wait for a timeout */ - interval /* timeout value */ - ); - _Thread_Enable_dispatch(); - status = (CORE_semaphore_Status) _Thread_Executing->Wait.return_code; - return _ITRON_Semaphore_Translate_core_semaphore_return_code( status ); - } - return E_OK; -} diff --git a/c/src/exec/itron/src/vmempool.c b/c/src/exec/itron/src/vmempool.c deleted file mode 100644 index b1bd8cae7f..0000000000 --- a/c/src/exec/itron/src/vmempool.c +++ /dev/null @@ -1,146 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/vmempool.h> - -/* - * _ITRON_Variable_memory_pool_Manager_initialization - * - * This routine initializes all variable memory pool manager related - * data structures. - * - * Input parameters: - * maximum_variable_memory_pools - maximum configured variable memory pools - * - * Output parameters: NONE - */ - -void _ITRON_Variable_memory_pool_Manager_initialization( - unsigned32 maximum_variable_memory_pools -) -{ - _Objects_Initialize_information( - &_ITRON_Variable_memory_pool_Information, /* object information table */ - OBJECTS_ITRON_API, /* object API */ - OBJECTS_ITRON_VARIABLE_MEMORY_POOLS, /* object class */ - maximum_variable_memory_pools, /* maximum objects of this class */ - sizeof( ITRON_Variable_memory_pool_Control ), - /* size of this object's control block */ - FALSE, /* TRUE if names for this object are strings */ - ITRON_MAXIMUM_NAME_LENGTH /* maximum length of each object's name */ -#if defined(RTEMS_MULTIPROCESSING) - , - FALSE, /* TRUE if this is a global object class */ - NULL /* Proxy extraction support callout */ -#endif - ); - - /* - * Register the MP Process Packet routine. - * - * NOTE: No MP Support YET in RTEMS ITRON implementation. - */ - -} - -/* - * cre_mpl - Create Variable-Size Memorypool - */ - -ER cre_mpl( - ID mplid, - T_CMPL *pk_cmpl -) -{ - return E_OK; -} - -/* - * del_mpl - Delete Variable-Size Memorypool - */ - -ER del_mpl( - ID mplid -) -{ - return E_OK; -} - -/* - * get_blk - Get Variable-Size Memory Block - */ - -ER get_blk( - VP *p_blk, - ID mplid, - INT blksz -) -{ - return E_OK; -} - -/* - * pget_blk - Poll and Get Variable-Size Memory Block - */ - -ER pget_blk( - VP *p_blk, - ID mplid, - INT blksz -) -{ - return E_OK; -} - -/* - * tget_blk - Get Variable-Size Memory Block with Timeout - */ - -ER tget_blk( - VP *p_blk, - ID mplid, - INT blksz, - TMO tmout -) -{ - return E_OK; -} - -/* - * rel_blk - Release Variable-Size Memory Block - */ - -ER rel_blk( - ID mplid, - VP blk -) -{ - return E_OK; -} - -/* - * ref_mpl - Reference Variable-Size Memorypool Status - */ - -ER ref_mpl( - T_RMPL *pk_rmpl, - ID mplid -) -{ - return E_OK; -} - diff --git a/c/src/exec/itron/src/wai_sem.c b/c/src/exec/itron/src/wai_sem.c deleted file mode 100644 index dbcb93f2db..0000000000 --- a/c/src/exec/itron/src/wai_sem.c +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/itron/semaphore.h> -#include <rtems/itron/task.h> -#include <rtems/score/tod.h> - -/* - * wai_sem - Wait on Semaphore - * - * This function implements the ITRON 3.0 wai_sem() service. - */ - -ER wai_sem( - ID semid -) -{ - return twai_sem( semid, TMO_FEVR ); -} diff --git a/c/src/exec/itron/src/wup_tsk.c b/c/src/exec/itron/src/wup_tsk.c deleted file mode 100644 index 10f2364ebc..0000000000 --- a/c/src/exec/itron/src/wup_tsk.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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$ - */ - -#if HAVE_CONFIG_H -#include "config.h" -#endif - -#include <itron.h> - -#include <rtems/score/thread.h> -#include <rtems/score/userext.h> -#include <rtems/score/wkspace.h> -#include <rtems/score/apiext.h> -#include <rtems/score/sysstate.h> - -#include <rtems/itron/task.h> - - -/* - * wup_tsk - Wakeup Other Task - */ - -ER wup_tsk( - ID tskid -) -{ - return E_OK; -} - |