Ignore:
Timestamp:
Sep 11, 1995, 7:35:39 PM (26 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
ced11f99
Parents:
5072b07
Message:

The word "RTEMS" almost completely removed from the core.

Configuration Table Template file added and all tests
modified to use this. All gvar.h and conftbl.h files
removed from test directories.

Configuration parameter maximum_devices added.

Core semaphore and mutex handlers added and RTEMS API Semaphore
Manager updated to reflect this.

Initialization sequence changed to invoke API specific initialization
routines. Initialization tasks table now owned by RTEMS Tasks Manager.

Added user extension for post-switch.

Utilized user extensions to implement API specific functionality
like signal dispatching.

Added extensions to the System Initialization Thread so that an
API can register a function to be invoked while the system
is being initialized. These are largely equivalent to the
pre-driver and post-driver hooks.

Added the Modules file oar-go32_p5, modified oar-go32, and modified
the file make/custom/go32.cfg to look at an environment varable which
determines what CPU model is being used.

All BSPs updated to reflect named devices and clock driver's IOCTL
used by the Shared Memory Driver. Also merged clock isr into
main file and removed ckisr.c where possible.

Updated spsize to reflect new and moved variables.

Makefiles for the executive source and include files updated to show
break down of files into Core, RTEMS API, and Neither.

Header and inline files installed into subdirectory based on whether
logically in the Core or a part of the RTEMS API.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/force386/clock/ckinit.c

    r5072b07 r3a4ae6c  
    2020
    2121#include <bsp.h>
    22 #include <clockdrv.h>
     22
     23#include <rtems/libio.h>
     24
    2325#include <stdlib.h>
    2426
     27#define CLOCK_VECTOR  0x38
     28
     29rtems_unsigned32 Clock_isrs;              /* ISRs until next tick */
     30
    2531volatile rtems_unsigned32 Clock_driver_ticks;
    26 rtems_unsigned32 Clock_isrs;              /* ISRs until next tick */
     32
    2733rtems_isr_entry  Old_ticker;
    2834
    29 rtems_device_driver Clock_initialize(
    30   rtems_device_major_number major,
    31   rtems_device_minor_number minor,
    32   void *pargp,
    33   rtems_id tid,
    34   rtems_unsigned32 *rval
     35void Clock_exit( void );
     36 
     37/*
     38 * These are set by clock driver during its init
     39 */
     40 
     41rtems_device_major_number rtems_clock_major = ~0;
     42rtems_device_major_number rtems_clock_minor = 0;
     43
     44/*
     45 *  This is the ISR handler.
     46 */
     47
     48rtems_isr Clock_isr(
     49  rtems_vector_number vector
    3550)
    3651{
    37   Install_clock( Clock_isr );
    38 }
    39 
    40 void ReInstall_clock(
    41   rtems_isr_entry clock_isr
    42 )
    43 {
    44   rtems_unsigned32 isrlevel = 0;
    45 
    46   rtems_interrupt_disable( isrlevel );
    47    (void) set_vector( clock_isr, 0x38, 1 );
    48   rtems_interrupt_enable( isrlevel );
     52  /* enable_tracing(); */
     53  Clock_driver_ticks += 1;
     54  if ( Clock_isrs == 1 ) {
     55    rtems_clock_tick();
     56    Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
     57  }
     58  else
     59    Clock_isrs -= 1;
    4960}
    5061
     
    5768
    5869  if ( BSP_Configuration.ticks_per_timeslice ) {
    59     Old_ticker = ( rtems_isr_entry ) set_vector( clock_isr, 0x38, 1 );
     70    Old_ticker = ( rtems_isr_entry ) set_vector( clock_isr, CLOCK_VECTOR, 1 );
    6071    outport_byte( TBCR, 0x14 );  /* reset it, delay mode, 50X */
    6172    outport_byte( TBDR, 0x50 );  /* 1 millisecond */
     
    6374  }
    6475  atexit( Clock_exit );
     76}
     77
     78void ReInstall_clock(
     79  rtems_isr_entry clock_isr
     80)
     81{
     82  rtems_unsigned32 isrlevel = 0;
     83
     84  rtems_interrupt_disable( isrlevel );
     85   (void) set_vector( clock_isr, CLOCK_VECTOR, 1 );
     86  rtems_interrupt_enable( isrlevel );
    6587}
    6688
     
    7496}
    7597
     98rtems_device_driver Clock_initialize(
     99  rtems_device_major_number major,
     100  rtems_device_minor_number minor,
     101  void *pargp
     102)
     103{
     104  Install_clock( Clock_isr );
     105 
     106  /*
     107   * make major/minor avail to others such as shared memory driver
     108   */
     109 
     110  rtems_clock_major = major;
     111  rtems_clock_minor = minor;
     112 
     113  return RTEMS_SUCCESSFUL;
     114}
     115 
     116rtems_device_driver Clock_control(
     117  rtems_device_major_number major,
     118  rtems_device_minor_number minor,
     119  void *pargp
     120)
     121{
     122    rtems_libio_ioctl_args_t *args = pargp;
     123 
     124    if (args == 0)
     125        goto done;
     126 
     127    /*
     128     * This is hokey, but until we get a defined interface
     129     * to do this, it will just be this simple...
     130     */
     131 
     132    if (args->command == rtems_build_name('I', 'S', 'R', ' '))
     133    {
     134        Clock_isr(CLOCK_VECTOR);
     135    }
     136    else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
     137    {
     138        ReInstall_clock(args->buffer);
     139    }
     140 
     141done:
     142    return RTEMS_SUCCESSFUL;
     143}
Note: See TracChangeset for help on using the changeset viewer.