Data Types in Linux

Source: Internet
Author: User

The kernel uses the following basic data types:

INT: the Standard C language Integer type.

U32: 32-bit integer type

Pid_t: PID type of a specific kernel object

The data types in C Language occupy different spaces in different CPU architectures. In the x86 series structure, the number of bytes occupied by the data type is shown in the following table:

Arch Char Short Int Long PTR Long long U8 2010.cn U32 U64
I686 1 2 4 4 4 8 1 2 4 8

In Linux, the address in the kernel is of the unsigned long type, and the pointer size is the same as that of the long type.

All data types provided by the kernel are declared in the header file <ASM/types. h>, and this file is included in <Linux/types. h>.

Linux uses a prefix type to expose variables to user space, such as _ u32.

Many data types in the kernel are declared by typedef for ease of transplantation.

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.