t_syslog.hシステムログ機能 [詳細]
 
このグラフは、どのファイルから直接、間接的にインクルードされているかを示しています。  
ソースコードを見る。 
 |  
 データ構造 |  
| struct   | SYSLOG |  
 マクロ定義 |  
| #define  | LOG_TYPE_INH   0x01u |  
| #define  | LOG_TYPE_ISR   0x02u |  
| #define  | LOG_TYPE_CYC   0x03u |  
| #define  | LOG_TYPE_EXC   0x04u |  
| #define  | LOG_TYPE_TEX   0x05u |  
| #define  | LOG_TYPE_TSKSTAT   0x06u |  
| #define  | LOG_TYPE_DSP   0x07u |  
| #define  | LOG_TYPE_SVC   0x08u |  
| #define  | LOG_TYPE_COMMENT   0x09u |  
| #define  | LOG_TYPE_ASSERT   0x0au |  
| #define  | LOG_ENTER   0x00u |  
| #define  | LOG_LEAVE   0x80u |  
| #define  | LOG_EMERG   0u |  
| #define  | LOG_ALERT   1u |  
| #define  | LOG_CRIT   2u |  
| #define  | LOG_ERROR   3u |  
| #define  | LOG_WARNING   4u |  
| #define  | LOG_NOTICE   5u |  
| #define  | LOG_INFO   6u |  
| #define  | LOG_DEBUG   7u |  
| #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, (VP_INT) 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) |  
 関数 |  
| ER  | vwri_log (UINT prio, SYSLOG *p_log)  throw () |  
| ER_UINT  | vrea_log (SYSLOG *p_log)  throw () |  
| ER  | vmsk_log (UINT logmask, UINT lowmask)  throw () |  
| Inline ER  | _syslog_0 (UINT prio, UINT type) |  
| Inline ER  | _syslog_1 (UINT prio, UINT type, VP_INT arg1) |  
| Inline ER  | _syslog_2 (UINT prio, UINT type, VP_INT arg1, VP_INT arg2) |  
| Inline ER  | _syslog_3 (UINT prio, UINT type, VP_INT arg1, VP_INT arg2, VP_INT arg3) |  
| Inline ER  | _syslog_4 (UINT prio, UINT type, VP_INT arg1, VP_INT arg2, VP_INT arg3, VP_INT arg4) |  
| Inline ER  | _syslog_5 (UINT prio, UINT type, VP_INT arg1, VP_INT arg2, VP_INT arg3, VP_INT arg4, VP_INT arg5) |  
| Inline ER  | _syslog_6 (UINT prio, UINT type, VP_INT arg1, VP_INT arg2, VP_INT arg3, VP_INT arg4, VP_INT arg5, VP_INT arg6) |  
| ER  | syslog (UINT prio, const char *format,...)  throw () |  
| void  | syslog_printf (const char *format, VP_INT *args, void(*putc)(char))  throw () |  
| void  | syslog_print (SYSLOG *p_log, void(*putc)(char))  throw () |  
| void  | syslog_output (void(*putc)(char))  throw () |  
 
 説明
