Ignore:
Timestamp:
Jul 3, 2020, 7:19:17 PM (4 years ago)
Author:
coas-nagasima
Message:

ASP3, TINET, mbed を更新

File:
1 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/asp3_dcre/syssvc/tHistogramAdapter.c

    r321 r429  
    11/*
    2  *  TOPPERS/ASP Kernel
    3  *      Toyohashi Open Platform for Embedded Real-Time Systems/
    4  *      Advanced Standard Profile Kernel
     2 *  TOPPERS Software
     3 *      Toyohashi Open Platform for Embedded Real-Time Systems
    54 *
    6  *  Copyright (C) 2016 by Embedded and Real-Time Systems Laboratory
     5 *  Copyright (C) 2016-2018 by Embedded and Real-Time Systems Laboratory
    76 *              Graduate School of Information Science, Nagoya Univ., JAPAN
    87 *
     
    4847
    4948/*
     49 *  実行時間分布計測IDの範囲の判定
     50 */
     51#define VALID_HISTID(histid)    (1 <= histid && histid <= N_CP_cHistogram)
     52
     53/*
    5054 *  実行時間分布計測の初期化(サービスコール)
    5155 */
    52 void
     56ER
    5357init_hist(ID histid)
    5458{
    55         assert(1 <= histid && histid <= N_CP_cHistogram);
    56         return(cHistogram_initialize(histid - 1));
     59        ER              ercd;
     60
     61        if (!VALID_HISTID(histid)) {
     62                ercd = E_ID;
     63        }
     64        else {
     65                ercd = cHistogram_initialize(histid - 1);
     66        }
     67        return(ercd);
    5768}
    5869
     
    6071 *  実行時間計測の開始
    6172 */
    62 void
     73ER
    6374begin_measure(ID histid)
    6475{
    65         assert(1 <= histid && histid <= N_CP_cHistogram);
    66         return(cHistogram_beginMeasure(histid - 1));
     76        ER              ercd;
     77
     78        if (!VALID_HISTID(histid)) {
     79                ercd = E_ID;
     80        }
     81        else {
     82                ercd = cHistogram_beginMeasure(histid - 1);
     83        }
     84        return(ercd);
    6785}
    6886
     
    7088 *  実行時間計測の終了
    7189 */
    72 void
     90ER
    7391end_measure(ID histid)
    7492{
    75         assert(1 <= histid && histid <= N_CP_cHistogram);
    76         return(cHistogram_endMeasure(histid - 1));
     93        ER              ercd;
     94
     95        if (!VALID_HISTID(histid)) {
     96                ercd = E_ID;
     97        }
     98        else {
     99                ercd = cHistogram_endMeasure(histid - 1);
     100        }
     101        return(ercd);
    77102}
    78103
     
    80105 *  実行時間分布計測の表示
    81106 */
    82 void
     107ER
    83108print_hist(ID histid)
    84109{
    85         assert(1 <= histid && histid <= N_CP_cHistogram);
    86         return(cHistogram_print(histid - 1));
     110        ER              ercd;
     111
     112        if (!VALID_HISTID(histid)) {
     113                ercd = E_ID;
     114        }
     115        else {
     116                ercd = cHistogram_print(histid - 1);
     117        }
     118        return(ercd);
    87119}
Note: See TracChangeset for help on using the changeset viewer.