[Acer]_IOC_NR, _ioc_type, _ioc_size, _ioc_dir

Source: Internet
Author: User
Tags acer
From:http://www.groad.net/bbs/read.php?tid-1213.html _ioc_nr (), _ioc_type (), _ioc_size (), _IOC_DIR () These macros are used to get the cmd command domain, which functions as follows:

_ioc_nr (): Reading radix value (bit0~ bit7)

_ioc_type : Read the Magic Number field value (bit8 ~ bit15)

_ioc_size : Reading Data size field value (bit16 ~ bit29)

_ioc_dir : Get read-write property field value (Bit30 ~ bit31)

the _IOC_NR () is defined as :
#define _IOC_NR (NR) ((NR) >> _ioc_nrshift) & _ioc_nrmask)

The value of _ioc_nrshift is 0;

the definition of _ioc_nrmask is :
#define _IOC_NRMASK ((1 << _ioc_nrbits)-1)

The value of the _ioc_nrbits is defined as 8, so the _ioc_nrmask value is 0xFF.

The rest of the macro analysis is similar.

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.