t_syslog.h

ソースコードを見る。

データ構造

struct  SYSLOG
struct  t_syslog_rlog

マクロ定義

#define LOG_TYPE_COMMENT   UINT_C(0x01)
#define LOG_TYPE_ASSERT   UINT_C(0x02)
#define LOG_TYPE_INH   UINT_C(0x11)
#define LOG_TYPE_ISR   UINT_C(0x12)
#define LOG_TYPE_CYC   UINT_C(0x13)
#define LOG_TYPE_ALM   UINT_C(0x14)
#define LOG_TYPE_OVR   UINT_C(0x15)
#define LOG_TYPE_EXC   UINT_C(0x16)
#define LOG_TYPE_TEX   UINT_C(0x17)
#define LOG_TYPE_TSKSTAT   UINT_C(0x18)
#define LOG_TYPE_DSP   UINT_C(0x19)
#define LOG_TYPE_SVC   UINT_C(0x1a)
#define LOG_ENTER   UINT_C(0x00)
#define LOG_LEAVE   UINT_C(0x80)
#define LOG_EMERG   UINT_C(0)
#define LOG_ALERT   UINT_C(1)
#define LOG_CRIT   UINT_C(2)
#define LOG_ERROR   UINT_C(3)
#define LOG_WARNING   UINT_C(4)
#define LOG_NOTICE   UINT_C(5)
#define LOG_INFO   UINT_C(6)
#define LOG_DEBUG   UINT_C(7)
#define TMAX_LOGINFO   6
#define LOG_MASK(prio)   (1U << (prio))
#define LOG_UPTO(prio)   ((1U << ((prio) + 1)) - 1)
#define syslog_0(prio, format)   _syslog_1(prio, LOG_TYPE_COMMENT, (intptr_t) format)
#define syslog_1(prio, format, arg1)
#define syslog_2(prio, format, arg1, arg2)
#define syslog_3(prio, format, arg1, arg2, arg3)
#define syslog_4(prio, format, arg1, arg2, arg3, arg4)
#define syslog_5(prio, format, arg1, arg2, arg3, arg4, arg5)
#define TOPPERS_assert_fail(exp, file, line)

型定義

typedef struct t_syslog_rlog T_SYSLOG_RLOG

関数

ER syslog_wri_log (uint_t prio, SYSLOG *p_syslog) throw ()
Inline void _syslog_0 (uint_t prio, uint_t type)
Inline void _syslog_1 (uint_t prio, uint_t type, intptr_t arg1)
Inline void _syslog_2 (uint_t prio, uint_t type, intptr_t arg1, intptr_t arg2)
Inline void _syslog_3 (uint_t prio, uint_t type, intptr_t arg1, intptr_t arg2, intptr_t arg3)
Inline void _syslog_4 (uint_t prio, uint_t type, intptr_t arg1, intptr_t arg2, intptr_t arg3, intptr_t arg4)
Inline void _syslog_5 (uint_t prio, uint_t type, intptr_t arg1, intptr_t arg2, intptr_t arg3, intptr_t arg4, intptr_t arg5)
Inline void _syslog_6 (uint_t prio, uint_t type, intptr_t arg1, intptr_t arg2, intptr_t arg3, intptr_t arg4, intptr_t arg5, intptr_t arg6)
void syslog (uint_t prio, const char *format,...) throw ()


マクロ定義

#define LOG_ALERT   UINT_C(1)

t_syslog.h96 行で定義されています。

#define LOG_CRIT   UINT_C(2)

t_syslog.h97 行で定義されています。

#define LOG_DEBUG   UINT_C(7)

t_syslog.h102 行で定義されています。

#define LOG_EMERG   UINT_C(0)

t_syslog.h95 行で定義されています。

参照元 logtask_main(), と main_task().

#define LOG_ENTER   UINT_C(0x00)

t_syslog.h89 行で定義されています。

参照元 log_dsp_enter(), log_exc_enter(), と log_inh_enter().

#define LOG_ERROR   UINT_C(3)

t_syslog.h98 行で定義されています。

参照元 main_task(), と svc_perror().

#define LOG_INFO   UINT_C(6)

t_syslog.h101 行で定義されています。

参照元 main_task(), task(), と tex_routine().

#define LOG_LEAVE   UINT_C(0x80)

t_syslog.h90 行で定義されています。

参照元 log_dsp_leave(), log_exc_leave(), log_inh_leave(), と trace_print().