システムログ機能 
システムログサービスは,システムのログ情報を出力するためのサービス である.カーネルからのログ情報の出力にも用いるため,内部で待ち状態 にはいることはない. 
ログ情報は,カーネル内のログバッファに書き込むか,低レベルの文字出 力関数を用いて出力する.どちらを使うかは,拡張サービスコールで切り 換えることができる. 
ログバッファ領域がオーバフローした場合には,古いログ情報を消して上 書きする. 
アセンブリ言語のソースファイルやシステムコンフィギュレーションファ イルからこのファイルをインクルードする時は,_MACRO_ONLY を定義して おくことで,マクロ定義以外の記述を除くことができる. 
このインクルードファイルは,kernel.h と sil.h でインクルードされる. 他のファイルから直接インクルードされることはない. 
このファイルをインクルードする前に,t_stddef.h と itron.h をインク ルードしておくことが必要である. 
 
 t_syslog.h で定義されています。 
 マクロ定義
 
 
 
 
 
 
 
 
 
  
    
      
        
          | #define LOG_MASK           | 
          (  | 
          prio  | 
                     | 
           )  | 
             (1u << (prio)) | 
         
       
     | 
   
 
 
 
  
    
      
        
          | #define LOG_TYPE_ASSERT   0x0au           | 
         
       
     | 
   
 
 
  
    
      
        
          | #define LOG_TYPE_COMMENT   0x09u           | 
         
       
     | 
   
 
 
  
    
      
        
          | #define LOG_TYPE_CYC   0x03u           | 
         
       
     | 
   
 
 
  
    
      
        
          | #define LOG_TYPE_DSP   0x07u           | 
         
       
     | 
   
 
 
  
    
      
        
          | #define LOG_TYPE_EXC   0x04u           | 
         
       
     | 
   
 
 
  
    
      
        
          | #define LOG_TYPE_INH   0x01u           | 
         
       
     | 
   
 
 
  
    
      
        
          | #define LOG_TYPE_ISR   0x02u           | 
         
       
     | 
   
 
 
  
    
      
        
          | #define LOG_TYPE_SVC   0x08u           | 
         
       
     | 
   
 
 
  
    
      
        
          | #define LOG_TYPE_TEX   0x05u           | 
         
       
     | 
   
 
 
  
    
      
        
          | #define LOG_TYPE_TSKSTAT   0x06u           | 
         
       
     | 
   
 
 
  
    
      
        
          | #define LOG_UPTO           | 
          (  | 
          prio  | 
                     | 
           )  | 
             ((1u << ((prio) + 1)) - 1) | 
         
       
     | 
   
 
 
 
  
    
      
        
          | #define syslog_0           | 
          (  | 
          prio,          |  
           | 
           | 
          format  | 
                     | 
           )  | 
             _syslog_1(prio, LOG_TYPE_COMMENT, (VP_INT) 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  | 
                     | 
           )  | 
           | 
         
       
     | 
   
 
 
 関数
 
 
 
 
 
 
 
 
  
    
      
        
          | ER syslog            | 
          (  | 
          UINT  | 
           prio,  | 
         
        
           | 
           | 
          const char *  | 
           format,  | 
         
        
           | 
           | 
            | 
           ... | 
         
        
           | 
          )  | 
            throw () | 
         
       
     | 
   
 
 
  
    
      
        
          | void syslog_output            | 
          (  | 
          void(*)(char)  | 
           putc           | 
           )  | 
            throw () | 
         
       
     | 
   
 
 
  
    
      
        
          | void syslog_print            | 
          (  | 
          SYSLOG *  | 
           p_log,  | 
         
        
           | 
           | 
          void(*)(char)  | 
           putc | 
         
        
           | 
          )  | 
            throw () | 
         
       
     | 
   
 
 
  
    
      
        
          | void syslog_printf            | 
          (  | 
          const char *  | 
           format,  | 
         
        
           | 
           | 
          VP_INT *  | 
           args,  | 
         
        
           | 
           | 
          void(*)(char)  | 
           putc | 
         
        
           | 
          )  | 
            throw () | 
         
       
     | 
   
 
  
    | 
       
     | 
    
 
 
 log_output.c の 93 行で定義されています。
 
参照先 _intptr_・convert().
 
参照元 syslog_output()・syslog_print(). 00094 {
00095     int     c;
00096     int     width;
00097     int     padzero;
00098     _intptr_    val;
00099     const char  *str;
00100 
00101     while ((c = *format++) != '\0') {
00102         if (c != '%') {
00103             (*putc)((char) c);
00104             continue;
00105         }
00106 
00107         width = padzero = 0;
00108         if ((c = *format++) == '0') {
00109             padzero = 1;
00110             c = *format++;
00111         }
00112         while ('0' <= c && c <= '9') {
00113             width = width * 10 + c - '0';
00114             c = *format++;
00115         }
00116         switch (c) {
00117         case 'd':
00118             val = (_intptr_)(*args++);
00119             if (val >= 0) {
00120                 convert((unsigned _intptr_) val, 10, raddec,
00121                         width, 0, padzero, putc);
00122             }
00123             else {
00124                 convert((unsigned _intptr_)(-val), 10, raddec,
00125                         width, 1, padzero, putc);
00126             }
00127             break;
00128         case 'u':
00129             val = (_intptr_)(*args++);
00130             convert((unsigned _intptr_) val, 10, raddec,
00131                         width, 0, padzero, putc);
00132             break;
00133         case 'x':
00134         case 'p':
00135             val = (_intptr_)(*args++);
00136             convert((unsigned _intptr_) val, 16, radhex,
00137                         width, 0, padzero, putc);
00138             break;
00139         case 'X':
00140             val = (_intptr_)(*args++);
00141             convert((unsigned _intptr_) val, 16, radHEX,
00142                         width, 0, padzero, putc);
00143             break;
00144         case 'c':
00145             (*putc)((char)(_intptr_)(*args++));
00146             break;
00147         case 's':
00148             str = (const char *)(*args++);
00149             while ((c = *str++) != '\0') {
00150                 (*putc)((char) c);
00151             }
00152             break;
00153         case '%':
00154             (*putc)('%');
00155             break;
00156         case '\0':
00157             format--;
00158             break;
00159         default:
00160             break;
00161         }
00162     }
00163     (*putc)('\n');
00164 }
 
 
関数の呼び出しグラフ:  
     | 
   
 
 
  
    
      
        
          | ER vmsk_log            | 
          (  | 
          UINT  | 
           logmask,  | 
         
        
           | 
           | 
          UINT  | 
           lowmask | 
         
        
           | 
          )  | 
            throw () | 
         
       
     | 
   
 
 
 
 
Copyright © 2006 by TAKAGI Nobuhisa.
 
このページは Mon Apr 3 23:49:18 2006 に Doxygen によって生成されました。 
 | 
 |