Ignore:
Timestamp:
Jun 26, 2017, 6:45:41 PM (7 years ago)
Author:
ertl-honda
Message:

3.0.0のリリース版に追従

Location:
asp3_wo_tecs/trunk/test
Files:
4 added
10 edited

Legend:

Unmodified
Added
Removed
  • asp3_wo_tecs/trunk/test/bit_kernel.c

    r302 r305  
    44 *      Advanced Standard Profile Kernel
    55 *
    6  *  Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
     6 *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
    77 *              Graduate School of Information Science, Nagoya Univ., JAPAN
    88 *
     
    5151 *  の責任を負わない.
    5252 *
    53  *  $Id: bit_kernel.c 456 2015-08-16 06:11:51Z ertl-hiro $
     53 *  $Id: bit_kernel.c 554 2016-01-17 13:21:59Z ertl-hiro $
    5454 */
    5555
     
    167167#endif /* PRIMAP_BIT */
    168168
     169Inline bool_t
     170primap_empty(void)
     171{
     172#ifndef PRIMAP_LEVEL_2
     173        return(ready_primap == 0U);
     174#else /* PRIMAP_LEVEL_2 */
     175        return(ready_primap1 == 0U);
     176#endif /* PRIMAP_LEVEL_2 */
     177}
     178
     179Inline uint16_t
     180primap_extract_bit(uint_t pri)
     181{
     182#ifndef PRIMAP_LEVEL_2
     183        return(ready_primap & PRIMAP_BIT(pri));
     184#else /* PRIMAP_LEVEL_2 */
     185        return(ready_primap2[pri / TBIT_PRIMAP] & PRIMAP_BIT(pri % TBIT_PRIMAP));
     186#endif /* PRIMAP_LEVEL_2 */
     187}
     188
    169189static ER
    170190bit_schedcb(void)
     
    178198         */
    179199        if (enadsp) {
    180                 if (ready_primap == 0U) {
     200                if (primap_empty()) {
    181201                        if (p_schedtsk != NULL) {
    182202                                return(E_SYS_LINENO);
     
    189209                }
    190210        }
     211
     212#ifdef PRIMAP_LEVEL_2
     213        /*
     214         *  ready_primap1とready_primap2の整合性の検査
     215         */
     216        for (pri = 0; pri < TNUM_TPRI; pri += TBIT_PRIMAP) {
     217                if (ready_primap2[pri / TBIT_PRIMAP] == 0U) {
     218                        if ((ready_primap1 & PRIMAP_BIT(pri / TBIT_PRIMAP)) != 0U) {
     219                                return(E_SYS_LINENO);
     220                        }
     221                }
     222                else {
     223                        if ((ready_primap1 & PRIMAP_BIT(pri / TBIT_PRIMAP)) == 0U) {
     224                                return(E_SYS_LINENO);
     225                        }
     226                }
     227        }
     228#endif /* PRIMAP_LEVEL_2 */
    191229
    192230        /*
     
    196234                p_queue = ready_queue[pri].p_next;
    197235                if (p_queue == &ready_queue[pri]) {
    198                         if ((ready_primap & PRIMAP_BIT(pri)) != 0U) {
     236                        if (primap_extract_bit(pri) != 0U) {
    199237                                return(E_SYS_LINENO);
    200238                        }
    201239                }
    202240                else {
    203                         if ((ready_primap & PRIMAP_BIT(pri)) == 0U) {
     241                        if (primap_extract_bit(pri) == 0U) {
    204242                                return(E_SYS_LINENO);
    205243                        }
  • asp3_wo_tecs/trunk/test/perf0.c

    r302 r305  
    5050 *  の責任を負わない.
    5151 *
    52  *  $Id: perf0.c 506 2016-01-12 01:46:49Z ertl-hiro $
     52 *  $Id: perf0.c 509 2016-01-12 06:06:14Z ertl-hiro $
    5353 */
    5454
     
    7171 */
    7272#define NO_MEASURE      10000U                  /* 計測回数 */
    73 #define MAX_TIME        1000U                   /* 実行時間分布を記録する最大時間 */
    74 
    75 /*
    76  *  実行時間分布を記録するメモリ領域
    77  */
    78 static uint_t   histarea1[MAX_TIME + 1];
    7973
    8074/*
     
    8680
    8781        syslog_0(LOG_NOTICE, "Performance evaluation program (0)");
    88         init_hist(1, MAX_TIME, histarea1);
     82        init_hist(1);
    8983
    9084        for (i = 0; i < NO_MEASURE; i++) {
  • asp3_wo_tecs/trunk/test/perf1.c

    r302 r305  
    5050 *  の責任を負わない.
    5151 *
    52  *  $Id: perf1.c 506 2016-01-12 01:46:49Z ertl-hiro $
     52 *  $Id: perf1.c 509 2016-01-12 06:06:14Z ertl-hiro $
    5353 */
    5454
     
    7171 */
    7272#define NO_MEASURE      10000U                  /* 計測回数 */
    73 #define MAX_TIME        1000U                   /* 実行時間分布を記録する最大時間 */
    74 
    75 /*
    76  *  実行時間分布を記録するメモリ領域
    77  */
    78 static uint_t   histarea1[MAX_TIME + 1];
    79 static uint_t   histarea2[MAX_TIME + 1];
    8073
    8174/*
     
    121114{
    122115        syslog_0(LOG_NOTICE, "Performance evaluation program (1)");
    123         init_hist(1, MAX_TIME, histarea1);
    124         init_hist(2, MAX_TIME, histarea2);
     116        init_hist(1);
     117        init_hist(2);
    125118
    126119        act_tsk(TASK1);
  • asp3_wo_tecs/trunk/test/perf2.c

    r302 r305  
    5050 *  の責任を負わない.
    5151 *
    52  *  $Id: perf2.c 506 2016-01-12 01:46:49Z ertl-hiro $
     52 *  $Id: perf2.c 509 2016-01-12 06:06:14Z ertl-hiro $
    5353 */
    5454
     
    7373 */
    7474#define NO_MEASURE      10000U                  /* 計測回数 */
    75 #define MAX_TIME        1000U                   /* 実行時間分布を記録する最大時間 */
    76 
    77 /*
    78  *  実行時間分布を記録するメモリ領域
    79  */
    80 static uint_t   histarea1[MAX_TIME + 1];
    81 
    8275/*
    8376 *  計測ルーチン
     
    9184
    9285        ini_pdq(PDQ1);
    93         init_hist(1, MAX_TIME, histarea1);
     86        init_hist(1);
    9487
    9588        for (i = 0; i < n; i++) {
  • asp3_wo_tecs/trunk/test/perf3.c

    r302 r305  
    5050 *  の責任を負わない.
    5151 *
    52  *  $Id: perf3.c 506 2016-01-12 01:46:49Z ertl-hiro $
     52 *  $Id: perf3.c 509 2016-01-12 06:06:14Z ertl-hiro $
    5353 */
    5454
     
    7373 */
    7474#define NO_MEASURE      10000U                  /* 計測回数 */
    75 #define MAX_TIME        1000U                   /* 実行時間分布を記録する最大時間 */
    76 
    77 /*
    78  *  実行時間分布を記録するメモリ領域
    79  */
    80 static uint_t   histarea1[MAX_TIME + 1];
    8175
    8276/*
     
    109103        uint_t          i, j;
    110104
    111         init_hist(1, MAX_TIME, histarea1);
     105        init_hist(1);
    112106
    113107        for (i = 0; i < NO_MEASURE; i++) {
  • asp3_wo_tecs/trunk/test/perf4.c

    r302 r305  
    5050 *  の責任を負わない.
    5151 *
    52  *  $Id: perf4.c 506 2016-01-12 01:46:49Z ertl-hiro $
     52 *  $Id: perf4.c 509 2016-01-12 06:06:14Z ertl-hiro $
    5353 */
    5454
     
    100100 */
    101101#define NO_MEASURE      10000U                  /* 計測回数 */
    102 #define MAX_TIME        1000U                   /* 実行時間分布を記録する最大時間 */
    103 
    104 /*
    105  *  実行時間分布を記録するメモリ領域
    106  */
    107 static uint_t   histarea1[MAX_TIME + 1];
    108 static uint_t   histarea2[MAX_TIME + 1];
    109 static uint_t   histarea3[MAX_TIME + 1];
    110102
    111103/*
     
    174166
    175167        syslog_0(LOG_NOTICE, "Performance evaluation program (4)");
    176         init_hist(1, MAX_TIME, histarea1);
    177         init_hist(2, MAX_TIME, histarea2);
    178         init_hist(3, MAX_TIME, histarea3);
     168        init_hist(1);
     169        init_hist(2);
     170        init_hist(3);
    179171
    180172        /*
  • asp3_wo_tecs/trunk/test/perf5.c

    r302 r305  
    33 *      Toyohashi Open Platform for Embedded Real-Time Systems
    44 *
    5  *  Copyright (C) 2016 by Embedded and Real-Time Systems Laboratory
     5 *  Copyright (C) 2015,2016 by Embedded and Real-Time Systems Laboratory
    66 *              Graduate School of Information Science, Nagoya Univ., JAPAN
    77 *
     
    5050 *  の責任を負わない.
    5151 *
    52  *  $Id: perf5.c 506 2016-01-12 01:46:49Z ertl-hiro $
     52 *  $Id: perf5.c 544 2016-01-16 05:34:11Z ertl-hiro $
    5353 */
    5454
     
    7171 */
    7272#define NO_MEASURE      10000U                  /* 計測回数 */
    73 #define MAX_TIME        1000U                   /* 実行時間分布を記録する最大時間 */
    74 
    75 /*
    76  *  実行時間分布を記録するメモリ領域
    77  */
    78 static uint_t   histarea1[MAX_TIME + 1];
    79 static uint_t   histarea2[MAX_TIME + 1];
    80 static uint_t   histarea3[MAX_TIME + 1];
    81 static uint_t   histarea4[MAX_TIME + 1];
    82 static uint_t   histarea5[MAX_TIME + 1];
    83 static uint_t   histarea6[MAX_TIME + 1];
    8473
    8574/*
     
    123112
    124113        syslog_0(LOG_NOTICE, "Performance evaluation program (5)");
    125         init_hist(1, MAX_TIME, histarea1);
    126         init_hist(2, MAX_TIME, histarea2);
    127         init_hist(3, MAX_TIME, histarea3);
    128         init_hist(4, MAX_TIME, histarea4);
    129         init_hist(5, MAX_TIME, histarea5);
    130         init_hist(6, MAX_TIME, histarea6);
     114        init_hist(1);
     115        init_hist(2);
     116        init_hist(3);
     117        init_hist(4);
     118        init_hist(5);
     119        init_hist(6);
    131120
    132121        /*
  • asp3_wo_tecs/trunk/test/test_flg1.c

    r304 r305  
    5050 *  の責任を負わない.
    5151 *
    52  *  $Id: test_flg1.c 579 2016-02-03 07:29:11Z ertl-hiro $
     52 *  $Id: test_flg1.c 599 2016-02-07 03:33:35Z ertl-hiro $
    5353 */
    5454
     
    169169 *      TASK3: 低優å
    170170ˆåº¦ã‚¿ã‚¹ã‚¯
    171  *      TASK4: 中優å
    172 ˆåº¦ã‚¿ã‚¹ã‚¯
    173  *      TASK5: 中優å
    174 ˆåº¦ã‚¿ã‚¹ã‚¯
    175171 *      ALM1:  アラームハンドラ
    176172 *  FLG1:  TA_NULL属性,初期ビットパターン0x00
     
    191187 *      2:      loc_cpu()
    192188 *              set_flg(FLG1, 0x01) -> E_CTX                                                            ... (A-1)
    193  *              wai_flg(FLG1)
    194189 *              wai_flg(FLG1, 0x01, TWF_ORW, &flgptn) -> E_CTX                          ... (D-2)
    195190 *              unl_cpu()
     
    343338#include "syssvc/test_svc.h"
    344339#include "kernel_cfg.h"
    345 #include "test_sem1.h"
     340#include "test_flg1.h"
    346341
    347342/* DO NOT DELETE THIS LINE -- gentest depends on it. */
  • asp3_wo_tecs/trunk/test/test_flg1.h

    r304 r305  
    33 *      Toyohashi Open Platform for Embedded Real-Time Systems
    44 *
    5  *  Copyright (C) 2008-2014 by Embedded and Real-Time Systems Laboratory
     5 *  Copyright (C) 2015-2016 by Embedded and Real-Time Systems Laboratory
    66 *              Graduate School of Information Science, Nagoya Univ., JAPAN
    77 *
     
    5050 *  の責任を負わない.
    5151 *
    52  *  $Id: test_flg1.h 579 2016-02-03 07:29:11Z ertl-hiro $
     52 *  $Id: test_flg1.h 599 2016-02-07 03:33:35Z ertl-hiro $
    5353 */
    5454
    5555/*
    56  *              セマフォ機能のテスト(1)
     56 *              イベントフラグ機能のテスト(1)
    5757 */
    5858
  • asp3_wo_tecs/trunk/test/test_raster2.c

    r302 r305  
    5050 *  の責任を負わない.
    5151 *
    52  *  $Id: test_raster2.c 310 2015-02-08 13:46:46Z ertl-hiro $
     52 *  $Id: test_raster2.c 603 2016-02-07 12:42:10Z ertl-hiro $
    5353 */
    5454
     
    124124‹ã«ï¼»NGKI1178ï¼½
    125125 *      ASPカーネルに適用されない要求:
    126  *              ï¼»NGKI3485][NGKI3490][NGKI3497ï¼½
     126 *              ï¼»NGKI3764][NGKI3765][NGKI3497ï¼½
    127127 *
    128128 * 【使用リソース】
Note: See TracChangeset for help on using the changeset viewer.