#define LOG_MASK ( prio   )     (1U << (prio))

t_syslog.h121 行で定義されています。

参照元 syslog_wri_log().

#define LOG_NOTICE   UINT_C(5)

t_syslog.h100 行で定義されています。

参照元 logtask_main(), main_task(), print_banner(), print_hist(), syslog_initialize(), task(), と tex_routine().

#define LOG_TYPE_ALM   UINT_C(0x14)

t_syslog.h81 行で定義されています。

#define LOG_TYPE_ASSERT   UINT_C(0x02)

t_syslog.h76 行で定義されています。

参照元 syslog_print(), と trace_print().

#define LOG_TYPE_COMMENT   UINT_C(0x01)

t_syslog.h75 行で定義されています。

参照元 logtask_main(), logtask_terminate(), syslog(), syslog_print(), と trace_print().

#define LOG_TYPE_CYC   UINT_C(0x13)

t_syslog.h80 行で定義されています。

#define LOG_TYPE_DSP   UINT_C(0x19)

t_syslog.h86 行で定義されています。

参照元 log_dsp_enter(), log_dsp_leave(), と trace_print().

#define LOG_TYPE_EXC   UINT_C(0x16)

t_syslog.h83 行で定義されています。

参照元 log_exc_enter(), と log_exc_leave().

#define LOG_TYPE_INH   UINT_C(0x11)

t_syslog.h78 行で定義されています。

参照元 log_inh_enter(), と log_inh_leave().

#define LOG_TYPE_ISR   UINT_C(0x12)

t_syslog.h79 行で定義されています。

#define LOG_TYPE_OVR   UINT_C(0x15)

t_syslog.h82 行で定義されています。

#define LOG_TYPE_SVC   UINT_C(0x1a)

t_syslog.h87 行で定義されています。

#define LOG_TYPE_TEX   UINT_C(0x17)

t_syslog.h84 行で定義されています。

#define LOG_TYPE_TSKSTAT   UINT_C(0x18)

t_syslog.h85 行で定義されています。

参照元 trace_print().

#define LOG_UPTO ( prio   )     ((1U << ((prio) + 1)) - 1)

t_syslog.h122 行で定義されています。

参照元 logtask_main(), main_task(), と syslog_initialize().

#define LOG_WARNING   UINT_C(4)

t_syslog.h99 行で定義されています。

#define syslog_0 ( prio,
format   )     _syslog_1(prio, LOG_TYPE_COMMENT, (intptr_t) format)

t_syslog.h295 行で定義されています。

#define syslog_1 ( prio,
format,
arg1   ) 

値:

_syslog_2(prio, LOG_TYPE_COMMENT, (intptr_t) format, \
                                                        (intptr_t)(arg1))

t_syslog.h298 行で定義されています。

参照元 logtask_main().

#define syslog_2 ( prio,
format,
arg1,
arg2   ) 

値:

_syslog_3(prio, LOG_TYPE_COMMENT, (intptr_t) format, \
                                        (intptr_t)(arg1), (intptr_t)(arg2))

t_syslog.h302 行で定義されています。

参照元 print_hist().

#define syslog_3 ( prio,
format,
arg1,
arg2,
arg3   ) 

値:

_syslog_4(prio, LOG_TYPE_COMMENT, (intptr_t) format, \
                        (intptr_t)(arg1), (intptr_t)(arg2), (intptr_t)(arg3))

t_syslog.h306 行で定義されています。

参照元 print_banner().

#define syslog_4 ( prio,
format,
arg1,
arg2,
arg3,
arg4   ) 

値:

_syslog_5(prio, LOG_TYPE_COMMENT, (intptr_t) format, \
                        (intptr_t)(arg1), (intptr_t)(arg2), (intptr_t)(arg3), \
                                                        (intptr_t)(arg4))

t_syslog.h310 行で定義されています。

#define syslog_5 ( prio,
format,
arg1,
arg2,
arg3,
arg4,
arg5   ) 

値:

_syslog_6(prio, LOG_TYPE_COMMENT, (intptr_t) format, \
                        (intptr_t)(arg1), (intptr_t)(arg2), (intptr_t)(arg3), \
                                        (intptr_t)(arg4), (intptr_t)(arg5))

t_syslog.h315 行で定義されています。

参照元 t_perror().

#define TMAX_LOGINFO   6

t_syslog.h110 行で定義されています。

参照元 syslog(), と trace_print().

#define TOPPERS_assert_fail ( exp,
file,
line   ) 

