Changeset 429 for EcnlProtoTool/trunk/asp3_dcre/syssvc/tLogTaskMain.c
- Timestamp:
- Jul 3, 2020, 7:19:17 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/asp3_dcre/syssvc/tLogTaskMain.c
r321 r429 1 1 /* 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 5 4 * 6 5 * Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory 7 6 * Toyohashi Univ. of Technology, JAPAN 8 * Copyright (C) 2005-201 6by Embedded and Real-Time Systems Laboratory7 * Copyright (C) 2005-2018 by Embedded and Real-Time Systems Laboratory 9 8 * Graduate School of Information Science, Nagoya Univ., JAPAN 10 9 * … … 82 81 } 83 82 else { 84 for (;;) {83 while (true) { 85 84 if (cSysLog_refer(&rlog) < 0) { 86 85 ercd = E_SYS; … … 113 112 rercd = dly_tsk(ATTR_flushWait); 114 113 if (rercd < 0) { 115 ercd = ( rercd== E_RLWAI) ? rercd : E_SYS;114 ercd = (MERCD(rercd) == E_RLWAI) ? rercd : E_SYS; 116 115 goto error_exit; 117 116 } … … 130 129 { 131 130 SYSLOG syslog; 132 uint_t lost;133 131 ER_UINT rercd; 134 132 … … 136 134 syslog_0(LOG_NOTICE, "System logging task is started."); 137 135 138 for (;;) { 139 lost = 0U; 136 while (true) { 140 137 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); 145 140 } 146 141 syslog_print(&syslog, logtask_putc); 147 logtask_putc('\n');148 142 } 149 if (lost > 0U) { 150 syslog_lostmsg(lost, logtask_putc); 151 } 152 dly_tsk(ATTR_interval); 143 (void) dly_tsk(ATTR_interval); 153 144 } 154 145 } … … 189 180 syslog_lostmsg((uint_t) rercd, target_fput_log); 190 181 } 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); 195 183 } 196 184 }
Note:
See TracChangeset
for help on using the changeset viewer.