2007-04-17 Joel Sherrill <joel@OARcorp.com>

* itron/Makefile.am, itron/src/eventflags.c, itron/src/fmempool.c,
	itron/src/itronintr.c, itron/src/itrontime.c, itron/src/network.c,
	itron/src/port.c, itron/src/sysmgmt.c, itron/src/task.c,
	itron/src/vmempool.c, posix/Makefile.am, posix/src/pthread.c,
	rtems/src/taskinitusers.c, rtems/src/tasks.c,
	sapi/include/confdefs.h, sapi/src/io.c: Various modification to
	reduce executable size. Most were refactoring of files. Split ITRON
	API files. Implemented mechanism to avoid initialization task/thread
	loop being linked in when that style of task initialization was not
	being used.
	* itron/src/acp_por.c, itron/src/act_cyc.c, itron/src/cal_por.c,
	itron/src/chg_iXX.c, itron/src/clr_flg.c, itron/src/cre_flg.c,
	itron/src/cre_mpf.c, itron/src/cre_mpl.c, itron/src/cre_por.c,
	itron/src/def_alm.c, itron/src/def_cyc.c, itron/src/def_exc.c,
	itron/src/def_int.c, itron/src/def_svc.c, itron/src/del_flg.c,
	itron/src/del_mpf.c, itron/src/del_mpl.c, itron/src/del_por.c,
	itron/src/dis_int.c, itron/src/dly_tsk.c, itron/src/ena_int.c,
	itron/src/fwd_por.c, itron/src/get_blf.c, itron/src/get_blk.c,
	itron/src/get_tim.c, itron/src/get_ver.c, itron/src/itroninittasks.c,
	itron/src/loc_cpu.c, itron/src/nget_nod.c, itron/src/nget_ver.c,
	itron/src/nrea_dat.c, itron/src/nwri_dat.c, itron/src/pacp_por.c,
	itron/src/pcal_por.c, itron/src/pget_blf.c, itron/src/pget_blk.c,
	itron/src/pol_flg.c, itron/src/ref_alm.c, itron/src/ref_cfg.c,
	itron/src/ref_cyc.c, itron/src/ref_flg.c, itron/src/ref_iXX.c,
	itron/src/ref_mpf.c, itron/src/ref_mpl.c, itron/src/ref_por.c,
	itron/src/ref_sys.c, itron/src/rel_blf.c, itron/src/rel_blk.c,
	itron/src/ret_int.c, itron/src/ret_tmr.c, itron/src/ret_wup.c,
	itron/src/rpl_rdv.c, itron/src/set_flg.c, itron/src/set_tim.c,
	itron/src/tacp_por.c, itron/src/tcal_por.c, itron/src/tget_blf.c,
	itron/src/tget_blk.c, itron/src/twai_flg.c, itron/src/unl_cpu.c,
	itron/src/wai_flg.c, posix/src/pthreadinitthreads.c: New files.
This commit is contained in:
Joel Sherrill
2007-04-17 20:32:13 +00:00
parent f7588ebab7
commit 0ab34c90a2
79 changed files with 2342 additions and 1033 deletions

View File

@@ -1,3 +1,37 @@
2007-04-17 Joel Sherrill <joel@OARcorp.com>
* itron/Makefile.am, itron/src/eventflags.c, itron/src/fmempool.c,
itron/src/itronintr.c, itron/src/itrontime.c, itron/src/network.c,
itron/src/port.c, itron/src/sysmgmt.c, itron/src/task.c,
itron/src/vmempool.c, posix/Makefile.am, posix/src/pthread.c,
rtems/src/taskinitusers.c, rtems/src/tasks.c,
sapi/include/confdefs.h, sapi/src/io.c: Various modification to
reduce executable size. Most were refactoring of files. Split ITRON
API files. Implemented mechanism to avoid initialization task/thread
loop being linked in when that style of task initialization was not
being used.
* itron/src/acp_por.c, itron/src/act_cyc.c, itron/src/cal_por.c,
itron/src/chg_iXX.c, itron/src/clr_flg.c, itron/src/cre_flg.c,
itron/src/cre_mpf.c, itron/src/cre_mpl.c, itron/src/cre_por.c,
itron/src/def_alm.c, itron/src/def_cyc.c, itron/src/def_exc.c,
itron/src/def_int.c, itron/src/def_svc.c, itron/src/del_flg.c,
itron/src/del_mpf.c, itron/src/del_mpl.c, itron/src/del_por.c,
itron/src/dis_int.c, itron/src/dly_tsk.c, itron/src/ena_int.c,
itron/src/fwd_por.c, itron/src/get_blf.c, itron/src/get_blk.c,
itron/src/get_tim.c, itron/src/get_ver.c, itron/src/itroninittasks.c,
itron/src/loc_cpu.c, itron/src/nget_nod.c, itron/src/nget_ver.c,
itron/src/nrea_dat.c, itron/src/nwri_dat.c, itron/src/pacp_por.c,
itron/src/pcal_por.c, itron/src/pget_blf.c, itron/src/pget_blk.c,
itron/src/pol_flg.c, itron/src/ref_alm.c, itron/src/ref_cfg.c,
itron/src/ref_cyc.c, itron/src/ref_flg.c, itron/src/ref_iXX.c,
itron/src/ref_mpf.c, itron/src/ref_mpl.c, itron/src/ref_por.c,
itron/src/ref_sys.c, itron/src/rel_blf.c, itron/src/rel_blk.c,
itron/src/ret_int.c, itron/src/ret_tmr.c, itron/src/ret_wup.c,
itron/src/rpl_rdv.c, itron/src/set_flg.c, itron/src/set_tim.c,
itron/src/tacp_por.c, itron/src/tcal_por.c, itron/src/tget_blf.c,
itron/src/tget_blk.c, itron/src/twai_flg.c, itron/src/unl_cpu.c,
itron/src/wai_flg.c, posix/src/pthreadinitthreads.c: New files.
2007-04-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* score/include/rtems/score/thread.h:

View File

@@ -56,7 +56,8 @@ include_rtems_itron_HEADERS += inline/rtems/itron/eventflags.inl \
TASK_C_FILES = src/task.c src/cre_tsk.c src/del_tsk.c src/sta_tsk.c \
src/ext_tsk.c src/exd_tsk.c src/ter_tsk.c src/dis_dsp.c src/ena_dsp.c \
src/chg_pri.c src/rot_rdq.c src/rel_wai.c src/get_tid.c src/ref_tsk.c
src/chg_pri.c src/rot_rdq.c src/rel_wai.c src/get_tid.c src/ref_tsk.c \
src/itroninittasks.c
TASKSYNC_C_FILES = src/sus_tsk.c src/rsm_tsk.c src/frsm_tsk.c src/slp_tsk.c \
src/tslp_tsk.c src/wup_tsk.c src/can_wup.c
@@ -64,7 +65,9 @@ TASKSYNC_C_FILES = src/sus_tsk.c src/rsm_tsk.c src/frsm_tsk.c src/slp_tsk.c \
SEMAPHORE_C_FILES = src/itronsem.c src/cre_sem.c src/del_sem.c \
src/preq_sem.c src/ref_sem.c src/sig_sem.c src/twai_sem.c src/wai_sem.c
EVENTFLAGS_C_FILES = src/eventflags.c
EVENTFLAGS_C_FILES = src/eventflags.c src/cre_flg.c src/del_flg.c \
src/set_flg.c src/clr_flg.c src/wai_flg.c src/pol_flg.c \
src/twai_flg.c src/ref_flg.c
MAILBOX_C_FILES = src/mbox.c
@@ -72,19 +75,29 @@ MSGBUFFER_C_FILES = src/msgbuffer.c src/msgbuffertranslatereturncode.c \
src/cre_mbf.c src/del_mbf.c src/prcv_mbf.c src/psnd_mbf.c src/rcv_mbf.c \
src/ref_mbf.c src/snd_mbf.c src/trcv_mbf.c src/tsnd_mbf.c
RENDEZVOUS_C_FILES = src/port.c
RENDEZVOUS_C_FILES = src/port.c src/cre_por.c src/del_por.c src/cal_por.c \
src/pcal_por.c src/tcal_por.c src/acp_por.c src/pacp_por.c \
src/tacp_por.c src/fwd_por.c src/rpl_rdv.c src/ref_por.c
INTERRUPT_C_FILES = src/itronintr.c
INTERRUPT_C_FILES = src/itronintr.c src/def_int.c src/loc_cpu.c \
src/unl_cpu.c src/dis_int.c src/ena_int.c src/chg_iXX.c src/ref_iXX.c \
src/ret_int.c src/ret_wup.c
VARIABLE_MEMORY_POOL_C_FILES = src/vmempool.c
VARIABLE_MEMORY_POOL_C_FILES = src/vmempool.c src/cre_mpl.c src/del_mpl.c \
src/get_blk.c src/pget_blk.c src/tget_blk.c src/rel_blk.c src/ref_mpl.c
FIXED_MEMORY_POOL_C_FILES = src/fmempool.c
FIXED_MEMORY_POOL_C_FILES = src/fmempool.c src/cre_mpf.c src/del_mpf.c \
src/get_blf.c src/pget_blf.c src/tget_blf.c src/rel_blf.c src/ref_mpf.c
TIME_C_FILES = src/itrontime.c
TIME_C_FILES = src/itrontime.c src/set_tim.c src/get_tim.c src/dly_tsk.c \
src/def_cyc.c src/act_cyc.c src/ref_cyc.c src/def_alm.c src/ref_alm.c \
src/ret_tmr.c
CONFIGURATION_C_FILES = src/sysmgmt.c
CONFIGURATION_C_FILES = src/sysmgmt.c src/get_ver.c src/ref_sys.c \
src/ref_cfg.c src/def_svc.c src/def_exc.c
NETWORK_C_FILES = src/network.c
NETWORK_C_FILES = src/network.c src/nrea_dat.c src/nwri_dat.c \
src/nget_nod.c src/nget_ver.c
C_FILES = $(TASK_C_FILES) $(TASKSYNC_C_FILES) $(SEMAPHORE_C_FILES) \
$(EVENTFLAGS_C_FILES) $(MAILBOX_C_FILES) $(MSGBUFFER_C_FILES) \

