今天在“top”發現一個events/0行程CPU資源佔很高

立你斯 發表在 痞客邦 留言(0) 人氣()

 

華佗: 47 38 68 72 恢復25 幸運10

立你斯 發表在 痞客邦 留言(0) 人氣()

Linux Device Drivers

Debug 訊息開關

 

立你斯 發表在 痞客邦 留言(0) 人氣()

今天在寫觸控式螢幕驅動時在中斷處理函數中使用disable_irq關中斷發現在進入中斷處理後內核就掛掉了,於是研究了一下才發現disable_irq關閉中斷並等待中斷處理完後返回, disable_irq_nosync立即返回. 在中斷處理常式中應該使用disable_irq_nosync來關閉中斷

 

先看一下disable_irq_nosync,內核代碼中是這樣解釋的:

立你斯 發表在 痞客邦 留言(0) 人氣()

Why libraries are used:

This methodology, also known as "shared components" or "archive libraries", groups together multiple compiled object code files into a single file known as a library. Typically C functions/C++ classes and methods which can be shared by more than one application are broken out of the application's source code, compiled and bundled into a library. The C standard libraries and C++ STL are examples of shared components which can be linked with your code. The benefit is that each and every object file need not be stated when linking because the developer can reference the individual library. This simplifies the multiple use and sharing of software components between applications. It also allows application vendors a way to simply release an API to interface with an application. Components which are large can be created for dynamic use, thus the library remain separate from the executable reducing it's size and thus disk space used. The library components are then called by various applications for use when needed.


Linux Library Types:

There are two Linux C/C++ library types which can be created:

  1. Static libraries (.a): Library of object code which is linked with, and becomes part of the application.
  2. Dynamically linked shared object libraries (.so): There is only one form of this library but it can be used in two ways.
    1. Dynamically linked at run time but statically aware. The libraries must be available during compile/link phase. The shared objects are not included into the executable component but are tied to the execution.
    2. Dynamically loaded/unloaded and linked during execution (i.e. browser plug-in) using the dynamic linking loader system functions.

Library naming conventions:

Libraries are typically names with the prefix "lib". This is true for all the C standard libraries. When linking, the command line reference to the library will not contain the library prefix or suffix.

立你斯 發表在 痞客邦 留言(0) 人氣()

3.2.11. /proc/interrupts

This file records the number of interrupts per IRQ on the x86 architecture. A standard /proc/interrupts looks similar to the following:

  CPU0          
  0:   80448940          XT-PIC  timer   
  1:     174412          XT-PIC  keyboard   
  2:          0          XT-PIC  cascade   
  8:          1          XT-PIC  rtc  
 10:     410964          XT-PIC  eth0  
 12:      60330          XT-PIC  PS/2 Mouse  
 14:    1314121          XT-PIC  ide0  
 15:    5195422          XT-PIC  ide1 
NMI:          0  
ERR:          0

For a multi-processor machine, this file may look slightly different:

       CPU0       CPU1          
  0: 1366814704          0          XT-PIC  timer   
  1:        128        340    IO-APIC-edge  keyboard   
  2:          0          0          XT-PIC  cascade   
  8:          0          1    IO-APIC-edge  rtc  
 12:       5323       5793    IO-APIC-edge  PS/2 Mouse  
 13:          1          0          XT-PIC  fpu  
 16:   11184294   15940594   IO-APIC-level  Intel EtherExpress Pro 10/100 Ethernet  
 20:    8450043   11120093   IO-APIC-level  megaraid  
 30:      10432      10722   IO-APIC-level  aic7xxx  
 31:         23         22   IO-APIC-level  aic7xxx 
NMI:          0 
ERR:          0

The first column refers to the IRQ number. Each CPU in the system has its own column and its own number of interrupts per IRQ. The next column reports the type of interrupt, and the last column contains the name of the device that is located at that IRQ.

立你斯 發表在 痞客邦 留言(0) 人氣()

在讀 Linux Permier 中文版的時候. Page 2-41 有一段

使用 likely() 與 unlikely() 巨集透過編譯器告知 CPU 有哪些程式區段不需要預測(likely)或有哪些程式區段需要預測(unlikely).

 

立你斯 發表在 痞客邦 留言(0) 人氣()

DICOM 影像格式標籤 ( Tags ) 分析


要對醫學影像做進一步的處理,就必須了解DICOM 影像的格式與資訊,在DICOM 的影像

立你斯 發表在 痞客邦 留言(0) 人氣()

The videobuf2 API

Author:CJOK

Contact:cjok.liao#gmail.com

立你斯 發表在 痞客邦 留言(0) 人氣()

1.  Codec簡介

在移動設備中,Codec的作用可以歸結為4種,分別是:

  • PCM等信號進行D/A轉換,把數位的音訊信號轉換為類比信號
  • MicLinein或者其他輸入源的類比信號進行A/D轉換,把類比的聲音信號轉變CPU能夠處理的數位信號
  • 對音訊通路進行控制,比如播放音樂,收聽調頻收音機,又或者接聽電話時,音訊信號在codec內的流通路線是不一樣的
  • 對音訊信號做出相應的處理,例如音量控制,功率放大,EQ控制等等

ASoC Codec的這些功能都定義好了一些列相應的介面,以方便地對Codec進行控制。ASoCCodec驅動的一個基本要求是:驅動程式的程式碼必須要做到平臺無關性,以方便同一個Codec的程式碼不經修改即可用在不同的平臺上。以下的討論基於wolfsonCodec晶片WM8994kernel版本3.3.x

立你斯 發表在 痞客邦 留言(0) 人氣()