Changeset 3652ad35 in rtems for c/src/lib


Ignore:
Timestamp:
Sep 19, 1995, 2:53:29 PM (26 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
38ffa0c
Parents:
b3ac6a8d
Message:

Minor bug fixes to get all targets compilable and running. The
single biggest changes were the expansion of the workspace size
macro to include other types of objects and the increase in the
minimum stack size for most CPUs.

Location:
c/src/lib
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/hppa1.1/simhppa/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    3030#include <bsp.h>
    3131#include <rtems/libio.h>
     32#include <rtems/core/intthrd.h>
    3233
    3334#include <libcsupport.h>
     
    8687     */
    8788
    88     if (heir_task->name == rtems_build_name('I', 'D', 'L', 'E'))
     89    if (heir_task == _Internal_threads_Idle_thread)
    8990        CPU_HPPA_CLICKS_PER_TICK = fast_clock;
    90     else if (current_task->name == rtems_build_name('I', 'D', 'L', 'E'))
     91    else if (heir_task == _Internal_threads_Idle_thread)
    9192        CPU_HPPA_CLICKS_PER_TICK = normal_clock;
    9293}
     
    212213        memset(&fast_idle_extension, 0, sizeof(fast_idle_extension));
    213214
    214         fast_idle_extension.task_switch  = fast_idle_switch_hook;
     215        fast_idle_extension.thread_switch  = fast_idle_switch_hook;
    215216
    216217        rc = rtems_extension_create(rtems_build_name('F', 'D', 'L', 'E'),
  • c/src/lib/libbsp/i386/force386/console/console.c

    rb3ac6a8d r3652ad35  
    267267    outbyte( buffer[ count ] );
    268268  }
    269   return maximum;
     269
     270  rw_args->bytes_moved = maximum;
     271  return 0;
    270272}
    271273 
  • c/src/lib/libbsp/i386/force386/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    7575    else
    7676        libc_init(0);                /* non-reentrant */
    77 
     77}
     78
     79/*
     80 *  Function:   bsp_pretasking_hook
     81 *  Created:    95/03/10
     82 *
     83 *  Description:
     84 *      BSP pretasking hook.  Called just before drivers are initialized.
     85 *      Used to setup libc and install any BSP extensions.
     86 *
     87 *  NOTES:
     88 *      Must not use libc (to do io) from here, since drivers are
     89 *      not yet initialized.
     90 *
     91 */
     92 
     93void
     94bsp_pretasking_hook(void)
     95{
     96    bsp_libc_init();
     97 
     98#ifdef STACK_CHECKER_ON
    7899    /*
    79100     *  Initialize the stack bounds checker
     101     *  We can either turn it on here or from the app.
    80102     */
    81 
    82 #ifdef STACK_CHECKER_ON
     103 
    83104    Stack_check_Initialize();
    84105#endif
    85 
    86 }
     106 
     107#ifdef RTEMS_DEBUG
     108    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
     109#endif
     110}
     111 
    87112
    88113/*
     
    136161   */
    137162
    138   Cpu_table.pretasking_hook = NULL;
    139 
    140   Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
     163  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     164
     165  Cpu_table.predriver_hook = NULL;
    141166
    142167  Cpu_table.postdriver_hook = bsp_postdriver_hook;
  • c/src/lib/libbsp/i386/go32/console/console.c

    rb3ac6a8d r3652ad35  
    238238    outbyte( buffer[ count ] );
    239239  }
    240   return maximum;
     240
     241  rw_args->bytes_moved = maximum;
     242  return 0;
    241243}
    242244 
  • c/src/lib/libbsp/i386/go32/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    8282    else
    8383        libc_init(0);                /* non-reentrant */
    84 
     84}
     85 
     86/*
     87 *  Function:   bsp_pretasking_hook
     88 *  Created:    95/03/10
     89 *
     90 *  Description:
     91 *      BSP pretasking hook.  Called just before drivers are initialized.
     92 *      Used to setup libc and install any BSP extensions.
     93 *
     94 *  NOTES:
     95 *      Must not use libc (to do io) from here, since drivers are
     96 *      not yet initialized.
     97 *
     98 */
     99 
     100void
     101bsp_pretasking_hook(void)
     102{
     103    bsp_libc_init();
     104 
     105#ifdef STACK_CHECKER_ON
    85106    /*
    86107     *  Initialize the stack bounds checker
     108     *  We can either turn it on here or from the app.
    87109     */
    88 
    89 #ifdef STACK_CHECKER_ON
     110 
    90111    Stack_check_Initialize();
    91112#endif
    92 
    93 }
    94  
     113 
     114#ifdef RTEMS_DEBUG
     115    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
     116#endif
     117}
     118 
     119
    95120/*
    96121 * After drivers are setup, register some "filenames"
     
    139164    rtems_progname = "RTEMS";
    140165
    141   Cpu_table.pretasking_hook     = NULL;
    142   Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
     166  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     167  Cpu_table.predriver_hook = NULL;
    143168  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    144169  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
  • c/src/lib/libbsp/i960/cvme961/console/console.c

    rb3ac6a8d r3652ad35  
    193193    outbyte( buffer[ count ] );
    194194  }
    195   return maximum;
     195
     196  rw_args->bytes_moved = maximum;
     197  return 0;
    196198}
    197199 
  • c/src/lib/libbsp/i960/cvme961/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    7777    else
    7878        libc_init(0);                /* non-reentrant */
     79}
     80
     81/*
     82 *  Function:   bsp_pretasking_hook
     83 *  Created:    95/03/10
     84 *
     85 *  Description:
     86 *      BSP pretasking hook.  Called just before drivers are initialized.
     87 *      Used to setup libc and install any BSP extensions.
     88 *
     89 *  NOTES:
     90 *      Must not use libc (to do io) from here, since drivers are
     91 *      not yet initialized.
     92 *
     93 */
     94 
     95void
     96bsp_pretasking_hook(void)
     97{
     98    bsp_libc_init();
     99 
     100#ifdef STACK_CHECKER_ON
    79101    /*
    80102     *  Initialize the stack bounds checker
     103     *  We can either turn it on here or from the app.
    81104     */
    82 
    83 #ifdef STACK_CHECKER_ON
     105 
    84106    Stack_check_Initialize();
    85107#endif
    86 }
     108 
     109#ifdef RTEMS_DEBUG
     110    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
     111#endif
     112}
     113 
    87114
    88115/*
     
    153180   */
    154181
    155   Cpu_table.pretasking_hook = NULL;
    156 
    157   Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
     182  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     183
     184  Cpu_table.predriver_hook = NULL;
    158185
    159186  Cpu_table.postdriver_hook = bsp_postdriver_hook;
  • c/src/lib/libbsp/m68k/dmv152/console/console.c

    rb3ac6a8d r3652ad35  
    231231    outbyte( buffer[ count ] );
    232232  }
    233   return maximum;
     233
     234  rw_args->bytes_moved = maximum;
     235  return 0;
    234236}
    235237
  • c/src/lib/libbsp/m68k/dmv152/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    7676    else
    7777        libc_init(0);                /* non-reentrant */
    78 
     78}
     79
     80/*
     81 *  Function:   bsp_pretasking_hook
     82 *  Created:    95/03/10
     83 *
     84 *  Description:
     85 *      BSP pretasking hook.  Called just before drivers are initialized.
     86 *      Used to setup libc and install any BSP extensions.
     87 *
     88 *  NOTES:
     89 *      Must not use libc (to do io) from here, since drivers are
     90 *      not yet initialized.
     91 *
     92 */
     93 
     94void
     95bsp_pretasking_hook(void)
     96{
     97    bsp_libc_init();
     98 
     99#ifdef STACK_CHECKER_ON
    79100    /*
    80101     *  Initialize the stack bounds checker
     102     *  We can either turn it on here or from the app.
    81103     */
    82 
    83 #ifdef STACK_CHECKER_ON
     104 
    84105    Stack_check_Initialize();
    85106#endif
    86 }
     107 
     108#ifdef RTEMS_DEBUG
     109    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
     110#endif
     111}
     112 
    87113
    88114/*
     
    159185   */
    160186
    161   Cpu_table.pretasking_hook = NULL;
    162 
    163   Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
     187  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     188
     189  Cpu_table.predriver_hook = NULL;
    164190
    165191  Cpu_table.postdriver_hook = bsp_postdriver_hook;
  • c/src/lib/libbsp/m68k/gen68302/console/console.c

    rb3ac6a8d r3652ad35  
    286286    outbyte( buffer[ count ] );
    287287  }
    288   return maximum;
     288
     289  rw_args->bytes_moved = maximum;
     290  return 0;
    289291}
    290292
  • c/src/lib/libbsp/m68k/gen68302/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    8383    else
    8484        libc_init(0);                /* non-reentrant */
    85 
     85}
     86
     87/*
     88 *  Function:   bsp_pretasking_hook
     89 *  Created:    95/03/10
     90 *
     91 *  Description:
     92 *      BSP pretasking hook.  Called just before drivers are initialized.
     93 *      Used to setup libc and install any BSP extensions.
     94 *
     95 *  NOTES:
     96 *      Must not use libc (to do io) from here, since drivers are
     97 *      not yet initialized.
     98 *
     99 */
     100 
     101void
     102bsp_pretasking_hook(void)
     103{
     104    bsp_libc_init();
     105 
     106#ifdef STACK_CHECKER_ON
    86107    /*
    87108     *  Initialize the stack bounds checker
    88      */
    89 
    90 #ifdef STACK_CHECKER_ON
     109     *  We can either turn it on here or from the app.
     110     */
     111 
    91112    Stack_check_Initialize();
    92113#endif
    93 }
     114 
     115#ifdef RTEMS_DEBUG
     116    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
     117#endif
     118}
     119 
    94120
    95121/*
     
    193219   */
    194220
    195   Cpu_table.pretasking_hook = NULL;
    196 
    197   Cpu_table.predriver_hook = bsp_libc_init;    /* RTEMS resources available */
     221  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     222
     223  Cpu_table.predriver_hook = NULL;
    198224
    199225  Cpu_table.postdriver_hook = bsp_postdriver_hook;
  • c/src/lib/libbsp/m68k/idp/console/console.c

    rb3ac6a8d r3652ad35  
    266266    outbyte( buffer[ count ], minor  );
    267267  }
    268   return maximum;
     268
     269  rw_args->bytes_moved = maximum;
     270  return 0;
    269271}
    270272
  • c/src/lib/libbsp/m68k/idp/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    8484        else
    8585        libc_init(0);                /* non-reentrant */
    86  
     86}
     87
     88/*
     89 *  Function:   bsp_pretasking_hook
     90 *  Created:    95/03/10
     91 *
     92 *  Description:
     93 *      BSP pretasking hook.  Called just before drivers are initialized.
     94 *      Used to setup libc and install any BSP extensions.
     95 *
     96 *  NOTES:
     97 *      Must not use libc (to do io) from here, since drivers are
     98 *      not yet initialized.
     99 *
     100 */
     101 
     102void
     103bsp_pretasking_hook(void)
     104{
     105    bsp_libc_init();
     106 
     107#ifdef STACK_CHECKER_ON
    87108    /*
    88109     *  Initialize the stack bounds checker
     110     *  We can either turn it on here or from the app.
    89111     */
    90112 
    91 #ifdef STACK_CHECKER_ON
    92113    Stack_check_Initialize();
     114#endif
     115 
     116#ifdef RTEMS_DEBUG
     117    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
    93118#endif
    94119}
     
    167192   */
    168193 
    169   Cpu_table.pretasking_hook = NULL;
    170  
    171   Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
    172  
     194  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     195
     196  Cpu_table.predriver_hook = NULL;
     197
    173198  Cpu_table.postdriver_hook = bsp_postdriver_hook;
    174  
     199
    175200  Cpu_table.idle_task = NULL;  /* do not override system IDLE task */
    176201
  • c/src/lib/libbsp/m68k/mvme136/console/console.c

    rb3ac6a8d r3652ad35  
    206206    outbyte( buffer[ count ] );
    207207  }
    208   return maximum;
     208
     209  rw_args->bytes_moved = maximum;
     210  return 0;
    209211}
    210212
  • c/src/lib/libbsp/m68k/mvme136/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    5454    extern int end;
    5555    rtems_unsigned32        heap_start;
    56 
    57 #ifdef RTEMS_DEBUG
    58     rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
    59 #endif
    6056
    6157    heap_start = (rtems_unsigned32) &end;
     
    8177    else
    8278        libc_init(0);                /* non-reentrant */
    83 
     79}
     80
     81/*
     82 *  Function:   bsp_pretasking_hook
     83 *  Created:    95/03/10
     84 *
     85 *  Description:
     86 *      BSP pretasking hook.  Called just before drivers are initialized.
     87 *      Used to setup libc and install any BSP extensions.
     88 *
     89 *  NOTES:
     90 *      Must not use libc (to do io) from here, since drivers are
     91 *      not yet initialized.
     92 *
     93 */
     94 
     95void
     96bsp_pretasking_hook(void)
     97{
     98    bsp_libc_init();
     99 
     100#ifdef STACK_CHECKER_ON
    84101    /*
    85102     *  Initialize the stack bounds checker
     103     *  We can either turn it on here or from the app.
    86104     */
    87 
    88 #ifdef STACK_CHECKER_ON
     105 
    89106    Stack_check_Initialize();
    90107#endif
    91 }
     108 
     109#ifdef RTEMS_DEBUG
     110    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
     111#endif
     112}
     113 
    92114
    93115/*
     
    153175   */
    154176
    155   Cpu_table.pretasking_hook = NULL;
    156 
    157   Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
     177  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     178
     179  Cpu_table.predriver_hook = NULL;
    158180
    159181  Cpu_table.postdriver_hook = bsp_postdriver_hook;
  • c/src/lib/libbsp/m68k/mvme162/console/console.c

    rb3ac6a8d r3652ad35  
    238238    outbyte( buffer[ count ], minor  );
    239239  }
    240   return maximum;
     240
     241  rw_args->bytes_moved = maximum;
     242  return 0;
    241243}
    242244
  • c/src/lib/libbsp/m68k/mvme162/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    8383    else
    8484        libc_init(0);                /* non-reentrant */
    85 
     85}
     86
     87/*
     88 *  Function:   bsp_pretasking_hook
     89 *  Created:    95/03/10
     90 *
     91 *  Description:
     92 *      BSP pretasking hook.  Called just before drivers are initialized.
     93 *      Used to setup libc and install any BSP extensions.
     94 *
     95 *  NOTES:
     96 *      Must not use libc (to do io) from here, since drivers are
     97 *      not yet initialized.
     98 *
     99 */
     100 
     101void
     102bsp_pretasking_hook(void)
     103{
     104    bsp_libc_init();
     105 
     106#ifdef STACK_CHECKER_ON
    86107    /*
    87108     *  Initialize the stack bounds checker
     109     *  We can either turn it on here or from the app.
    88110     */
    89 
    90 #ifdef STACK_CHECKER_ON
     111 
    91112    Stack_check_Initialize();
    92113#endif
    93 }
     114 
     115#ifdef RTEMS_DEBUG
     116    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
     117#endif
     118}
     119 
    94120
    95121/*
     
    166192   */
    167193
    168   Cpu_table.pretasking_hook = NULL;
    169 
    170   Cpu_table.predriver_hook = bsp_libc_init;  /* RTEMS resources available */
     194  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     195
     196  Cpu_table.predriver_hook = NULL;
    171197
    172198  Cpu_table.postdriver_hook = bsp_postdriver_hook;
  • c/src/lib/libbsp/no_cpu/no_bsp/console/console.c

    rb3ac6a8d r3652ad35  
    205205    outbyte( buffer[ count ] );
    206206  }
    207   return maximum;
     207
     208  rw_args->bytes_moved = maximum;
     209  return 0;
    208210}
    209211
  • c/src/lib/libbsp/no_cpu/no_bsp/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    8484    else
    8585        libc_init(0);                /* non-reentrant */
    86 
     86}
     87
     88/*
     89 *  Function:   bsp_pretasking_hook
     90 *  Created:    95/03/10
     91 *
     92 *  Description:
     93 *      BSP pretasking hook.  Called just before drivers are initialized.
     94 *      Used to setup libc and install any BSP extensions.
     95 *
     96 *  NOTES:
     97 *      Must not use libc (to do io) from here, since drivers are
     98 *      not yet initialized.
     99 *
     100 */
     101 
     102void
     103bsp_pretasking_hook(void)
     104{
     105    bsp_libc_init();
     106 
     107#ifdef STACK_CHECKER_ON
    87108    /*
    88109     *  Initialize the stack bounds checker
    89      */
    90 
    91 #ifdef STACK_CHECKER_ON
     110     *  We can either turn it on here or from the app.
     111     */
     112 
    92113    Stack_check_Initialize();
    93114#endif
    94 }
     115 
     116#ifdef RTEMS_DEBUG
     117    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
     118#endif
     119}
     120 
    95121
    96122/*
     
    120146}
    121147
    122 int main(
     148int bsp_start(
    123149  int argc,
    124150  char **argv,
     
    197223   */
    198224
    199   Cpu_table.pretasking_hook = NULL;
    200 
    201   Cpu_table.predriver_hook = bsp_libc_init;    /* RTEMS resources available */
     225  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     226
     227  Cpu_table.predriver_hook = NULL;
    202228
    203229  Cpu_table.postdriver_hook = bsp_postdriver_hook;
  • c/src/lib/libbsp/no_cpu/no_bsp/startup/main.c

    rb3ac6a8d r3652ad35  
    2020int main(
    2121  int   argc,
    22   char **argv
     22  char **argv,
     23  char **environp
    2324)
    2425{
    25   bsp_start();
     26  bsp_start( argc, argv, environp );
    2627
    2728  /*
  • c/src/lib/libbsp/powerpc/papyrus/startup/bspstart.c

    rb3ac6a8d r3652ad35  
    102102        libc_init(0);                /* non-reentrant */
    103103
     104}
     105
     106/*
     107 *  Function:   bsp_pretasking_hook
     108 *  Created:    95/03/10
     109 *
     110 *  Description:
     111 *      BSP pretasking hook.  Called just before drivers are initialized.
     112 *      Used to setup libc and install any BSP extensions.
     113 *
     114 *  NOTES:
     115 *      Must not use libc (to do io) from here, since drivers are
     116 *      not yet initialized.
     117 *
     118 */
     119 
     120void
     121bsp_pretasking_hook(void)
     122{
     123    bsp_libc_init();
     124 
     125#ifdef STACK_CHECKER_ON
    104126    /*
    105127     *  Initialize the stack bounds checker
    106      */
    107 
    108 #ifdef STACK_CHECKER_ON
     128     *  We can either turn it on here or from the app.
     129     */
     130 
    109131    Stack_check_Initialize();
    110132#endif
    111 }
     133 
     134#ifdef RTEMS_DEBUG
     135    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
     136#endif
     137}
     138 
    112139
    113140/*
     
    205232   */
    206233
    207   /*
    208    *  we do not use the pretasking_hook
    209    */
    210 
    211   Cpu_table.pretasking_hook = NULL;
    212 
    213   Cpu_table.predriver_hook = bsp_libc_init;    /* RTEMS resources available */
     234  Cpu_table.pretasking_hook = bsp_pretasking_hook;  /* init libc, etc. */
     235
     236  Cpu_table.predriver_hook = NULL;
    214237
    215238  Cpu_table.postdriver_hook = bsp_postdriver_hook;
  • c/src/lib/libmisc/monitor/mon-object.c

    rb3ac6a8d r3652ad35  
    131131#warning "TONY... FIX ME!!!!!"
    132132#if defined(hppa1_1)
    133 #error "TONY... I SAID TO FIX ME!!!!!  <HAHAHAHAHA>"
     133#warning "TONY... I SAID TO FIX ME!!!!!  <HAHAHAHAHA>"
    134134#endif
    135135        id = _Objects_Build_id(0, default_node, rtems_get_index(id));
  • c/src/lib/libmisc/monitor/mon-queue.c

    rb3ac6a8d r3652ad35  
    1919
    2020    canonical_queue->attributes = rtems_queue->attribute_set;
    21     canonical_queue->maximum_message_size = rtems_queue->maximum_message_size;
    22     canonical_queue->maximum_pending_messages = rtems_queue->maximum_pending_messages;
    23     canonical_queue->number_of_pending_messages = rtems_queue->number_of_pending_messages;
     21    canonical_queue->maximum_message_size = rtems_queue->message_queue.maximum_message_size;
     22    canonical_queue->maximum_pending_messages = rtems_queue->message_queue.maximum_pending_messages;
     23    canonical_queue->number_of_pending_messages = rtems_queue->message_queue.number_of_pending_messages;
    2424}
    2525
Note: See TracChangeset for help on using the changeset viewer.