View File

@@ -0,0 +1,33 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/port.h>
/*
* 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;
}

View File

@@ -0,0 +1,45 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/score/thread.h>
#include <rtems/score/tod.h>
#include <rtems/itron/time.h>
/*
* 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;
}

View File

@@ -0,0 +1,33 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/port.h>
/*
* cal_por - Call Port for Rendezvous Poll
*/
ER cal_por(
VP msg,
INT *p_rmsgsz,
ID porid,
UINT calptn,
INT cmsgsz
)
{
return E_OK;
}

View File

@@ -0,0 +1,29 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/intr.h>
/*
* chg_iXX - Change Interrupt Mask(Level or Priority)
*/
ER chg_iXX(
UINT iXXXX
)
{
return E_OK;
}

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/eventflags.h>
/*
* clr_flg - Clear Eventflag
*/
ER clr_flg(
ID flgid,
UINT clrptn
)
{
return E_OK;
}

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/eventflags.h>
/*
* cre_flg - Create Eventflag
*/
ER cre_flg(
ID flgid,
T_CFLG *pk_cflg
)
{
return E_OK;
}

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/fmempool.h>
/*
* cre_mpf - Create Fixed-Size Memorypool
*/
ER cre_mpf(
ID mpfid,
T_CMPF *pk_cmpf
)
{
return E_OK;
}

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/vmempool.h>
/*
* cre_mpl - Create Variable-Size Memorypool
*/
ER cre_mpl(
ID mplid,
T_CMPL *pk_cmpl
)
{
return E_OK;
}

View File

@@ -0,0 +1,31 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/port.h>
/*
* cre_por - Create Port for Rendezvous
*/
ER cre_por(
ID porid,
T_CPOR *pk_cpor
)
{
return E_OK;
}

View File

@@ -0,0 +1,48 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/score/thread.h>
#include <rtems/score/tod.h>
#include <rtems/itron/time.h>
/*
* 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;
}

View File

@@ -0,0 +1,52 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/score/thread.h>
#include <rtems/score/tod.h>
#include <rtems/itron/time.h>
/*
* 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;
}

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/sysmgmt.h>
/*
* def_exc - Define Exception Handler
*/
ER def_exc(
UINT exckind,
T_DEXC *pk_dexc
)
{
return E_OK;
}

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/intr.h>
/*
* def_int - Define Interrupt Handler
*/
ER def_int(
UINT dintno,
T_DINT *pk_dint
)
{
return E_OK;
}

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/sysmgmt.h>
/*
* def_svc - Define Extended SVC Handler
*/
ER def_svc(
FN s_fncd,
T_DSVC *pk_dsvc
)
{
return E_OK;
}

View File

@@ -0,0 +1,29 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/eventflags.h>
/*
* del_flg - Delete Eventflag
*/
ER del_flg(
ID flgid
)
{
return E_OK;
}

View File

@@ -0,0 +1,29 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/fmempool.h>
/*
* del_mpf - Delete Fixed-Size Memorypool
*/
ER del_mpf(
ID mpfid
)
{
return E_OK;
}

View File

@@ -0,0 +1,29 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/vmempool.h>
/*
* del_mpl - Delete Variable-Size Memorypool
*/
ER del_mpl(
ID mplid
)
{
return E_OK;
}

View File

@@ -0,0 +1,29 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/port.h>
/*
* del_por - Delete Port for Rendezvous
*/
ER del_por(
ID porid
)
{
return E_OK;
}

View File

@@ -0,0 +1,29 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/intr.h>
/*
* dis_int - Disable Interrupt
*/
ER dis_int(
UINT eintno
)
{
return E_OK;
}

View File

