Changeset 0ab34c90 in rtems


Ignore:
Timestamp:
Apr 17, 2007, 8:32:13 PM (14 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
7d33199
Parents:
f7588eba
Message:

2007-04-17 Joel Sherrill <joel@…>

  • 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.
Location:
cpukit
Files:
62 added
17 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rf7588eba r0ab34c90  
     12007-04-17      Joel Sherrill <joel@OARcorp.com>
     2
     3        * itron/Makefile.am, itron/src/eventflags.c, itron/src/fmempool.c,
     4        itron/src/itronintr.c, itron/src/itrontime.c, itron/src/network.c,
     5        itron/src/port.c, itron/src/sysmgmt.c, itron/src/task.c,
     6        itron/src/vmempool.c, posix/Makefile.am, posix/src/pthread.c,
     7        rtems/src/taskinitusers.c, rtems/src/tasks.c,
     8        sapi/include/confdefs.h, sapi/src/io.c: Various modification to
     9        reduce executable size. Most were refactoring of files. Split ITRON
     10        API files. Implemented mechanism to avoid initialization task/thread
     11        loop being linked in when that style of task initialization was not
     12        being used.
     13        * itron/src/acp_por.c, itron/src/act_cyc.c, itron/src/cal_por.c,
     14        itron/src/chg_iXX.c, itron/src/clr_flg.c, itron/src/cre_flg.c,
     15        itron/src/cre_mpf.c, itron/src/cre_mpl.c, itron/src/cre_por.c,
     16        itron/src/def_alm.c, itron/src/def_cyc.c, itron/src/def_exc.c,
     17        itron/src/def_int.c, itron/src/def_svc.c, itron/src/del_flg.c,
     18        itron/src/del_mpf.c, itron/src/del_mpl.c, itron/src/del_por.c,
     19        itron/src/dis_int.c, itron/src/dly_tsk.c, itron/src/ena_int.c,
     20        itron/src/fwd_por.c, itron/src/get_blf.c, itron/src/get_blk.c,
     21        itron/src/get_tim.c, itron/src/get_ver.c, itron/src/itroninittasks.c,
     22        itron/src/loc_cpu.c, itron/src/nget_nod.c, itron/src/nget_ver.c,
     23        itron/src/nrea_dat.c, itron/src/nwri_dat.c, itron/src/pacp_por.c,
     24        itron/src/pcal_por.c, itron/src/pget_blf.c, itron/src/pget_blk.c,
     25        itron/src/pol_flg.c, itron/src/ref_alm.c, itron/src/ref_cfg.c,
     26        itron/src/ref_cyc.c, itron/src/ref_flg.c, itron/src/ref_iXX.c,
     27        itron/src/ref_mpf.c, itron/src/ref_mpl.c, itron/src/ref_por.c,
     28        itron/src/ref_sys.c, itron/src/rel_blf.c, itron/src/rel_blk.c,
     29        itron/src/ret_int.c, itron/src/ret_tmr.c, itron/src/ret_wup.c,
     30        itron/src/rpl_rdv.c, itron/src/set_flg.c, itron/src/set_tim.c,
     31        itron/src/tacp_por.c, itron/src/tcal_por.c, itron/src/tget_blf.c,
     32        itron/src/tget_blk.c, itron/src/twai_flg.c, itron/src/unl_cpu.c,
     33        itron/src/wai_flg.c, posix/src/pthreadinitthreads.c: New files.
     34
    1352007-04-17      Ralf Corsépius <ralf.corsepius@rtems.org>
    236
  • cpukit/itron/Makefile.am

    rf7588eba r0ab34c90  
    5757TASK_C_FILES = src/task.c src/cre_tsk.c src/del_tsk.c src/sta_tsk.c \
    5858    src/ext_tsk.c src/exd_tsk.c src/ter_tsk.c src/dis_dsp.c src/ena_dsp.c \
    59     src/chg_pri.c src/rot_rdq.c src/rel_wai.c src/get_tid.c src/ref_tsk.c
     59    src/chg_pri.c src/rot_rdq.c src/rel_wai.c src/get_tid.c src/ref_tsk.c \
     60    src/itroninittasks.c
    6061
    6162TASKSYNC_C_FILES = src/sus_tsk.c src/rsm_tsk.c src/frsm_tsk.c src/slp_tsk.c \
     
    6566    src/preq_sem.c src/ref_sem.c src/sig_sem.c src/twai_sem.c src/wai_sem.c
    6667
    67 EVENTFLAGS_C_FILES = src/eventflags.c
     68EVENTFLAGS_C_FILES = src/eventflags.c src/cre_flg.c src/del_flg.c \
     69    src/set_flg.c src/clr_flg.c src/wai_flg.c src/pol_flg.c \
     70    src/twai_flg.c src/ref_flg.c
    6871
    6972MAILBOX_C_FILES = src/mbox.c
     
    7376    src/ref_mbf.c src/snd_mbf.c src/trcv_mbf.c src/tsnd_mbf.c
    7477
    75 RENDEZVOUS_C_FILES = src/port.c
     78RENDEZVOUS_C_FILES = src/port.c src/cre_por.c src/del_por.c src/cal_por.c \
     79    src/pcal_por.c src/tcal_por.c src/acp_por.c src/pacp_por.c \
     80    src/tacp_por.c src/fwd_por.c src/rpl_rdv.c src/ref_por.c
    7681
    77 INTERRUPT_C_FILES = src/itronintr.c
     82INTERRUPT_C_FILES = src/itronintr.c src/def_int.c src/loc_cpu.c \
     83    src/unl_cpu.c src/dis_int.c src/ena_int.c src/chg_iXX.c src/ref_iXX.c \
     84    src/ret_int.c src/ret_wup.c
    7885
    79 VARIABLE_MEMORY_POOL_C_FILES = src/vmempool.c
     86VARIABLE_MEMORY_POOL_C_FILES = src/vmempool.c src/cre_mpl.c src/del_mpl.c \
     87    src/get_blk.c src/pget_blk.c src/tget_blk.c src/rel_blk.c src/ref_mpl.c
    8088
    81 FIXED_MEMORY_POOL_C_FILES = src/fmempool.c
     89FIXED_MEMORY_POOL_C_FILES = src/fmempool.c src/cre_mpf.c src/del_mpf.c \
     90    src/get_blf.c src/pget_blf.c src/tget_blf.c src/rel_blf.c src/ref_mpf.c
    8291
    83 TIME_C_FILES = src/itrontime.c
     92TIME_C_FILES = src/itrontime.c src/set_tim.c src/get_tim.c src/dly_tsk.c \
     93    src/def_cyc.c src/act_cyc.c src/ref_cyc.c src/def_alm.c src/ref_alm.c \
     94    src/ret_tmr.c
    8495
    85 CONFIGURATION_C_FILES = src/sysmgmt.c
     96CONFIGURATION_C_FILES = src/sysmgmt.c src/get_ver.c src/ref_sys.c \
     97    src/ref_cfg.c src/def_svc.c src/def_exc.c
    8698
    87 NETWORK_C_FILES = src/network.c
     99NETWORK_C_FILES = src/network.c src/nrea_dat.c src/nwri_dat.c \
     100    src/nget_nod.c src/nget_ver.c
    88101
    89102C_FILES = $(TASK_C_FILES) $(TASKSYNC_C_FILES) $(SEMAPHORE_C_FILES) \
  • cpukit/itron/src/eventflags.c

    rf7588eba r0ab34c90  
    11/*
    2  *  COPYRIGHT (c) 1989-1999.
     2 *  COPYRIGHT (c) 1989-2007.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    5656
    5757}
    58 
    59 /*
    60  *  cre_flg - Create Eventflag
    61  */
    62 
    63 ER cre_flg(
    64   ID      flgid,
    65   T_CFLG *pk_cflg
    66 )
    67 {
    68   return E_OK;
    69 }
    70 
    71 /*
    72  *  del_flg - Delete Eventflag
    73  */
    74 
    75 ER del_flg(
    76   ID flgid
    77 )
    78 {
    79   return E_OK;
    80 }
    81 
    82 /*
    83  *  set_flg - Set Eventflag
    84  */
    85 
    86 ER set_flg(
    87   ID   flgid,
    88   UINT setptn
    89 )
    90 {
    91   return E_OK;
    92 }
    93 
    94 /*
    95  *  clr_flg - Clear Eventflag
    96  */
    97 
    98 ER clr_flg(
    99   ID   flgid,
    100   UINT clrptn
    101 )
    102 {
    103   return E_OK;
    104 }
    105 
    106 /*
    107  *  wai_flg - Wait on Eventflag
    108  */
    109 
    110 ER wai_flg(
    111   UINT *p_flgptn,
    112   ID    flgid,
    113   UINT  waiptn,
    114   UINT  wfmode
    115 )
    116 {
    117   return E_OK;
    118 }
    119 
    120 /*
    121  *  pol_flg - Wait for Eventflag(Polling)
    122  */
    123 
    124 ER pol_flg(
    125   UINT *p_flgptn,
    126   ID    flgid,
    127   UINT  waiptn,
    128   UINT  wfmode
    129 )
    130 {
    131   return E_OK;
    132 }
    133 
    134 /*
    135  *  twai_flg - Wait on Eventflag with Timeout
    136  */
    137 
    138 ER twai_flg(
    139   UINT *p_flgptn,
    140   ID    flgid,
    141   UINT  waiptn,
    142   UINT  wfmode,
    143   TMO   tmout
    144 )
    145 {
    146   return E_OK;
    147 }
    148 
    149 /*
    150  *  ref_flg - Reference Eventflag Status
    151  */
    152 
    153 ER ref_flg(
    154   T_RFLG *pk_rflg,
    155   ID      flgid
    156 )
    157 {
    158   return E_OK;
    159 }
  • cpukit/itron/src/fmempool.c

    rf7588eba r0ab34c90  
    11/*
    2  *  COPYRIGHT (c) 1989-1999.
     2 *  COPYRIGHT (c) 1989-2007.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    5757
    5858}
    59 
    60 /*
    61  *  cre_mpf - Create Fixed-Size Memorypool
    62  */
    63 
    64 ER cre_mpf(
    65   ID      mpfid,
    66   T_CMPF *pk_cmpf
    67 )
    68 {
    69   return E_OK;
    70 }
    71 
    72 /*
    73  *  del_mpf - Delete Fixed-Size Memorypool
    74  */
    75 
    76 ER del_mpf(
    77   ID mpfid
    78 )
    79 {
    80   return E_OK;
    81 }
    82 
    83 /*
    84  *  get_blf - Get Fixed-Size Memory Block
    85  */
    86 
    87 ER get_blf(
    88   VP *p_blf,
    89   ID  mpfid
    90 )
    91 {
    92   return E_OK;
    93 }
    94 
    95 /*
    96  *  pget_blf - Poll and Get Fixed-Size Memory Block
    97  */
    98 
    99 ER pget_blf(
    100   VP *p_blf,
    101   ID  mpfid
    102 )
    103 {
    104   return E_OK;
    105 }
    106 
    107 /*
    108  *  tget_blf - Get Fixed-Size Memory Block with Timeout
    109  */
    110 
    111 ER tget_blf(
    112   VP *p_blf,
    113   ID  mpfid,
    114   TMO tmout
    115 )
    116 {
    117   return E_OK;
    118 }
    119 
    120 /*
    121  *  rel_blf - Release Fixed-Size Memory Block
    122  */
    123 
    124 ER rel_blf(
    125   ID mpfid,
    126   VP blf
    127 )
    128 {
    129   return E_OK;
    130 }
    131 
    132 /*
    133  *  ref_mpf - Reference Fixed-Size Memorypool Status
    134  */
    135 
    136 ER ref_mpf(
    137   T_RMPF *pk_rmpf,
    138   ID      mpfid
    139 )
    140 {
    141   return E_OK;
    142 }
  • cpukit/itron/src/itronintr.c

    rf7588eba r0ab34c90  
    11/*
    2  *  COPYRIGHT (c) 1989-1999.
     2 *  COPYRIGHT (c) 1989-2007.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1818#include <rtems/itron/intr.h>
    1919
    20 /*
    21  *  def_int - Define Interrupt Handler
    22  */
    23 
    24 ER def_int(
    25   UINT    dintno,
    26   T_DINT *pk_dint
    27 )
    28 {
    29   return E_OK;
    30 }
    31 
    32 /*
    33  *  ret_int - Return from Interrupt Handler
    34  */
    35 
    36 void ret_int( void )
    37 {
    38 }
    39 
    40 /*
    41  *  ret_wup - Return and Wakeup Task
    42  */
    43 
    44 void ret_wup(
    45   ID tskid
    46 )
    47 {
    48 }
    49 
    50 /*
    51  *  loc_cpu - Lock CPU
    52  */
    53 
    54 ER loc_cpu( void )
    55 {
    56   return E_OK;
    57 }
    58 
    59 /*
    60  *  unl_cpu - Unlock CPU
    61  */
    62 
    63 ER unl_cpu( void )
    64 {
    65   return E_OK;
    66 }
    67 
    68 /*
    69  *  dis_int - Disable Interrupt
    70  */
    71 
    72 ER dis_int(
    73   UINT eintno
    74 )
    75 {
    76   return E_OK;
    77 }
    78 
    79 /*
    80  *  ena_int - Enable Interrupt
    81  */
    82 
    83 ER ena_int(
    84   UINT eintno
    85 )
    86 {
    87   return E_OK;
    88 }
    89 
    90 /*
    91  *  chg_iXX - Change Interrupt Mask(Level or Priority)
    92  */
    93 
    94 ER chg_iXX(
    95   UINT iXXXX
    96 )
    97 {
    98   return E_OK;
    99 }
    100 
    101 /*
    102  *  ref_iXX - Reference Interrupt Mask(Level or Priority)
    103  */
    104 
    105 ER ref_iXX(
    106   UINT *p_iXXXX
    107 )
    108 {
    109   return E_OK;
    110 }
     20/* no ITRON API specific interrupt initialization */
  • cpukit/itron/src/itrontime.c

    rf7588eba r0ab34c90  
    11/*
    2  *  COPYRIGHT (c) 1989-1999.
     2 *  COPYRIGHT (c) 1989-2007.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    2121#include <rtems/itron/time.h>
    2222
    23 /*
    24  *  set_tim - Set System Clock
    25  */
    26 
    27 ER set_tim(
    28   SYSTIME *pk_tim
    29 )
    30 {
    31 #if 0
    32  struct timespec   time;
    33 
    34 /* convert *pk_tim which is 48 bits integer in binary into an ordinary
    35  integer in milliseconds */
    36 
    37 /* XXX */ temp = 0;
    38   if(temp > 0) {
    39     _Thread_Disable_dispatch();
    40       _TOD_Set(&time);
    41     _Thread_Enable_dispatch();
    42     return E_OK;
    43   }
    44 #endif
    45   return E_SYS;
    46 }
    47 
    48 /*
    49  *  get_tim - Get System Clock
    50  */
    51 
    52 ER get_tim(
    53   SYSTIME *pk_tim
    54 )
    55 {
    56   return E_OK;
    57 }
    58 
    59 /*
    60  *  dly_tsk - Delay Task
    61  */
    62 
    63 ER dly_tsk(
    64   DLYTIME dlytim
    65 )
    66 {
    67   Watchdog_Interval ticks;
    68 
    69   ticks = TOD_MILLISECONDS_TO_TICKS(dlytim);
    70 
    71   _Thread_Disable_dispatch();
    72     if ( ticks == 0 ) {
    73       _Thread_Yield_processor();
    74     } else {
    75       _Thread_Set_state( _Thread_Executing, STATES_DELAYING );
    76       _Watchdog_Initialize(
    77         &_Thread_Executing->Timer,
    78         _Thread_Delay_ended,
    79         _Thread_Executing->Object.id,
    80         NULL
    81       );
    82       _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
    83     }
    84   _Thread_Enable_dispatch();
    85   return E_OK;
    86 }
    87 
    88 /*
    89  *  def_cyc - Define Cyclic Handler
    90  */
    91 
    92 ER def_cyc(
    93   HNO     cycno,
    94   T_DCYC *pk_dcyc
    95 )
    96 {
    97   Watchdog_Control *object;
    98 #if 0
    99   Watchdog_Interval timeInterval;
    100 #endif
    101 
    102 /* XXX */ object = 0;
    103   if ( pk_dcyc->cycatr != TA_HLNG)
    104      return E_RSATR;
    105 #if 0
    106   timeInterval = pk_dcyc->cyctim / 1000;
    107   object->delta_interval = timeInterval;
    108 #endif
    109   _Watchdog_Initialize(
    110          object,
    111          pk_dcyc->cychdr,
    112          cycno,
    113          pk_dcyc->exinf);
    114   _Watchdog_Deactivate(object);
    115 
    116   return E_OK;
    117 }
    118 
    119 /*
    120  *  act_cyc - Activate Cyclic Handler
    121  */
    122 
    123 ER act_cyc(
    124   HNO   cycno,
    125   UINT  cycact
    126 )
    127 {
    128   Watchdog_Control *object;
    129 
    130   if(cycact != TCY_OFF || cycact != TCY_ON)
    131      return E_PAR;
    132 
    133 #if 0
    134   if( object->Object_ID != cycno)
    135      return E_NOEXS;
    136 #endif
    137 
    138   _Watchdog_Activate(object);
    139 
    140   return E_OK;
    141 }
    142 
    143 /*
    144  *  ref_cyc - Reference Cyclic Handler Status
    145  */
    146 
    147 ER ref_cyc(
    148   T_RCYC *pk_rcyc,
    149   HNO     cycno
    150 )
    151 {
    152 #if 0
    153   int timeElapse_since_actCyclic;
    154 #endif
    155   T_DCYC *pk_dcyc;
    156 #if 0
    157   Watchdog_Control *object;
    158 #endif
    159 
    160 /* XXX */ pk_dcyc = 0;
    161 
    162 /* XXX will to use a "get" routine to map from id to object pointer */
    163 /* XXX and the object pointer should be of type specific to this manager */
    164 #if 0
    165   if( object->Object_ID == cycno))
    166 #else
    167   if ( 1 )
    168 #endif
    169   {
    170      pk_rcyc->exinf = pk_dcyc->exinf;
    171      pk_rcyc->cycact = pk_dcyc->cycact;
    172 #if 0
    173      pk_rcyc->lfttim = pk_dcyc->cyctim - timeElapse_since_actCyclic;
    174 #endif
    175 
    176      return E_OK;
    177   }
    178   else
    179      return E_NOEXS;
    180 }
    181 
    182 /*
    183  *  def_alm - Define Alarm Handler
    184  */
    185 
    186 ER def_alm(
    187   HNO     almno,
    188   T_DALM *pk_dalm
    189 )
    190 {
    191 #if 0
    192   Objects_Control *objectAlrm;
    193   Watchdog_Interval timeInterval;
    194 
    195   timeInterval = pk_dalm->almtim / 1000;
    196   (void) _Watchdog_Remove(&objectAlrm);
    197   _Watchdog_Initialize(
    198            objectAlrm,
    199            pk_dalm->almhdr,
    200            almno,
    201            pk_dalm->exinf);
    202   _Watchdong_Insert_seconds(objectAlrm,timeInterval);
    203   _Thread_Enable_dispatch();
    204 #endif
    205 
    206   return E_OK;
    207 }
    208 
    209 /*
    210  *  ref_alm - Reference Alarm Handler Status
    211  */
    212 
    213 ER ref_alm(
    214   T_RALM *pk_ralm,
    215   HNO     almno
    216 )
    217 {
    218 
    219   return E_OK;
    220 }
    221 
    222 /*
    223  *  ret_tmr - Return from Timer Handler
    224  */
    225 
    226 void ret_tmr( void )
    227 {
    228 }
     23/* no initialization needed yet for ITRON time services */
  • cpukit/itron/src/network.c

    rf7588eba r0ab34c90  
    11/*
    2  *  COPYRIGHT (c) 1989-1999.
     2 *  COPYRIGHT (c) 1989-2007.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1818#include <rtems/itron/network.h>
    1919
    20 /*
    21  *  nrea_dat - Read Data from another Node
    22  */
    23 
    24 ER nrea_dat(
    25   INT *p_reasz,
    26   VP   dstadr,
    27   NODE srcnode,
    28   VP   srcadr,
    29   INT  datsz
    30 )
    31 {
    32   return E_OK;
    33 }
    34 
    35 /*
    36  *  nwri_dat - Write Data to another Node
    37  */
    38 
    39 ER nwri_dat(
    40   INT  *p_wrisz,
    41   NODE  dstnode,
    42   VP    dstadr,
    43   VP    srcadr,
    44   INT   datsz
    45 )
    46 {
    47   return E_OK;
    48 }
    49 
    50 /*
    51  *  nget_nod - Get Local Node Number
    52  */
    53 
    54 ER nget_nod(
    55   NODE *p_node
    56 )
    57 {
    58   return E_OK;
    59 }
    60 
    61 /*
    62  *  nget_ver - Get Version Information of another Node
    63  */
    64 
    65 ER nget_ver(
    66   T_VER *pk_ver,
    67   NODE   node
    68 )
    69 {
    70   return E_OK;
    71 }
     20/* no ITRON Network Manager specific initialization required */
  • cpukit/itron/src/port.c

    rf7588eba r0ab34c90  
    11/*
    2  *  COPYRIGHT (c) 1989-1999.
     2 *  COPYRIGHT (c) 1989-2007.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    5555
    5656}
    57 
    58 /*
    59  *  cre_por - Create Port for Rendezvous
    60  */
    61 
    62 ER cre_por(
    63   ID      porid,
    64   T_CPOR *pk_cpor
    65 )
    66 {
    67   return E_OK;
    68 }
    69 
    70 /*
    71  *  del_por - Delete Port for Rendezvous
    72  */
    73 
    74 ER del_por(
    75   ID porid
    76 )
    77 {
    78   return E_OK;
    79 }
    80 
    81 /*
    82  *  cal_por - Call Port for Rendezvous Poll
    83  */
    84 
    85 ER cal_por(
    86   VP    msg,
    87   INT  *p_rmsgsz,
    88   ID    porid,
    89   UINT  calptn,
    90   INT   cmsgsz
    91 )
    92 {
    93   return E_OK;
    94 }
    95 
    96 /*
    97  *  pcal_por - Poll and Call Port for Rendezvous
    98  */
    99 
    100 ER pcal_por(
    101   VP   msg,
    102   INT *p_rmsgsz,
    103   ID   porid,
    104   UINT calptn,
    105   INT  cmsgsz
    106 )
    107 {
    108   return E_OK;
    109 }
    110 
    111 /*
    112  *  tcal_por - Call Port for Rendezvous with Timeout
    113  */
    114 
    115 ER tcal_por(
    116   VP    msg,
    117   INT  *p_rmsgsz,
    118   ID    porid,
    119   UINT  calptn,
    120   INT   cmsgsz,
    121   TMO   tmout
    122 )
    123 {
    124   return E_OK;
    125 }
    126 
    127 /*
    128  *  acp_por - Accept Port for Rendezvous Poll
    129  */
    130 
    131 ER acp_por(
    132   RNO  *p_rdvno,
    133   VP    msg,
    134   INT  *p_cmsgsz,
    135   ID    porid,
    136   UINT  acpptn
    137 )
    138 {
    139   return E_OK;
    140 }
    141 
    142 /*
    143  *  pacp_por - Poll and Accept Port for Rendezvous
    144  */
    145 
    146 ER pacp_por(
    147   RNO  *p_rdvno,
    148   VP    msg,
    149   INT  *p_cmsgsz,
    150   ID    porid,
    151   UINT  acpptn
    152 )
    153 {
    154   return E_OK;
    155 }
    156 
    157 /*
    158  *  tacp_por - Accept Port for Rendezvous with Timeout
    159  */
    160 
    161 ER tacp_por(
    162   RNO  *p_rdvno,
    163   VP    msg,
    164   INT  *p_cmsgsz,
    165   ID    porid,
    166   UINT  acpptn,
    167   TMO   tmout
    168 )
    169 {
    170   return E_OK;
    171 }
    172 
    173 /*
    174  *  fwd_por - Forward Rendezvous to Other Port
    175  */
    176 
    177 ER fwd_por(
    178   ID    porid,
    179   UINT  calptn,
    180   RNO   rdvno,
    181   VP    msg,
    182   INT   cmsgsz
    183 )
    184 {
    185   return E_OK;
    186 }
    187 
    188 /*
    189  *  rpl_rdv - Reply Rendezvous
    190  */
    191 
    192 ER rpl_rdv(
    193   RNO  rdvno,
    194   VP   msg,
    195   INT rmsgsz
    196 )
    197 {
    198   return E_OK;
    199 }
    200 
    201 /*
    202  *  ref_por - Reference Port Status
    203  */
    204 
    205 ER ref_por(
    206   T_RPOR *pk_rpor,
    207   ID      porid
    208 )
    209 {
    210   return E_OK;
    211 }
  • cpukit/itron/src/sysmgmt.c

    rf7588eba r0ab34c90  
    11/*
    2  *  COPYRIGHT (c) 1989-1999.
     2 *  COPYRIGHT (c) 1989-2007.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    1818#include <rtems/itron/sysmgmt.h>
    1919
    20 /*
    21  *  get_ver - Get Version Information
    22  */
    23 
    24 ER get_ver(
    25   T_VER *pk_ver
    26 )
    27 {
    28   return E_OK;
    29 }
    30 
    31 /*
    32  *  ref_sys - Reference System Status
    33  */
    34 
    35 ER ref_sys(
    36   T_RSYS *pk_rsys
    37 )
    38 {
    39   return E_OK;
    40 }
    41 
    42 /*
    43  *  ref_cfg - Reference Configuration Information
    44  */
    45 
    46 ER ref_cfg(
    47   T_RCFG *pk_rcfg
    48 )
    49 {
    50   return E_OK;
    51 }
    52 
    53 /*
    54  *  def_svc - Define Extended SVC Handler
    55  */
    56 
    57 ER def_svc(
    58   FN      s_fncd,
    59   T_DSVC *pk_dsvc
    60 )
    61 {
    62   return E_OK;
    63 }
    64 
    65 /*
    66  *  def_exc - Define Exception Handler
    67  */
    68 
    69 ER def_exc(
    70   UINT    exckind,
    71   T_DEXC *pk_dexc
    72 )
    73 {
    74   return E_OK;
    75 }
     20/* No ITRON API System Management Manager specific initialization required */
  • cpukit/itron/src/task.c

    rf7588eba r0ab34c90  
    8080void _ITRON_Task_Initialize_user_tasks( void )
    8181{
    82   uint32_t                          index;
    83   uint32_t                          maximum;
    84   ER                                return_value;
    85   itron_initialization_tasks_table *user_tasks;
    86 
    87   /*
    88    *  NOTE:  This is slightly different from the Ada implementation.
    89    */
    90 
    91   user_tasks = _ITRON_Task_User_initialization_tasks;
    92   maximum    = _ITRON_Task_Number_of_initialization_tasks;
    93 
    94   if ( !user_tasks || maximum == 0 )
    95     return;
    96 
    97   for ( index=0 ; index < maximum ; index++ ) {
    98 
    99     return_value = cre_tsk(
    100        user_tasks[ index ].id,
    101        &user_tasks[ index ].attributes
    102     );
    103 
    104     if ( return_value != E_OK )
    105       _Internal_error_Occurred( INTERNAL_ERROR_ITRON_API, TRUE, return_value );
    106 
    107     return_value = sta_tsk( user_tasks[ index ].id, 0 );
    108 
    109     if ( return_value != E_OK )
    110       _Internal_error_Occurred( INTERNAL_ERROR_ITRON_API, TRUE, return_value );
    111 
    112   }
     82  extern void (*_ITRON_Initialize_user_tasks_p)(void);
     83  if ( _ITRON_Initialize_user_tasks_p )
     84    (*_ITRON_Initialize_user_tasks_p)();
    11385}
    11486
  • cpukit/itron/src/vmempool.c

    rf7588eba r0ab34c90  
    11/*
    2  *  COPYRIGHT (c) 1989-1999.
     2 *  COPYRIGHT (c) 1989-2007.
    33 *  On-Line Applications Research Corporation (OAR).
    44 *
     
    5757
    5858}
    59 
    60 /*
    61  *  cre_mpl - Create Variable-Size Memorypool
    62  */
    63 
    64 ER cre_mpl(
    65   ID      mplid,
    66   T_CMPL *pk_cmpl
    67 )
    68 {
    69   return E_OK;
    70 }
    71 
    72 /*
    73  *  del_mpl - Delete Variable-Size Memorypool
    74  */
    75 
    76 ER del_mpl(
    77   ID mplid
    78 )
    79 {
    80   return E_OK;
    81 }
    82 
    83 /*
    84  *  get_blk - Get Variable-Size Memory Block
    85  */
    86 
    87 ER get_blk(
    88   VP  *p_blk,
    89   ID   mplid,
    90   INT  blksz
    91 )
    92 {
    93   return E_OK;
    94 }
    95 
    96 /*
    97  *  pget_blk - Poll and Get Variable-Size Memory Block
    98  */
    99 
    100 ER pget_blk(
    101   VP  *p_blk,
    102   ID   mplid,
    103   INT  blksz
    104 )
    105 {
    106   return E_OK;
    107 }
    108 
    109 /*
    110  *  tget_blk - Get Variable-Size Memory Block with Timeout
    111  */
    112 
    113 ER tget_blk(
    114   VP  *p_blk,
    115   ID   mplid,
    116   INT  blksz,
    117   TMO  tmout
    118 )
    119 {
    120   return E_OK;
    121 }
    122 
    123 /*
    124  *  rel_blk - Release Variable-Size Memory Block
    125  */
    126 
    127 ER rel_blk(
    128   ID  mplid,
    129   VP  blk
    130 )
    131 {
    132   return E_OK;
    133 }
    134 
    135 /*
    136  *  ref_mpl - Reference Variable-Size Memorypool Status
    137  */
    138 
    139 ER ref_mpl(
    140   T_RMPL *pk_rmpl,
    141   ID      mplid
    142 )
    143 {
    144   return E_OK;
    145 }
  • cpukit/posix/Makefile.am

    rf7588eba r0ab34c90  
    122122    src/pthreadattrgetschedpolicy.c src/pthreadattrsetschedpolicy.c \
    123123    src/pthreadattrgetinheritsched.c src/pthreadattrsetinheritsched.c \
    124     src/pthreadattrgetscope.c src/pthreadattrsetscope.c
     124    src/pthreadattrgetscope.c src/pthreadattrsetscope.c \
     125    src/pthreadinitthreads.c
    125126
    126127## PSIGNAL_C_FILES
  • cpukit/posix/src/pthread.c

    rf7588eba r0ab34c90  
    269269void _POSIX_Threads_Initialize_user_threads( void )
    270270{
    271   int                                 status;
    272   uint32_t                            index;
    273   uint32_t                            maximum;
    274   posix_initialization_threads_table *user_threads;
    275   pthread_t                           thread_id;
    276   pthread_attr_t                      attr;
    277 
    278   user_threads = _POSIX_Threads_User_initialization_threads;
    279   maximum      = _POSIX_Threads_Number_of_initialization_threads;
    280 
    281   if ( !user_threads || maximum == 0 )
    282     return;
    283 
    284   /*
    285    *  Be careful .. if the default attribute set changes, this may need to.
    286    *
    287    *  Setting the attributes explicitly is critical, since we don't want
    288    *  to inherit the idle tasks attributes.
    289    */
    290 
    291   for ( index=0 ; index < maximum ; index++ ) {
    292     status = pthread_attr_init( &attr );
    293     assert( !status );
    294 
    295     status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
    296     assert( !status );
    297 
    298     status = pthread_attr_setstacksize( &attr, user_threads[ index ].stack_size);
    299     assert( !status );
    300 
    301     status = pthread_create(
    302       &thread_id,
    303       &attr,
    304       user_threads[ index ].thread_entry,
    305       NULL
    306     );
    307     assert( !status );
    308   }
     271  extern void (*_POSIX_Threads_Initialize_user_threads_p)(void);
     272  if ( _POSIX_Threads_Initialize_user_threads_p )
     273    (*_POSIX_Threads_Initialize_user_threads_p)();
    309274}
    310275
  • cpukit/rtems/src/taskinitusers.c

    rf7588eba r0ab34c90  
    33 *
    44 *
    5  *  COPYRIGHT (c) 1989-1999.
     5 *  COPYRIGHT (c) 1989-2007.
    66 *  On-Line Applications Research Corporation (OAR).
    77 *
     
    3535/*PAGE
    3636 *
    37  *  _RTEMS_tasks_Initialize_user_tasks
     37 *  _RTEMS_tasks_Initialize_user_tasks_body
    3838 *
    3939 *  This routine creates and starts all configured user
     
    4545 */
    4646
    47 void _RTEMS_tasks_Initialize_user_tasks( void )
     47void _RTEMS_tasks_Initialize_user_tasks_body( void )
    4848{
    4949  uint32_t                          index;
  • cpukit/rtems/src/tasks.c

    rf7588eba r0ab34c90  
    292292
    293293}
     294
     295/*PAGE
     296 *
     297 *  _RTEMS_tasks_Initialize_user_tasks
     298 *
     299 *  This routine creates and starts all configured user
     300 *  initialzation threads.
     301 *
     302 *  Input parameters: NONE
     303 *
     304 *  Output parameters:  NONE
     305 */
     306
     307void _RTEMS_tasks_Initialize_user_tasks( void )
     308{
     309  extern void (*_RTEMS_tasks_Initialize_user_tasks_p)(void);
     310  if ( _RTEMS_tasks_Initialize_user_tasks_p )
     311    (*_RTEMS_tasks_Initialize_user_tasks_p)();
     312}
  • cpukit/sapi/include/confdefs.h

    rf7588eba r0ab34c90  
    11831183#endif /* CONFIGURE_HAS_OWN_CONFIGURATION_TABLE */
    11841184
     1185/*
     1186 *  If the user has configured a set of Classic API Initialization Tasks,
     1187 *  then we need to install the code that runs that loop.
     1188 */
     1189#ifdef CONFIGURE_INIT
     1190  #ifdef CONFIGURE_RTEMS_INIT_TASKS_TABLE
     1191    void (_RTEMS_tasks_Initialize_user_tasks_body)(void);
     1192    void (*_RTEMS_tasks_Initialize_user_tasks_p)(void) =
     1193              _RTEMS_tasks_Initialize_user_tasks_body;
     1194  #else
     1195    void (*_RTEMS_tasks_Initialize_user_tasks_p)(void) = NULL;
     1196  #endif
     1197#endif
     1198
     1199/*
     1200 *  If the user has configured a set of POSIX Initialization Threads,
     1201 *  then we need to install the code that runs that loop.
     1202 */
     1203#ifdef CONFIGURE_INIT
     1204  #ifdef CONFIGURE_POSIX_INIT_THREAD_TABLE
     1205    void _POSIX_Threads_Initialize_user_threads_body(void);
     1206    void (*_POSIX_Threads_Initialize_user_threads_p)(void) =
     1207              _POSIX_Threads_Initialize_user_threads_body;
     1208  #else
     1209    void (*_POSIX_Threads_Initialize_user_threads_p)(void) = NULL;
     1210  #endif
     1211#endif
     1212
     1213/*
     1214 *  If the user has configured a set of ITRON Initialization Tasks,
     1215 *  then we need to install the code that runs that loop.
     1216 */
     1217#ifdef CONFIGURE_INIT
     1218  #ifdef CONFIGURE_ITRON_INIT_TASK_TABLE
     1219    void _ITRON_Task_Initialize_user_tasks_body(void);
     1220    void (*_ITRON_Initialize_user_tasks_p)(void) =
     1221              _ITRON_Task_Initialize_user_tasks_body;
     1222  #else
     1223    void (*_ITRON_Initialize_user_tasks_p)(void) = NULL;
     1224  #endif
     1225#endif
     1226
    11851227#ifdef __cplusplus
    11861228}
     
    12131255#endif
    12141256
     1257/*
     1258 *  These names have been obsoleted so make the user application stop compiling
     1259 */
     1260#if defined(CONFIGURE_TEST_NEEDS_TIMER_DRIVER) || \
     1261    defined(CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER) || \
     1262    defined(CONFIGURE_TEST_NEEDS_CLOCK_DRIVER) || \
     1263    defined(CONFIGURE_TEST_NEEDS_RTC_DRIVER) || \
     1264    defined(CONFIGURE_TEST_NEEDS_STUB_DRIVER)
     1265#error "CONFIGURATION ERROR: CONFIGURE_TEST_XXX constants are obsolete"
     1266#endif
     1267
     1268
    12151269#endif
    12161270/* end of include file */
  • cpukit/sapi/src/io.c

    rf7588eba r0ab34c90  
    3636
    3737void _IO_Manager_initialization(
    38     rtems_driver_address_table *driver_table,
    39     uint32_t                    drivers_in_table,
    40     uint32_t                    number_of_drivers,
    41     uint32_t                    number_of_devices
     38  rtems_driver_address_table *driver_table,
     39  uint32_t                    drivers_in_table,
     40  uint32_t                    number_of_drivers,
     41  uint32_t                    number_of_devices
    4242)
    4343{
     
    4747
    4848  if ( number_of_drivers < drivers_in_table )
    49       number_of_drivers = drivers_in_table;
    50 
    51   tmp = _Workspace_Allocate_or_fatal_error(
    52     sizeof( rtems_driver_address_table ) * ( number_of_drivers )
    53   );
    54 
    55   _IO_Driver_address_table = (rtems_driver_address_table *) tmp;
    56 
    57   memset(
    58     _IO_Driver_address_table, 0,
    59     sizeof( rtems_driver_address_table ) * ( number_of_drivers )
    60   );
    61 
    62   if ( drivers_in_table )
    63       for ( index = 0 ; index < drivers_in_table ; index++ )
    64         _IO_Driver_address_table[index] = driver_table[index];
    65 
     49    number_of_drivers = drivers_in_table;
     50
     51  _IO_Driver_address_table = driver_table;
    6652  _IO_Number_of_drivers = number_of_drivers;
    6753  _IO_Number_of_devices = number_of_devices;
     
    125111)
    126112{
    127     *registered_major = 0;
    128 
    129     /*
    130      * Test for initialise/open being present to indicate the driver slot is
    131      * in use.
    132      */
    133 
    134     if ( major >= _IO_Number_of_drivers )
    135       return RTEMS_INVALID_NUMBER;
    136 
    137     if ( major == 0 )
    138     {
    139         for ( major = _IO_Number_of_drivers - 1 ; major ; major-- )
    140             if ( _IO_Driver_address_table[major].initialization_entry == 0 &&
    141                  _IO_Driver_address_table[major].open_entry == 0 )
    142                 break;
    143 
    144         if (( major == 0 ) &&
    145             ( _IO_Driver_address_table[major].initialization_entry == 0 &&
    146               _IO_Driver_address_table[major].open_entry == 0 ))
    147             return RTEMS_TOO_MANY;
    148     }
    149 
    150     if ( _IO_Driver_address_table[major].initialization_entry == 0 &&
    151          _IO_Driver_address_table[major].open_entry == 0 )
    152     {
    153         _IO_Driver_address_table[major] = *driver_table;
    154         *registered_major               = major;
    155 
    156         rtems_io_initialize( major, 0, NULL );
    157 
    158         return RTEMS_SUCCESSFUL;
    159     }
    160 
    161     return RTEMS_RESOURCE_IN_USE;
     113  *registered_major = 0;
     114
     115  /*
     116   * Test for initialise/open being present to indicate the driver slot is
     117   * in use.
     118   */
     119
     120  if ( major >= _IO_Number_of_drivers )
     121    return RTEMS_INVALID_NUMBER;
     122
     123  if ( major == 0 ) {
     124    for ( major = _IO_Number_of_drivers - 1 ; major ; major-- )
     125      if ( _IO_Driver_address_table[major].initialization_entry == 0 &&
     126           _IO_Driver_address_table[major].open_entry == 0 )
     127        break;
     128
     129      if (( major == 0 ) &&
     130          ( _IO_Driver_address_table[major].initialization_entry == 0 &&
     131            _IO_Driver_address_table[major].open_entry == 0 ))
     132        return RTEMS_TOO_MANY;
     133  }
     134
     135  if ( _IO_Driver_address_table[major].initialization_entry == 0 &&
     136       _IO_Driver_address_table[major].open_entry == 0 ) {
     137    _IO_Driver_address_table[major] = *driver_table;
     138    *registered_major               = major;
     139
     140    rtems_io_initialize( major, 0, NULL );
     141
     142    return RTEMS_SUCCESSFUL;
     143  }
     144
     145  return RTEMS_RESOURCE_IN_USE;
    162146}
    163147
     
    177161
    178162rtems_status_code rtems_io_unregister_driver(
    179     rtems_device_major_number major
    180 )
    181 {
    182     if ( major < _IO_Number_of_drivers )
    183     {
    184         memset(
    185             &_IO_Driver_address_table[major],
    186             0,
    187             sizeof( rtems_driver_address_table )
    188         );
    189         return RTEMS_SUCCESSFUL;
    190     }
    191     return RTEMS_UNSATISFIED;
     163  rtems_device_major_number major
     164)
     165{
     166  if ( major < _IO_Number_of_drivers ) {
     167    memset(
     168      &_IO_Driver_address_table[major],
     169      0,
     170      sizeof( rtems_driver_address_table )
     171    );
     172    return RTEMS_SUCCESSFUL;
     173  }
     174  return RTEMS_UNSATISFIED;
    192175}
    193176
     
    215198  )
    216199{
    217     rtems_driver_name_t *np;
    218     uint32_t   level;
    219     uint32_t   index;
    220 
    221     /* find an empty slot */
    222     for( index=0, np = _IO_Driver_name_table ;
    223          index < _IO_Number_of_devices ;
    224          index++, np++ )
    225     {
    226 
    227         _ISR_Disable(level);
    228         if (np->device_name == 0)
    229         {
    230             np->device_name = device_name;
    231             np->device_name_length = strlen(device_name);
    232             np->major = major;
    233             np->minor = minor;
    234             _ISR_Enable(level);
    235 
    236             return RTEMS_SUCCESSFUL;
    237         }
    238         _ISR_Enable(level);
    239     }
    240 
    241     return RTEMS_TOO_MANY;
     200  rtems_driver_name_t *np;
     201  uint32_t   level;
     202  uint32_t   index;
     203
     204  /* find an empty slot */
     205  for( index=0, np = _IO_Driver_name_table ;
     206       index < _IO_Number_of_devices ;
     207       index++, np++ ) {
     208
     209    _ISR_Disable(level);
     210      if (np->device_name == 0) {
     211        np->device_name = device_name;
     212        np->device_name_length = strlen(device_name);
     213        np->major = major;
     214        np->minor = minor;
     215        _ISR_Enable(level);
     216
     217        return RTEMS_SUCCESSFUL;
     218      }
     219    _ISR_Enable(level);
     220  }
     221  return RTEMS_TOO_MANY;
    242222}
    243223#endif
     
    264244)
    265245{
    266     rtems_device_driver_entry callout;
    267 
    268     if ( major >= _IO_Number_of_drivers )
    269         return RTEMS_INVALID_NUMBER;
    270 
    271     callout = _IO_Driver_address_table[major].initialization_entry;
    272     return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
     246  rtems_device_driver_entry callout;
     247
     248  if ( major >= _IO_Number_of_drivers )
     249    return RTEMS_INVALID_NUMBER;
     250
     251  callout = _IO_Driver_address_table[major].initialization_entry;
     252  return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
    273253}
    274254
     
    294274)
    295275{
    296     rtems_device_driver_entry callout;
    297 
    298     if ( major >= _IO_Number_of_drivers )
    299         return RTEMS_INVALID_NUMBER;
    300 
    301     callout = _IO_Driver_address_table[major].open_entry;
    302     return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
     276  rtems_device_driver_entry callout;
     277
     278  if ( major >= _IO_Number_of_drivers )
     279    return RTEMS_INVALID_NUMBER;
     280
     281  callout = _IO_Driver_address_table[major].open_entry;
     282  return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
    303283}
    304284
     
    324304)
    325305{
    326     rtems_device_driver_entry callout;
    327 
    328     if ( major >= _IO_Number_of_drivers )
    329         return RTEMS_INVALID_NUMBER;
    330 
    331     callout = _IO_Driver_address_table[major].close_entry;
    332     return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
     306  rtems_device_driver_entry callout;
     307
     308  if ( major >= _IO_Number_of_drivers )
     309    return RTEMS_INVALID_NUMBER;
     310
     311  callout = _IO_Driver_address_table[major].close_entry;
     312  return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
    333313}
    334314
     
    354334)
    355335{
    356     rtems_device_driver_entry callout;
    357 
    358     if ( major >= _IO_Number_of_drivers )
    359         return RTEMS_INVALID_NUMBER;
    360 
    361     callout = _IO_Driver_address_table[major].read_entry;
    362     return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
     336  rtems_device_driver_entry callout;
     337
     338  if ( major >= _IO_Number_of_drivers )
     339    return RTEMS_INVALID_NUMBER;
     340
     341  callout = _IO_Driver_address_table[major].read_entry;
     342  return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
    363343}
    364344
     
    384364)
    385365{
    386     rtems_device_driver_entry callout;
    387 
    388     if ( major >= _IO_Number_of_drivers )
    389         return RTEMS_INVALID_NUMBER;
    390 
    391     callout = _IO_Driver_address_table[major].write_entry;
    392     return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
     366  rtems_device_driver_entry callout;
     367
     368  if ( major >= _IO_Number_of_drivers )
     369    return RTEMS_INVALID_NUMBER;
     370
     371  callout = _IO_Driver_address_table[major].write_entry;
     372  return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
    393373}
    394374
     
    414394)
    415395{
    416     rtems_device_driver_entry callout;
    417 
    418     if ( major >= _IO_Number_of_drivers )
    419         return RTEMS_INVALID_NUMBER;
    420 
    421     callout = _IO_Driver_address_table[major].control_entry;
    422     return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
    423 }
     396  rtems_device_driver_entry callout;
     397
     398  if ( major >= _IO_Number_of_drivers )
     399    return RTEMS_INVALID_NUMBER;
     400
     401  callout = _IO_Driver_address_table[major].control_entry;
     402  return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
     403}
Note: See TracChangeset for help on using the changeset viewer.