diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-04-17 20:32:13 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-04-17 20:32:13 +0000 |
commit | 0ab34c90a20c03d84cad1b357da8fbc0258be6c0 (patch) | |
tree | 7d12c026af64c5f6c33746e8c5681a9a562b2054 | |
parent | 2007-04-17 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-0ab34c90a20c03d84cad1b357da8fbc0258be6c0.tar.bz2 |
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.
79 files changed, 2349 insertions, 1040 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 519b01729c..f5524558ae 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -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: diff --git a/cpukit/itron/Makefile.am b/cpukit/itron/Makefile.am index fc8d3541a5..4be5f740f1 100644 --- a/cpukit/itron/Makefile.am +++ b/cpukit/itron/Makefile.am @@ -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) \ diff --git a/cpukit/itron/src/acp_por.c b/cpukit/itron/src/acp_por.c new file mode 100644 index 0000000000..75d72cf026 --- /dev/null +++ b/cpukit/itron/src/acp_por.c @@ -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; +} diff --git a/cpukit/itron/src/act_cyc.c b/cpukit/itron/src/act_cyc.c new file mode 100644 index 0000000000..70b0e17386 --- /dev/null +++ b/cpukit/itron/src/act_cyc.c @@ -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; +} diff --git a/cpukit/itron/src/cal_por.c b/cpukit/itron/src/cal_por.c new file mode 100644 index 0000000000..d6562914d6 --- /dev/null +++ b/cpukit/itron/src/cal_por.c @@ -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; +} diff --git a/cpukit/itron/src/chg_iXX.c b/cpukit/itron/src/chg_iXX.c new file mode 100644 index 0000000000..174cbac70b --- /dev/null +++ b/cpukit/itron/src/chg_iXX.c @@ -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; +} diff --git a/cpukit/itron/src/clr_flg.c b/cpukit/itron/src/clr_flg.c new file mode 100644 index 0000000000..1c9c6a1024 --- /dev/null +++ b/cpukit/itron/src/clr_flg.c @@ -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; +} diff --git a/cpukit/itron/src/cre_flg.c b/cpukit/itron/src/cre_flg.c new file mode 100644 index 0000000000..5097c9e435 --- /dev/null +++ b/cpukit/itron/src/cre_flg.c @@ -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; +} diff --git a/cpukit/itron/src/cre_mpf.c b/cpukit/itron/src/cre_mpf.c new file mode 100644 index 0000000000..3ac5af5d4f --- /dev/null +++ b/cpukit/itron/src/cre_mpf.c @@ -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; +} diff --git a/cpukit/itron/src/cre_mpl.c b/cpukit/itron/src/cre_mpl.c new file mode 100644 index 0000000000..1cbf20131e --- /dev/null +++ b/cpukit/itron/src/cre_mpl.c @@ -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; +} diff --git a/cpukit/itron/src/cre_por.c b/cpukit/itron/src/cre_por.c new file mode 100644 index 0000000000..b6aec2b4ed --- /dev/null +++ b/cpukit/itron/src/cre_por.c @@ -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; +} + diff --git a/cpukit/itron/src/def_alm.c b/cpukit/itron/src/def_alm.c new file mode 100644 index 0000000000..b6e9ae4bbe --- /dev/null +++ b/cpukit/itron/src/def_alm.c @@ -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; +} diff --git a/cpukit/itron/src/def_cyc.c b/cpukit/itron/src/def_cyc.c new file mode 100644 index 0000000000..131ae785ee --- /dev/null +++ b/cpukit/itron/src/def_cyc.c @@ -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; +} diff --git a/cpukit/itron/src/def_exc.c b/cpukit/itron/src/def_exc.c new file mode 100644 index 0000000000..fdc63e8b18 --- /dev/null +++ b/cpukit/itron/src/def_exc.c @@ -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; +} diff --git a/cpukit/itron/src/def_int.c b/cpukit/itron/src/def_int.c new file mode 100644 index 0000000000..0a35e7b29f --- /dev/null +++ b/cpukit/itron/src/def_int.c @@ -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; +} diff --git a/cpukit/itron/src/def_svc.c b/cpukit/itron/src/def_svc.c new file mode 100644 index 0000000000..efc96cb442 --- /dev/null +++ b/cpukit/itron/src/def_svc.c @@ -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; +} diff --git a/cpukit/itron/src/del_flg.c b/cpukit/itron/src/del_flg.c new file mode 100644 index 0000000000..4dbf91fc0b --- /dev/null +++ b/cpukit/itron/src/del_flg.c @@ -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; +} diff --git a/cpukit/itron/src/del_mpf.c b/cpukit/itron/src/del_mpf.c new file mode 100644 index 0000000000..d061079481 --- /dev/null +++ b/cpukit/itron/src/del_mpf.c @@ -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; +} diff --git a/cpukit/itron/src/del_mpl.c b/cpukit/itron/src/del_mpl.c new file mode 100644 index 0000000000..780a233ecf --- /dev/null +++ b/cpukit/itron/src/del_mpl.c @@ -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; +} diff --git a/cpukit/itron/src/del_por.c b/cpukit/itron/src/del_por.c new file mode 100644 index 0000000000..2589787a03 --- /dev/null +++ b/cpukit/itron/src/del_por.c @@ -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; +} diff --git a/cpukit/itron/src/dis_int.c b/cpukit/itron/src/dis_int.c new file mode 100644 index 0000000000..e471200843 --- /dev/null +++ b/cpukit/itron/src/dis_int.c @@ -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; +} diff --git a/cpukit/itron/src/dly_tsk.c b/cpukit/itron/src/dly_tsk.c new file mode 100644 index 0000000000..8c32613206 --- /dev/null +++ b/cpukit/itron/src/dly_tsk.c @@ -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; +} diff --git a/cpukit/itron/src/ena_int.c b/cpukit/itron/src/ena_int.c new file mode 100644 index 0000000000..693edaf5b0 --- /dev/null +++ b/cpukit/itron/src/ena_int.c @@ -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; +} + diff --git a/cpukit/itron/src/eventflags.c b/cpukit/itron/src/eventflags.c index 11039cc78d..6668677eef 100644 --- a/cpukit/itron/src/eventflags.c +++ b/cpukit/itron/src/eventflags.c @@ -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; -} diff --git a/cpukit/itron/src/fmempool.c b/cpukit/itron/src/fmempool.c index 567b7cb358..e42a7a1b6f 100644 --- a/cpukit/itron/src/fmempool.c +++ b/cpukit/itron/src/fmempool.c @@ -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; -} diff --git a/cpukit/itron/src/fwd_por.c b/cpukit/itron/src/fwd_por.c new file mode 100644 index 0000000000..3ed377ec39 --- /dev/null +++ b/cpukit/itron/src/fwd_por.c @@ -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; +} diff --git a/cpukit/itron/src/get_blf.c b/cpukit/itron/src/get_blf.c new file mode 100644 index 0000000000..9a8aabdd61 --- /dev/null +++ b/cpukit/itron/src/get_blf.c @@ -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; +} diff --git a/cpukit/itron/src/get_blk.c b/cpukit/itron/src/get_blk.c new file mode 100644 index 0000000000..7d435ab039 --- /dev/null +++ b/cpukit/itron/src/get_blk.c @@ -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; +} diff --git a/cpukit/itron/src/get_tim.c b/cpukit/itron/src/get_tim.c new file mode 100644 index 0000000000..43f03fa271 --- /dev/null +++ b/cpukit/itron/src/get_tim.c @@ -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; +} diff --git a/cpukit/itron/src/get_ver.c b/cpukit/itron/src/get_ver.c new file mode 100644 index 0000000000..c7fe75fe02 --- /dev/null +++ b/cpukit/itron/src/get_ver.c @@ -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; +} diff --git a/cpukit/itron/src/itroninittasks.c b/cpukit/itron/src/itroninittasks.c new file mode 100644 index 0000000000..65bd19f54c --- /dev/null +++ b/cpukit/itron/src/itroninittasks.c @@ -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 ); + + } +} diff --git a/cpukit/itron/src/itronintr.c b/cpukit/itron/src/itronintr.c index 13520cf5f0..e2ee32f96d 100644 --- a/cpukit/itron/src/itronintr.c +++ b/cpukit/itron/src/itronintr.c @@ -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 */ diff --git a/cpukit/itron/src/itrontime.c b/cpukit/itron/src/itrontime.c index 77be2dc313..cf93801c91 100644 --- a/cpukit/itron/src/itrontime.c +++ b/cpukit/itron/src/itrontime.c @@ -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 */ diff --git a/cpukit/itron/src/loc_cpu.c b/cpukit/itron/src/loc_cpu.c new file mode 100644 index 0000000000..0fc82305ed --- /dev/null +++ b/cpukit/itron/src/loc_cpu.c @@ -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; +} diff --git a/cpukit/itron/src/network.c b/cpukit/itron/src/network.c index 2922d3af9e..3069254e1f 100644 --- a/cpukit/itron/src/network.c +++ b/cpukit/itron/src/network.c @@ -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 */ diff --git a/cpukit/itron/src/nget_nod.c b/cpukit/itron/src/nget_nod.c new file mode 100644 index 0000000000..7491d222ef --- /dev/null +++ b/cpukit/itron/src/nget_nod.c @@ -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; +} diff --git a/cpukit/itron/src/nget_ver.c b/cpukit/itron/src/nget_ver.c new file mode 100644 index 0000000000..4ebc9f7ab0 --- /dev/null +++ b/cpukit/itron/src/nget_ver.c @@ -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; +} diff --git a/cpukit/itron/src/nrea_dat.c b/cpukit/itron/src/nrea_dat.c new file mode 100644 index 0000000000..bcdb8bb906 --- /dev/null +++ b/cpukit/itron/src/nrea_dat.c @@ -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; +} diff --git a/cpukit/itron/src/nwri_dat.c b/cpukit/itron/src/nwri_dat.c new file mode 100644 index 0000000000..639ece3531 --- /dev/null +++ b/cpukit/itron/src/nwri_dat.c @@ -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; +} + diff --git a/cpukit/itron/src/pacp_por.c b/cpukit/itron/src/pacp_por.c new file mode 100644 index 0000000000..75f3e19ac2 --- /dev/null +++ b/cpukit/itron/src/pacp_por.c @@ -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; +} diff --git a/cpukit/itron/src/pcal_por.c b/cpukit/itron/src/pcal_por.c new file mode 100644 index 0000000000..e7f693acd7 --- /dev/null +++ b/cpukit/itron/src/pcal_por.c @@ -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; +} diff --git a/cpukit/itron/src/pget_blf.c b/cpukit/itron/src/pget_blf.c new file mode 100644 index 0000000000..9e0e91517b --- /dev/null +++ b/cpukit/itron/src/pget_blf.c @@ -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; +} diff --git a/cpukit/itron/src/pget_blk.c b/cpukit/itron/src/pget_blk.c new file mode 100644 index 0000000000..64d8b9251c --- /dev/null +++ b/cpukit/itron/src/pget_blk.c @@ -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; +} diff --git a/cpukit/itron/src/pol_flg.c b/cpukit/itron/src/pol_flg.c new file mode 100644 index 0000000000..bf373b7dd4 --- /dev/null +++ b/cpukit/itron/src/pol_flg.c @@ -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; +} diff --git a/cpukit/itron/src/port.c b/cpukit/itron/src/port.c index 7f5693c385..afb6e5959f 100644 --- a/cpukit/itron/src/port.c +++ b/cpukit/itron/src/port.c @@ -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; -} diff --git a/cpukit/itron/src/ref_alm.c b/cpukit/itron/src/ref_alm.c new file mode 100644 index 0000000000..5d95ceb74f --- /dev/null +++ b/cpukit/itron/src/ref_alm.c @@ -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; +} diff --git a/cpukit/itron/src/ref_cfg.c b/cpukit/itron/src/ref_cfg.c new file mode 100644 index 0000000000..8d2c4a70a0 --- /dev/null +++ b/cpukit/itron/src/ref_cfg.c @@ -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; +} diff --git a/cpukit/itron/src/ref_cyc.c b/cpukit/itron/src/ref_cyc.c new file mode 100644 index 0000000000..eccdd2413e --- /dev/null +++ b/cpukit/itron/src/ref_cyc.c @@ -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; +} diff --git a/cpukit/itron/src/ref_flg.c b/cpukit/itron/src/ref_flg.c new file mode 100644 index 0000000000..522740e1c2 --- /dev/null +++ b/cpukit/itron/src/ref_flg.c @@ -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; +} diff --git a/cpukit/itron/src/ref_iXX.c b/cpukit/itron/src/ref_iXX.c new file mode 100644 index 0000000000..b388d14811 --- /dev/null +++ b/cpukit/itron/src/ref_iXX.c @@ -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; +} diff --git a/cpukit/itron/src/ref_mpf.c b/cpukit/itron/src/ref_mpf.c new file mode 100644 index 0000000000..88baecd3fd --- /dev/null +++ b/cpukit/itron/src/ref_mpf.c @@ -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; +} diff --git a/cpukit/itron/src/ref_mpl.c b/cpukit/itron/src/ref_mpl.c new file mode 100644 index 0000000000..dd50edad7f --- /dev/null +++ b/cpukit/itron/src/ref_mpl.c @@ -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; +} diff --git a/cpukit/itron/src/ref_por.c b/cpukit/itron/src/ref_por.c new file mode 100644 index 0000000000..a410680a36 --- /dev/null +++ b/cpukit/itron/src/ref_por.c @@ -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; +} diff --git a/cpukit/itron/src/ref_sys.c b/cpukit/itron/src/ref_sys.c new file mode 100644 index 0000000000..8f4d3502be --- /dev/null +++ b/cpukit/itron/src/ref_sys.c @@ -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; +} diff --git a/cpukit/itron/src/rel_blf.c b/cpukit/itron/src/rel_blf.c new file mode 100644 index 0000000000..8d79c5173f --- /dev/null +++ b/cpukit/itron/src/rel_blf.c @@ -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; +} diff --git a/cpukit/itron/src/rel_blk.c b/cpukit/itron/src/rel_blk.c new file mode 100644 index 0000000000..86bddafd4a --- /dev/null +++ b/cpukit/itron/src/rel_blk.c @@ -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; +} diff --git a/cpukit/itron/src/ret_int.c b/cpukit/itron/src/ret_int.c new file mode 100644 index 0000000000..173bfdc065 --- /dev/null +++ b/cpukit/itron/src/ret_int.c @@ -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 ) +{ +} diff --git a/cpukit/itron/src/ret_tmr.c b/cpukit/itron/src/ret_tmr.c new file mode 100644 index 0000000000..f789e942d5 --- /dev/null +++ b/cpukit/itron/src/ret_tmr.c @@ -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 ) +{ +} diff --git a/cpukit/itron/src/ret_wup.c b/cpukit/itron/src/ret_wup.c new file mode 100644 index 0000000000..b6a38dc0a4 --- /dev/null +++ b/cpukit/itron/src/ret_wup.c @@ -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 +) +{ +} diff --git a/cpukit/itron/src/rpl_rdv.c b/cpukit/itron/src/rpl_rdv.c new file mode 100644 index 0000000000..3e1abc1df3 --- /dev/null +++ b/cpukit/itron/src/rpl_rdv.c @@ -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; +} diff --git a/cpukit/itron/src/set_flg.c b/cpukit/itron/src/set_flg.c new file mode 100644 index 0000000000..e06914ed4e --- /dev/null +++ b/cpukit/itron/src/set_flg.c @@ -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; +} diff --git a/cpukit/itron/src/set_tim.c b/cpukit/itron/src/set_tim.c new file mode 100644 index 0000000000..9449b74fe5 --- /dev/null +++ b/cpukit/itron/src/set_tim.c @@ -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; +} diff --git a/cpukit/itron/src/sysmgmt.c b/cpukit/itron/src/sysmgmt.c index b997c3fd74..4606b95649 100644 --- a/cpukit/itron/src/sysmgmt.c +++ b/cpukit/itron/src/sysmgmt.c @@ -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 */ diff --git a/cpukit/itron/src/tacp_por.c b/cpukit/itron/src/tacp_por.c new file mode 100644 index 0000000000..8257ecacc4 --- /dev/null +++ b/cpukit/itron/src/tacp_por.c @@ -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; +} diff --git a/cpukit/itron/src/task.c b/cpukit/itron/src/task.c index 2fcb3a3a0a..863bb214d0 100644 --- a/cpukit/itron/src/task.c +++ b/cpukit/itron/src/task.c @@ -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 diff --git a/cpukit/itron/src/tcal_por.c b/cpukit/itron/src/tcal_por.c new file mode 100644 index 0000000000..d26990c78e --- /dev/null +++ b/cpukit/itron/src/tcal_por.c @@ -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; +} diff --git a/cpukit/itron/src/tget_blf.c b/cpukit/itron/src/tget_blf.c new file mode 100644 index 0000000000..b330e076cb --- /dev/null +++ b/cpukit/itron/src/tget_blf.c @@ -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; +} diff --git a/cpukit/itron/src/tget_blk.c b/cpukit/itron/src/tget_blk.c new file mode 100644 index 0000000000..426d9b2dc1 --- /dev/null +++ b/cpukit/itron/src/tget_blk.c @@ -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; +} diff --git a/cpukit/itron/src/twai_flg.c b/cpukit/itron/src/twai_flg.c new file mode 100644 index 0000000000..43f16b7a9d --- /dev/null +++ b/cpukit/itron/src/twai_flg.c @@ -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; +} diff --git a/cpukit/itron/src/unl_cpu.c b/cpukit/itron/src/unl_cpu.c new file mode 100644 index 0000000000..ed4b05e783 --- /dev/null +++ b/cpukit/itron/src/unl_cpu.c @@ -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; +} diff --git a/cpukit/itron/src/vmempool.c b/cpukit/itron/src/vmempool.c index 916c9d5e61..a14fac6b82 100644 --- a/cpukit/itron/src/vmempool.c +++ b/cpukit/itron/src/vmempool.c @@ -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; -} diff --git a/cpukit/itron/src/wai_flg.c b/cpukit/itron/src/wai_flg.c new file mode 100644 index 0000000000..0299c5302b --- /dev/null +++ b/cpukit/itron/src/wai_flg.c @@ -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; +} diff --git a/cpukit/posix/Makefile.am b/cpukit/posix/Makefile.am index ea16baa77d..d0853d8890 100644 --- a/cpukit/posix/Makefile.am +++ b/cpukit/posix/Makefile.am @@ -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 \ diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c index 9b04b5bfdf..4863e053fe 100644 --- a/cpukit/posix/src/pthread.c +++ b/cpukit/posix/src/pthread.c @@ -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 diff --git a/cpukit/posix/src/pthreadinitthreads.c b/cpukit/posix/src/pthreadinitthreads.c new file mode 100644 index 0000000000..5f71770e95 --- /dev/null +++ b/cpukit/posix/src/pthreadinitthreads.c @@ -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 ); + } +} + diff --git a/cpukit/rtems/src/taskinitusers.c b/cpukit/rtems/src/taskinitusers.c index 68fd37c585..3e0ae4b0f2 100644 --- a/cpukit/rtems/src/taskinitusers.c +++ b/cpukit/rtems/src/taskinitusers.c @@ -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; diff --git a/cpukit/rtems/src/tasks.c b/cpukit/rtems/src/tasks.c index 5805cf7823..963ec10368 100644 --- a/cpukit/rtems/src/tasks.c +++ b/cpukit/rtems/src/tasks.c @@ -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)(); +} diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h index 0ccf4daaa4..de481788a6 100644 --- a/cpukit/sapi/include/confdefs.h +++ b/cpukit/sapi/include/confdefs.h @@ -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 */ diff --git a/cpukit/sapi/src/io.c b/cpukit/sapi/src/io.c index af3d090492..62f058563b 100644 --- a/cpukit/sapi/src/io.c +++ b/cpukit/sapi/src/io.c @@ -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; - - /* - * 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 == 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; - } + *registered_major = 0; + + /* + * 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 == 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 ( _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; - - /* 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); - - return RTEMS_SUCCESSFUL; - } - _ISR_Enable(level); - } - - return RTEMS_TOO_MANY; + 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++ ) { + + _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; } #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; } |