@@ -0,0 +1,50 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/score/thread.h>
#include <rtems/score/tod.h>
#include <rtems/itron/time.h>
/*
* 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;
}

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/intr.h>
/*
* ena_int - Enable Interrupt
*/
ER ena_int(
UINT eintno
)
{
return E_OK;
}

View File

@@ -1,5 +1,5 @@
/*
* COPYRIGHT (c) 1989-1999.
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -55,105 +55,3 @@ void _ITRON_Eventflags_Manager_initialization(
*/
}
/*
* 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;
}

View File

@@ -1,5 +1,5 @@
/*
* COPYRIGHT (c) 1989-1999.
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -56,87 +56,3 @@ void _ITRON_Fixed_memory_pool_Manager_initialization(
*/
}
/*
* 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;
}

View File

@@ -0,0 +1,33 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/port.h>
/*
* fwd_por - Forward Rendezvous to Other Port
*/
ER fwd_por(
ID porid,
UINT calptn,
RNO rdvno,
VP msg,
INT cmsgsz
)
{
return E_OK;
}

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/fmempool.h>
/*
* get_blf - Get Fixed-Size Memory Block
*/
ER get_blf(
VP *p_blf,
ID mpfid
)
{
return E_OK;
}

View File

@@ -0,0 +1,31 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/vmempool.h>
/*
* get_blk - Get Variable-Size Memory Block
*/
ER get_blk(
VP *p_blk,
ID mplid,
INT blksz
)
{
return E_OK;
}

View File

@@ -0,0 +1,32 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/score/thread.h>
#include <rtems/score/tod.h>
#include <rtems/itron/time.h>
/*
* get_tim - Get System Clock
*/
ER get_tim(
SYSTIME *pk_tim
)
{
return E_OK;
}

View File

@@ -0,0 +1,29 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/sysmgmt.h>
/*
* get_ver - Get Version Information
*/
ER get_ver(
T_VER *pk_ver
)
{
return E_OK;
}

View File

@@ -0,0 +1,66 @@
/*
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/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_Initialize_user_tasks
*
* This routine creates and starts all configured user
* initialzation threads.
*/
void _ITRON_Task_Initialize_user_tasks_body( void )
{
uint32_t index;
uint32_t 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 );
}
}

View File

@@ -1,5 +1,5 @@
/*
* COPYRIGHT (c) 1989-1999.
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -17,94 +17,4 @@
#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;
}
/* no ITRON API specific interrupt initialization */

View File

@@ -1,5 +1,5 @@
/*
* COPYRIGHT (c) 1989-1999.
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -20,209 +20,4 @@
#include <rtems/itron/time.h>
/*
* set_tim - Set System Clock
*/
ER set_tim(
SYSTIME *pk_tim
)
{
#if 0
struct timespec time;
/* 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(&time);
_Thread_Enable_dispatch();
return E_OK;
}
#endif
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 )
{
}
/* no initialization needed yet for ITRON time services */

View File

@@ -0,0 +1,27 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/intr.h>
/*
* loc_cpu - Lock CPU
*/
ER loc_cpu( void )
{
return E_OK;
}

View File

@@ -1,5 +1,5 @@
/*
* COPYRIGHT (c) 1989-1999.
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -17,55 +17,4 @@
#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;
}
/* no ITRON Network Manager specific initialization required */

View File

@@ -0,0 +1,29 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/network.h>
/*
* nget_nod - Get Local Node Number
*/
ER nget_nod(
NODE *p_node
)
{
return E_OK;
}

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/network.h>
/*
* nget_ver - Get Version Information of another Node
*/
ER nget_ver(
T_VER *pk_ver,
NODE node
)
{
return E_OK;
}

View File

@@ -0,0 +1,33 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/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;
}

View File

@@ -0,0 +1,34 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/network.h>
/*
* nwri_dat - Write Data to another Node
*/
ER nwri_dat(
INT *p_wrisz,
NODE dstnode,
VP dstadr,
VP srcadr,
INT datsz
)
{
return E_OK;
}

View File

@@ -0,0 +1,33 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/port.h>
/*
* 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;
}

View File

@@ -0,0 +1,33 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/port.h>
/*
* 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;
}

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/fmempool.h>
/*
* pget_blf - Poll and Get Fixed-Size Memory Block
*/
ER pget_blf(
VP *p_blf,
ID mpfid
)
{
return E_OK;
}

View File

@@ -0,0 +1,31 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/vmempool.h>
/*
* pget_blk - Poll and Get Variable-Size Memory Block
*/
ER pget_blk(
VP *p_blk,
ID mplid,
INT blksz
)
{
return E_OK;
}

View File

