Ignore:
Timestamp:
Sep 18, 2012, 6:38:49 PM (12 years ago)
Author:
karaoui
Message:
  • updating irq_handler.c/drivers.c to support the nex affectations of timers
  • When using an xicu the number of timer is set to 32
File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/sys/drivers.c

    r215 r216  
    7878#endif
    7979
    80 #if ( (NB_TIMERS_MAX + NB_PROCS_MAX) > 32 )
     80#if ( (NB_TIMERS_MAX) > 32 )
    8181# error: NB_TIMERS_MAX + NB_PROCS_MAX cannot be larger than 32
    8282#endif
     
    111111//   local_id in [0, NB_PROCS_MAX-1],
    112112// - "user" timers : requested by the task in the mapping_info data structure.
    113 //   local_id in [NB_PROC_MAX, NB_PROCS_MAX + NB_TIMERS_MAX - 1]
    114113//   For each user timer, the timer_id is stored in the context of the task.
    115114// The global index is cluster_id * (NB_PROCS_MAX+NB_TIMERS_MAX) + local_id
     
    136135{
    137136    // parameters checking
    138     if ( cluster_id >= NB_CLUSTERS)                                     return 1;
    139     if ( local_id >= NB_TIMERS_MAX + NB_PROCS_MAX ) return 1;
     137    if ( cluster_id >= NB_CLUSTERS)     return 1;
     138    if ( local_id >= NB_TIMERS_MAX) return 2;
    140139
    141140#if USE_XICU
     
    164163{
    165164    // parameters checking
    166     if ( cluster_id >= NB_CLUSTERS)                                     return 1;
    167     if ( local_id >= NB_TIMERS_MAX + NB_PROCS_MAX ) return 1;
     165    if ( cluster_id >= NB_CLUSTERS)      return 1;
     166    if ( local_id >= NB_TIMERS_MAX ) return 2;
    168167
    169168#if USE_XICU
     
    193192{
    194193    // parameters checking
    195     if ( cluster_id >= NB_CLUSTERS)                                     return 1;
    196     if ( local_id >= NB_TIMERS_MAX + NB_PROCS_MAX ) return 1;
     194    if ( cluster_id >= NB_CLUSTERS)      return 1;
     195    if ( local_id >= NB_TIMERS_MAX ) return 2;
    197196
    198197#if USE_XICU
Note: See TracChangeset for help on using the changeset viewer.