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/tLogTaskMain.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 *
    65 *  Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
    76 *                              Toyohashi Univ. of Technology, JAPAN
    8  *  Copyright (C) 2005-2016 by Embedded and Real-Time Systems Laboratory
     7 *  Copyright (C) 2005-2018 by Embedded and Real-Time Systems Laboratory
    98 *              Graduate School of Information Science, Nagoya Univ., JAPAN
    109 *
     
    8281        }
    8382        else {
    84                 for (;;) {
     83                while (true) {
    8584                        if (cSysLog_refer(&rlog) < 0) {
    8685                                ercd = E_SYS;
     
    113112                        rercd = dly_tsk(ATTR_flushWait);
    114113                        if (rercd < 0) {
    115                                 ercd = (rercd == E_RLWAI) ? rercd : E_SYS;
     114                                ercd = (MERCD(rercd) == E_RLWAI) ? rercd : E_SYS;
    116115                                goto error_exit;
    117116                        }
     
    130129{
    131130        SYSLOG  syslog;
    132         uint_t  lost;
    133131        ER_UINT rercd;
    134132
     
    136134        syslog_0(LOG_NOTICE, "System logging task is started.");
    137135
    138         for (;;) {
    139                 lost = 0U;
     136        while (true) {
    140137                while ((rercd = cSysLog_read(&syslog)) >= 0) {
    141                         lost += (uint_t) rercd;
    142                         if (lost > 0U) {
    143                                 syslog_lostmsg(lost, logtask_putc);
    144                                 lost = 0U;
     138                        if (((uint_t) rercd) > 0U) {
     139                                syslog_lostmsg((uint_t) rercd, logtask_putc);
    145140                        }
    146141                        syslog_print(&syslog, logtask_putc);
    147                         logtask_putc('\n');
    148142                }
    149                 if (lost > 0U) {
    150                         syslog_lostmsg(lost, logtask_putc);
    151                 }
    152                 dly_tsk(ATTR_interval);
     143                (void) dly_tsk(ATTR_interval);
    153144        }
    154145}
     
    189180                        syslog_lostmsg((uint_t) rercd, target_fput_log);
    190181                }
    191                 if (syslog.logtype >= LOG_TYPE_COMMENT) {
    192                         syslog_print(&syslog, target_fput_log);
    193                         target_fput_log('\n');
    194                 }
     182                syslog_print(&syslog, target_fput_log);
    195183        }
    196184}
Note: See TracChangeset for help on using the changeset viewer.