@@ -0,0 +1,32 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/eventflags.h>
/*
* pol_flg - Wait for Eventflag(Polling)
*/
ER pol_flg(
UINT *p_flgptn,
ID flgid,
UINT waiptn,
UINT wfmode
)
{
return E_OK;
}

View File

@@ -1,5 +1,5 @@
/*
* COPYRIGHT (c) 1989-1999.
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -54,158 +54,3 @@ void _ITRON_Port_Manager_initialization(
*/
}
/*
* 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;
}

View File

@@ -0,0 +1,33 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/score/thread.h>
#include <rtems/score/tod.h>
#include <rtems/itron/time.h>
/*
* ref_alm - Reference Alarm Handler Status
*/
ER ref_alm(
T_RALM *pk_ralm,
HNO almno
)
{
return E_OK;
}

View File

@@ -0,0 +1,29 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/sysmgmt.h>
/*
* ref_cfg - Reference Configuration Information
*/
ER ref_cfg(
T_RCFG *pk_rcfg
)
{
return E_OK;
}

View File

@@ -0,0 +1,60 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/score/thread.h>
#include <rtems/score/tod.h>
#include <rtems/itron/time.h>
/*
* 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;
}

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/eventflags.h>
/*
* ref_flg - Reference Eventflag Status
*/
ER ref_flg(
T_RFLG *pk_rflg,
ID flgid
)
{
return E_OK;
}

View File

@@ -0,0 +1,29 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/intr.h>
/*
* ref_iXX - Reference Interrupt Mask(Level or Priority)
*/
ER ref_iXX(
UINT *p_iXXXX
)
{
return E_OK;
}

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/fmempool.h>
/*
* ref_mpf - Reference Fixed-Size Memorypool Status
*/
ER ref_mpf(
T_RMPF *pk_rmpf,
ID mpfid
)
{
return E_OK;
}

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/vmempool.h>
/*
* ref_mpl - Reference Variable-Size Memorypool Status
*/
ER ref_mpl(
T_RMPL *pk_rmpl,
ID mplid
)
{
return E_OK;
}

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/port.h>
/*
* ref_por - Reference Port Status
*/
ER ref_por(
T_RPOR *pk_rpor,
ID porid
)
{
return E_OK;
}

View File

@@ -0,0 +1,29 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/sysmgmt.h>
/*
* ref_sys - Reference System Status
*/
ER ref_sys(
T_RSYS *pk_rsys
)
{
return E_OK;
}

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/fmempool.h>
/*
* rel_blf - Release Fixed-Size Memory Block
*/
ER rel_blf(
ID mpfid,
VP blf
)
{
return E_OK;
}

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/vmempool.h>
/*
* rel_blk - Release Variable-Size Memory Block
*/
ER rel_blk(
ID mplid,
VP blk
)
{
return E_OK;
}

View File

@@ -0,0 +1,26 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/intr.h>
/*
* ret_int - Return from Interrupt Handler
*/
void ret_int( void )
{
}

View File

@@ -0,0 +1,29 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/score/thread.h>
#include <rtems/score/tod.h>
#include <rtems/itron/time.h>
/*
* ret_tmr - Return from Timer Handler
*/
void ret_tmr( void )
{
}

View File

@@ -0,0 +1,28 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/intr.h>
/*
* ret_wup - Return and Wakeup Task
*/
void ret_wup(
ID tskid
)
{
}

View File

@@ -0,0 +1,31 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/port.h>
/*
* rpl_rdv - Reply Rendezvous
*/
ER rpl_rdv(
RNO rdvno,
VP msg,
INT rmsgsz
)
{
return E_OK;
}

View File

@@ -0,0 +1,30 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/eventflags.h>
/*
* set_flg - Set Eventflag
*/
ER set_flg(
ID flgid,
UINT setptn
)
{
return E_OK;
}

View File