値:

_syslog_3(LOG_EMERG, LOG_TYPE_ASSERT, (intptr_t)(file), \
                                        (intptr_t)(line), (intptr_t)(exp))

t_syslog.h324 行で定義されています。


型定義

typedef struct t_syslog_rlog T_SYSLOG_RLOG


関数

Inline void _syslog_0 ( uint_t  prio,
uint_t  type 
)

t_syslog.h143 行で定義されています。

参照先 SYSLOG::logtype, syslog(), と syslog_wri_log().

00144 {
00145     SYSLOG  syslog;
00146 
00147     syslog.logtype = type;
00148     (void) syslog_wri_log(prio, &syslog);
00149 }

Inline void _syslog_1 ( uint_t  prio,
uint_t  type,
intptr_t  arg1 
)

t_syslog.h152 行で定義されています。

参照先 SYSLOG::loginfo, SYSLOG::logtype, syslog(), と syslog_wri_log().

00153 {
00154     SYSLOG  syslog;
00155 
00156     syslog.logtype = type;
00157     syslog.loginfo[0] = arg1;
00158     (void) syslog_wri_log(prio, &syslog);
00159 }

Inline void _syslog_2 ( uint_t  prio,
uint_t  type,
intptr_t  arg1,
intptr_t  arg2 
)

t_syslog.h162 行で定義されています。

参照先 SYSLOG::loginfo, SYSLOG::logtype, syslog(), と syslog_wri_log().

00163 {
00164     SYSLOG  syslog;
00165 
00166     syslog.logtype = type;
00167     syslog.loginfo[0] = arg1;
00168     syslog.loginfo[1] = arg2;
00169     (void) syslog_wri_log(prio, &syslog);
00170 }

Inline void _syslog_3 ( uint_t  prio,
uint_t  type,
intptr_t  arg1,
intptr_t  arg2,
intptr_t  arg3 
)

t_syslog.h173 行で定義されています。

参照先 SYSLOG::loginfo, SYSLOG::logtype, syslog(), と syslog_wri_log().

00175 {
00176     SYSLOG  syslog;
00177 
00178     syslog.logtype = type;
00179     syslog.loginfo[0] = arg1;
00180     syslog.loginfo[1] = arg2;
00181     syslog.loginfo[2] = arg3;
00182     (void) syslog_wri_log(prio, &syslog);
00183 }

Inline void _syslog_4 ( uint_t  prio,
uint_t  type,
intptr_t  arg1,
intptr_t  arg2,
intptr_t  arg3,
intptr_t  arg4 
)

t_syslog.h186 行で定義されています。

参照先 SYSLOG::loginfo, SYSLOG::logtype, syslog(), と syslog_wri_log().

00188 {
00189     SYSLOG  syslog;
00190 
00191     syslog.logtype = type;
00192     syslog.loginfo[0] = arg1;
00193     syslog.loginfo[1] = arg2;
00194     syslog.loginfo[2] = arg3;
00195     syslog.loginfo[3] = arg4;
00196     (void) syslog_wri_log(prio, &syslog);
00197 }

Inline void _syslog_5 ( uint_t  prio,
uint_t  type,
intptr_t  arg1,
intptr_t  arg2,
intptr_t  arg3,
intptr_t  arg4,
intptr_t  arg5 
)

t_syslog.h200 行で定義されています。

参照先 SYSLOG::loginfo, SYSLOG::logtype, syslog(), と syslog_wri_log().

00202 {
00203     SYSLOG  syslog;
00204 
00205     syslog.logtype = type;
00206     syslog.loginfo[0] = arg1;
00207     syslog.loginfo[1] = arg2;
00208     syslog.loginfo[2] = arg3;
00209     syslog.loginfo[3] = arg4;
00210     syslog.loginfo[4] = arg5;
00211     (void) syslog_wri_log(prio, &syslog);
00212 }

Inline void _syslog_6 ( uint_t  prio,
uint_t  type,
intptr_t  arg1,
intptr_t  arg2,
intptr_t  arg3,
intptr_t  arg4,
intptr_t  arg5,
intptr_t  arg6 
)

t_syslog.h215 行で定義されています。

参照先 SYSLOG::loginfo, SYSLOG::logtype, syslog(), と syslog_wri_log().

