is still a good memory than rotten pen, today needs to learn is the code in the Arch-arm directory.
First we look at the Inclue directory of endian this header file we mainly need to know the following several knowledge.
1. Take a look at the snippet of the following code first
#if!defined __arm_arch_5__ &&!defined __arm_arch_5t__ && !defined __arm_arch_5te__ &&! Defined __arm_arch_5tej__ && !defined __arm_arch_4t__ &&!defined __arm_arch_4__
As the comment text on Google says:
Rev and REV16 are not available on ARM5 and ARM4. It also indicates that the reason for not including the <machine/cpu-features.h> header file is because it pollutes the namespace with a symbolic string processing language like PLD.
The next thing we see is the definition of some header files under the Marchine directory.
In _types this header file, we look at the following snippet of code:
#define _size_t#define _ssize_t#define _ptrdiff_ttypedef unsigned long size_t;typedef long ssize_t;typedef Long ptrdiff_t; #endif
As Google has commented:
The kernel defines size_t as unsigned integer data, but g++ expects its type to be an unsigned long type of data.
The next step is to take a closer look at the definition of the Cpu-features header file:
1, as the note says, the purpose of this header file definition is to define several symbolic string languages to positively respond to the CPU's characteristics. At the same time, the features of these CPUs may not be available when the target CPU is recompiled.
2. The purpose of this is to make us abstract from the various arm architectures.
3. The purpose of the IEEE header file is to define the structure of the machine-dependent floating-point data.
Next, look at the definition of the kernel header file:
In this file, we mainly define kernel-specific definitions and optimize the kernel header files.
Android Kernel source Bionic directory sub-directory Arch-arm Source Analysis notes