@@ -0,0 +1,46 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/score/thread.h>
#include <rtems/score/tod.h>
#include <rtems/itron/time.h>
/*
* set_tim - Set System Clock
*/
ER set_tim(
SYSTIME *pk_tim
)
{
#if 0
struct timespec time;
/* 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(&time);
_Thread_Enable_dispatch();
return E_OK;
}
#endif
return E_SYS;
}

View File

@@ -1,5 +1,5 @@
/*
* COPYRIGHT (c) 1989-1999.
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -17,59 +17,4 @@
#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;
}
/* No ITRON API System Management Manager specific initialization required */

View File

@@ -0,0 +1,34 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/port.h>
/*
* 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;
}

View File

@@ -79,37 +79,9 @@ User_extensions_routine _ITRON_Task_Delete_extension(
void _ITRON_Task_Initialize_user_tasks( void )
{
uint32_t index;
uint32_t 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 );
}
extern void (*_ITRON_Initialize_user_tasks_p)(void);
if ( _ITRON_Initialize_user_tasks_p )
(*_ITRON_Initialize_user_tasks_p)();
}
/*PAGE

View File

@@ -0,0 +1,34 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/port.h>
/*
* 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;
}

View File

@@ -0,0 +1,31 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/fmempool.h>
/*
* tget_blf - Get Fixed-Size Memory Block with Timeout
*/
ER tget_blf(
VP *p_blf,
ID mpfid,
TMO tmout
)
{
return E_OK;
}

View File

@@ -0,0 +1,32 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/vmempool.h>
/*
* tget_blk - Get Variable-Size Memory Block with Timeout
*/
ER tget_blk(
VP *p_blk,
ID mplid,
INT blksz,
TMO tmout
)
{
return E_OK;
}

View File

@@ -0,0 +1,33 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/eventflags.h>
/*
* twai_flg - Wait on Eventflag with Timeout
*/
ER twai_flg(
UINT *p_flgptn,
ID flgid,
UINT waiptn,
UINT wfmode,
TMO tmout
)
{
return E_OK;
}

View File

@@ -0,0 +1,27 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/intr.h>
/*
* unl_cpu - Unlock CPU
*/
ER unl_cpu( void )
{
return E_OK;
}

View File

@@ -1,5 +1,5 @@
/*
* COPYRIGHT (c) 1989-1999.
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -56,90 +56,3 @@ void _ITRON_Variable_memory_pool_Manager_initialization(
*/
}
/*
* 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;
}

View File

@@ -0,0 +1,32 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <rtems/itron.h>
#include <rtems/itron/eventflags.h>
/*
* wai_flg - Wait on Eventflag
*/
ER wai_flg(
UINT *p_flgptn,
ID flgid,
UINT waiptn,
UINT wfmode
)
{
return E_OK;
}

View File

@@ -121,7 +121,8 @@ libposix_a_SOURCES += src/pthread.c src/pthreadsetcputime.c \
src/pthreadattrsetschedparam.c src/pthreadattrgetschedparam.c \
src/pthreadattrgetschedpolicy.c src/pthreadattrsetschedpolicy.c \
src/pthreadattrgetinheritsched.c src/pthreadattrsetinheritsched.c \
src/pthreadattrgetscope.c src/pthreadattrsetscope.c
src/pthreadattrgetscope.c src/pthreadattrsetscope.c \
src/pthreadinitthreads.c
## PSIGNAL_C_FILES
libposix_a_SOURCES += src/psignal.c src/alarm.c src/kill.c src/killinfo.c \

View File