00217 {
00218     SYSLOG  syslog;
00219 
00220     syslog.logtype = type;
00221     syslog.loginfo[0] = arg1;
00222     syslog.loginfo[1] = arg2;
00223     syslog.loginfo[2] = arg3;
00224     syslog.loginfo[3] = arg4;
00225     syslog.loginfo[4] = arg5;
00226     syslog.loginfo[5] = arg6;
00227     (void) syslog_wri_log(prio, &syslog);
00228 }

void syslog ( uint_t  prio,
const char *  format,
  ... 
) throw ()

vasyslog.c51 行で定義されています。

参照先 LOG_TYPE_COMMENT, SYSLOG::loginfo, SYSLOG::logtype, syslog(), syslog_wri_log(), と TMAX_LOGINFO.

参照元 _syslog_0(), _syslog_1(), _syslog_2(), _syslog_3(), _syslog_4(), _syslog_5(), _syslog_6(), logtask_main(), logtask_terminate(), main_task(), syslog(), task(), と tex_routine().

00052 {
00053     SYSLOG  syslog;
00054     va_list ap;
00055     uint_t  i;
00056     char    c;
00057     bool_t  lflag;
00058 
00059     syslog.logtype = LOG_TYPE_COMMENT;
00060     syslog.loginfo[0] = (intptr_t) format;
00061     i = 1U;
00062     va_start(ap, format);
00063 
00064     while ((c = *format++) != '\0' && i < TMAX_LOGINFO) {
00065         if (c != '%') {
00066             continue;
00067         }
00068 
00069         lflag = false;
00070         c = *format++;
00071         while ('0' <= c && c <= '9') {
00072             c = *format++;
00073         }
00074         if (c == 'l') {
00075             lflag = true;
00076             c = *format++;
00077         }
00078         switch (c) {
00079         case 'd':
00080             syslog.loginfo[i++] = lflag ? (intptr_t) va_arg(ap, long_t)
00081                                         : (intptr_t) va_arg(ap, int_t);
00082             break;
00083         case 'u':
00084         case 'x':
00085         case 'X':
00086             syslog.loginfo[i++] = lflag ? (intptr_t) va_arg(ap, ulong_t)
00087                                         : (intptr_t) va_arg(ap, uint_t);
00088             break;
00089         case 'p':
00090             syslog.loginfo[i++] = (intptr_t) va_arg(ap, void *);
00091             break;
00092         case 'c':
00093             syslog.loginfo[i++] = (intptr_t) va_arg(ap, int);
00094             break;
00095         case 's':
00096             syslog.loginfo[i++] = (intptr_t) va_arg(ap, const char *);
00097             break;
00098         case '\0':
00099             format--;
00100             break;
00101         default:
00102             break;
00103         }
00104     }
00105     va_end(ap);
00106     (void) syslog_wri_log(prio, &syslog);
00107 }

ER syslog_wri_log ( uint_t  prio,
SYSLOG p_syslog 
) throw ()

syslog.c132 行で定義されています。

参照元 _syslog_0(), _syslog_1(), _syslog_2(), _syslog_3(), _syslog_4(), _syslog_5(), _syslog_6(), と syslog().

00133 {
00134     SIL_PRE_LOC;
00135 
00136     LOG_SYSLOG_WRI_LOG_ENTER(prio, p_syslog);
00137     SIL_LOC_INT();
00138 
00139     /*
00140      *  ログ時刻の設定
00141      */
00142     p_syslog->logtim = _kernel_current_time;
00143 
00144     /*
00145      *  ログバッファに記録
00146      */
00147     if ((syslog_logmask & LOG_MASK(prio)) != 0U) {
00148         syslog_buffer[syslog_tail] = *p_syslog;
00149         syslog_tail++;
00150         if (syslog_tail >= TCNT_SYSLOG_BUFFER) {
00151             syslog_tail = 0U;
00152         }
00153         if (syslog_count < TCNT_SYSLOG_BUFFER) {
00154             syslog_count++;
00155         }
00156         else {
00157             syslog_head = syslog_tail;
00158             syslog_lost++;
00159         }
00160     }
00161 
00162     /*
00163      *  低レベル出力
00164      */
00165     if ((syslog_lowmask & LOG_MASK(prio)) != 0U) {
00166         syslog_print(p_syslog, target_fput_log);
00167         (*target_fput_log)('\n');
00168     }
00169 
00170     SIL_UNL_INT();
00171     LOG_SYSLOG_WRI_LOG_LEAVE(E_OK);
00172     return(E_OK);
00173 }


Copyright © 2008 by Kijineko Inc.

ホームページ制作