Changeset 289


Ignore:
Timestamp:
May 6, 2017, 8:08:32 PM (7 years ago)
Author:
nmir-saito
Message:

tsk_apri_list変数を使わないようにtask.trbを変更

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rubycfg_ssp/trunk/task.trb

    r288 r289  
    5050  def initialize()
    5151    super("tsk", "task")
    52     @tsk_apri_list = []
    5352    @reallocate_atskpri = {}
    5453    @reallocate_etskpri = {}
     
    6261
    6362    ($cfgData[:CRE_TSK].sort_by {|e| e[1][:atskpri].val}).each.with_index(1) do |e, index|
    64       @tsk_apri_list.push(e[0])
    6563      @reallocate_atskpri[e[0]] = index
    6664      $kernelCfgH.add("#define #{e[1][:tskid].str} #{index}")
     
    145143
    146144      # atskpri が重複する場合 (E_PAR)
    147       @tsk_apri_list.each do |id|
     145      @reallocate_atskpri.each_key do |id|
    148146        if (params[:tskid].val != id) && (params[:atskpri] == $cfgData[@api][id][:atskpri])
    149147          error_illegal_id("E_PAR", params, :atskpri, :tskid)
     
    196194    # タスク属性(tskatr)
    197195    $kernelCfgC.append("const ATR\t_kernel_tinib_tskatr[TNUM_TSKID] = {")
    198     @tsk_apri_list.each.with_index do |id, index|
     196    @reallocate_atskpri.each_key.with_index do |id, index|
    199197      tskatr = $cfgData[@api][id][:tskatr]
    200198      $kernelCfgC.append(",") if index > 0
     
    210208    # 拡張情報(exinf)
    211209    $kernelCfgC.append("const intptr_t\t_kernel_tinib_exinf[TNUM_TSKID] = {")
    212     @tsk_apri_list.each.with_index do |id, index|
     210    @reallocate_atskpri.each_key.with_index do |id, index|
    213211      exinf = $cfgData[@api][id][:exinf]
    214212      $kernelCfgC.append(",") if index > 0
     
    219217    # 起動番地(task)
    220218    $kernelCfgC.append("const TASK\t_kernel_tinib_task[TNUM_TSKID] = {")
    221     @tsk_apri_list.each.with_index do |id, index|
     219    @reallocate_atskpri.each_key.with_index do |id, index|
    222220      task = $cfgData[@api][id][:task]
    223221      $kernelCfgC.append(",") if index > 0
     
    228226    # 実行時優先度(etskpri)
    229227    $kernelCfgC.append("const uint_t\t_kernel_tinib_epriority[TNUM_TSKID] = {")
    230     @tsk_apri_list.each.with_index do |id, index|
     228    @reallocate_atskpri.each_key.with_index do |id, index|
    231229      begin
    232230        # 実行時優先度がDEF_EPR で定義されていない場合,起動優先度の設定値を使う
     
    238236        end
    239237 
    240         @tsk_apri_list.each do |id2|
     238        @reallocate_atskpri.each_key do |id2|
    241239          if epri <= $cfgData[@api][id2][:atskpri]
    242240            $kernelCfgC.append(",") if index > 0
     
    258256    $kernelCfgC.add("/*")
    259257    $kernelCfgC.add(" * Configuration result of task priority:")
    260     @tsk_apri_list.each do |id|
     258    @reallocate_atskpri.each_key do |id|
    261259      $kernelCfgC.append(" * \t#{$cfgData[@api][id][:tskid]}:\tIPRI = #{@reallocate_atskpri[id]}")
    262260      $kernelCfgC.add(", EXEPRI = #{@reallocate_etskpri[id]}")
Note: See TracChangeset for help on using the changeset viewer.