@@ -268,44 +268,9 @@ User_extensions_routine _POSIX_Threads_Exitted_extension(
void _POSIX_Threads_Initialize_user_threads( void )
{
int status;
uint32_t index;
uint32_t maximum;
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
user_threads = _POSIX_Threads_User_initialization_threads;
maximum = _POSIX_Threads_Number_of_initialization_threads;
if ( !user_threads || maximum == 0 )
return;
/*
* Be careful .. if the default attribute set changes, this may need to.
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
status = pthread_attr_init( &attr );
assert( !status );
status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
assert( !status );
status = pthread_attr_setstacksize( &attr, user_threads[ index ].stack_size);
assert( !status );
status = pthread_create(
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
assert( !status );
}
extern void (*_POSIX_Threads_Initialize_user_threads_p)(void);
if ( _POSIX_Threads_Initialize_user_threads_p )
(*_POSIX_Threads_Initialize_user_threads_p)();
}
/*PAGE

View File

@@ -0,0 +1,88 @@
/*
* COPYRIGHT (c) 1989-2007.
* 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.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <assert.h>
#include <errno.h>
#include <pthread.h>
#include <limits.h>
#include <rtems/system.h>
#include <rtems/score/apiext.h>
#include <rtems/score/stack.h>
#include <rtems/score/thread.h>
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <rtems/posix/cancel.h>
#include <rtems/posix/pthread.h>
#include <rtems/posix/priority.h>
#include <rtems/posix/psignal.h>
#include <rtems/posix/config.h>
#include <rtems/posix/key.h>
#include <rtems/posix/time.h>
/*PAGE
*
* _POSIX_Threads_Initialize_user_threads_body
*
* This routine creates and starts all configured user
* initialzation threads.
*
* Input parameters: NONE
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body( void )
{
int status;
uint32_t index;
uint32_t maximum;
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
user_threads = _POSIX_Threads_User_initialization_threads;
maximum = _POSIX_Threads_Number_of_initialization_threads;
if ( !user_threads || maximum == 0 )
return;
/*
* Be careful .. if the default attribute set changes, this may need to.
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
status = pthread_attr_init( &attr );
assert( !status );
status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
assert( !status );
status = pthread_attr_setstacksize( &attr, user_threads[ index ].stack_size);
assert( !status );
status = pthread_create(
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
assert( !status );
}
}

View File

@@ -2,7 +2,7 @@
* RTEMS Task Manager
*
*
* COPYRIGHT (c) 1989-1999.
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -34,7 +34,7 @@
/*PAGE
*
* _RTEMS_tasks_Initialize_user_tasks
* _RTEMS_tasks_Initialize_user_tasks_body
*
* This routine creates and starts all configured user
* initialzation threads.
@@ -44,7 +44,7 @@
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks( void )
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
uint32_t index;
uint32_t maximum;

View File

@@ -291,3 +291,22 @@ void _RTEMS_tasks_Manager_initialization(
#endif
}
/*PAGE
*
* _RTEMS_tasks_Initialize_user_tasks
*
* This routine creates and starts all configured user
* initialzation threads.
*
* Input parameters: NONE
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks( void )
{
extern void (*_RTEMS_tasks_Initialize_user_tasks_p)(void);
if ( _RTEMS_tasks_Initialize_user_tasks_p )
(*_RTEMS_tasks_Initialize_user_tasks_p)();
}

View File

@@ -1182,6 +1182,48 @@ rtems_configuration_table Configuration = {
#endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */
/*
* If the user has configured a set of Classic API Initialization Tasks,
* then we need to install the code that runs that loop.
*/
#ifdef CONFIGURE_INIT
#ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE
void (_RTEMS_tasks_Initialize_user_tasks_body)(void);
void (*_RTEMS_tasks_Initialize_user_tasks_p)(void) =
_RTEMS_tasks_Initialize_user_tasks_body;
#else
void (*_RTEMS_tasks_Initialize_user_tasks_p)(void) = NULL;
#endif
#endif
/*
* If the user has configured a set of POSIX Initialization Threads,
* then we need to install the code that runs that loop.
*/
#ifdef CONFIGURE_INIT
#ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE
void _POSIX_Threads_Initialize_user_threads_body(void);
void (*_POSIX_Threads_Initialize_user_threads_p)(void) =
_POSIX_Threads_Initialize_user_threads_body;
#else
void (*_POSIX_Threads_Initialize_user_threads_p)(void) = NULL;
#endif
#endif
/*
* If the user has configured a set of ITRON Initialization Tasks,
* then we need to install the code that runs that loop.
*/
#ifdef CONFIGURE_INIT
#ifdef CONFIGURE_ITRON_INIT_TASK_TABLE
void _ITRON_Task_Initialize_user_tasks_body(void);
void (*_ITRON_Initialize_user_tasks_p)(void) =
_ITRON_Task_Initialize_user_tasks_body;
#else
void (*_ITRON_Initialize_user_tasks_p)(void) = NULL;
#endif
#endif
#ifdef __cplusplus
}
#endif
@@ -1212,5 +1254,17 @@ rtems_configuration_table Configuration = {
#error "CONFIGURATION ERROR: No initialization tasks or threads configured!!"
#endif
/*
* These names have been obsoleted so make the user application stop compiling
*/
#if defined(CONFIGURE_TEST_NEEDS_TIMER_DRIVER) || \
defined(CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER) || \
defined(CONFIGURE_TEST_NEEDS_CLOCK_DRIVER) || \
defined(CONFIGURE_TEST_NEEDS_RTC_DRIVER) || \
defined(CONFIGURE_TEST_NEEDS_STUB_DRIVER)
#error "CONFIGURATION ERROR: CONFIGURE_TEST_XXX constants are obsolete"
#endif
#endif
/* end of include file */

View File

@@ -35,10 +35,10 @@
*/
void _IO_Manager_initialization(
rtems_driver_address_table *driver_table,
uint32_t drivers_in_table,
uint32_t number_of_drivers,
uint32_t number_of_devices
rtems_driver_address_table *driver_table,
uint32_t drivers_in_table,
uint32_t number_of_drivers,
uint32_t number_of_devices
)
{
void *tmp;
@@ -46,23 +46,9 @@ void _IO_Manager_initialization(
rtems_driver_name_t *np;
if ( number_of_drivers < drivers_in_table )
number_of_drivers = drivers_in_table;
tmp = _Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Driver_address_table = (rtems_driver_address_table *) tmp;
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
if ( drivers_in_table )
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
_IO_Driver_address_table = driver_table;
_IO_Number_of_drivers = number_of_drivers;
_IO_Number_of_devices = number_of_devices;
@@ -124,41 +110,39 @@ rtems_status_code rtems_io_register_driver(
rtems_device_major_number *registered_major
)
{
*registered_major = 0;
*registered_major = 0;
/*
* Test for initialise/open being present to indicate the driver slot is
* in use.
*/
/*
* Test for initialise/open being present to indicate the driver slot is
* in use.
*/
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
if ( major == 0 )
{
for ( major = _IO_Number_of_drivers - 1 ; major ; major-- )
if ( _IO_Driver_address_table[major].initialization_entry == 0 &&
_IO_Driver_address_table[major].open_entry == 0 )
break;
if ( major == 0 ) {
for ( major = _IO_Number_of_drivers - 1 ; major ; major-- )
if ( _IO_Driver_address_table[major].initialization_entry == 0 &&
_IO_Driver_address_table[major].open_entry == 0 )
break;
if (( major == 0 ) &&
( _IO_Driver_address_table[major].initialization_entry == 0 &&
_IO_Driver_address_table[major].open_entry == 0 ))
return RTEMS_TOO_MANY;
}
if (( major == 0 ) &&
( _IO_Driver_address_table[major].initialization_entry == 0 &&
_IO_Driver_address_table[major].open_entry == 0 ))
return RTEMS_TOO_MANY;
}
if ( _IO_Driver_address_table[major].initialization_entry == 0 &&
_IO_Driver_address_table[major].open_entry == 0 )
{
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
if ( _IO_Driver_address_table[major].initialization_entry == 0 &&
_IO_Driver_address_table[major].open_entry == 0 ) {
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
rtems_io_initialize( major, 0, NULL );
rtems_io_initialize( major, 0, NULL );
return RTEMS_SUCCESSFUL;
}
return RTEMS_SUCCESSFUL;
}
return RTEMS_RESOURCE_IN_USE;
return RTEMS_RESOURCE_IN_USE;
}
/*PAGE
@@ -176,19 +160,18 @@ rtems_status_code rtems_io_register_driver(
*/
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
rtems_device_major_number major
)
{
if ( major < _IO_Number_of_drivers )
{
memset(
&_IO_Driver_address_table[major],
0,
sizeof( rtems_driver_address_table )
);
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
if ( major < _IO_Number_of_drivers ) {
memset(
&_IO_Driver_address_table[major],
0,
sizeof( rtems_driver_address_table )
);
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
}
/*PAGE
@@ -214,31 +197,28 @@ rtems_status_code rtems_io_register_name(
rtems_device_minor_number minor
)
{
rtems_driver_name_t *np;
uint32_t level;
uint32_t index;
rtems_driver_name_t *np;
uint32_t level;
uint32_t index;
/* find an empty slot */
for( index=0, np = _IO_Driver_name_table ;
index < _IO_Number_of_devices ;
index++, np++ )
{
/* find an empty slot */
for( index=0, np = _IO_Driver_name_table ;
index < _IO_Number_of_devices ;
index++, np++ ) {
_ISR_Disable(level);
if (np->device_name == 0)
{
np->device_name = device_name;
np->device_name_length = strlen(device_name);
np->major = major;
np->minor = minor;
_ISR_Enable(level);
_ISR_Disable(level);
if (np->device_name == 0) {
np->device_name = device_name;
np->device_name_length = strlen(device_name);
np->major = major;
np->minor = minor;
_ISR_Enable(level);
return RTEMS_SUCCESSFUL;
}
_ISR_Enable(level);
}
return RTEMS_TOO_MANY;
return RTEMS_SUCCESSFUL;
}
_ISR_Enable(level);
}
return RTEMS_TOO_MANY;
}
#endif
@@ -263,13 +243,13 @@ rtems_status_code rtems_io_initialize(
void *argument
)
{
rtems_device_driver_entry callout;
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
callout = _IO_Driver_address_table[major].initialization_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
/*PAGE
@@ -293,13 +273,13 @@ rtems_status_code rtems_io_open(
void *argument
)
{
rtems_device_driver_entry callout;
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
callout = _IO_Driver_address_table[major].open_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
/*PAGE
@@ -323,13 +303,13 @@ rtems_status_code rtems_io_close(
void *argument
)
{
rtems_device_driver_entry callout;
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
/*PAGE
@@ -353,13 +333,13 @@ rtems_status_code rtems_io_read(
void *argument
)
{
rtems_device_driver_entry callout;
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
callout = _IO_Driver_address_table[major].read_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
/*PAGE
@@ -383,13 +363,13 @@ rtems_status_code rtems_io_write(
void *argument
)
{
rtems_device_driver_entry callout;
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
callout = _IO_Driver_address_table[major].write_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}
/*PAGE
@@ -413,11 +393,11 @@ rtems_status_code rtems_io_control(
void *argument
)
{
rtems_device_driver_entry callout;
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
callout = _IO_Driver_address_table[major].control_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
}