Android Kernel source Bionic directory sub-directory Arch-arm Source Analysis notes

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.