LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-15-2018, 04:07 AM   #1
abdullah bin khaled
LQ Newbie
 
Registered: Sep 2018
Posts: 4

Rep: Reputation: Disabled
I opened a header file .There i saw some macros but i don't know where have come from.Could you help me to know those macros and their sourc


Click image for larger version

Name:	Screenshot from 2018-09-15 13-45-06.png
Views:	13
Size:	212.0 KB
ID:	28601
what does #define ACPI_PLD_GET_REVISION(dword) ACPI_GET_BITS (dword, 0, ACPI_7BIT_MASK) mean

Last edited by abdullah bin khaled; 09-15-2018 at 07:01 AM. Reason: previous question was a weak approach
 
Old 09-15-2018, 05:58 AM   #2
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 2,041

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Their source is the header file acbuffer.h. They seem to be related to the management and usage of ACPI. If you want to know what they are for, you might get information from the kernel documentation.
 
2 members found this post helpful.
Old 09-19-2018, 01:11 AM   #3
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 2,041

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
Originally Posted by abdullah bin khaled View Post
Attachment 28601
what does #define ACPI_PLD_GET_REVISION(dword) ACPI_GET_BITS (dword, 0, ACPI_7BIT_MASK) mean
There is a macro named ACPI_GET_BITS, which takes three parameters. ACPI_PLD_GET_REVISION is another macro, which calls ACPI_GET_BITS and sets two of its parameters to constant values.

From their naming, I guess that ACPI_GET_BITS is a general lookup function that gets certain bits from its dword input. ACPI_PLD_GET_REVISION then retrieves those bits that indicate the ACPI PLD revision.

A bit closer to the beginning of the file, you see that struct acpi_pld_info does contain a revision in its first byte. Also note the comment in the same file that these macros convert a _PLD buffer to internal ACPI_PLD_INFO format.

Unfortunately, I don’t know what ACPI PLD stands for, but I am sure Google does.

Why do you want to know these details?

Last edited by berndbausch; 09-19-2018 at 01:12 AM.
 
2 members found this post helpful.
Old 09-19-2018, 09:28 AM   #4
abdullah bin khaled
LQ Newbie
 
Registered: Sep 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
There is a macro named ACPI_GET_BITS, which takes three parameters. ACPI_PLD_GET_REVISION is another macro, which calls ACPI_GET_BITS and sets two of its parameters to constant values.

From their naming, I guess that ACPI_GET_BITS is a general lookup function that gets certain bits from its dword input. ACPI_PLD_GET_REVISION then retrieves those bits that indicate the ACPI PLD revision.

A bit closer to the beginning of the file, you see that struct acpi_pld_info does contain a revision in its first byte. Also note the comment in the same file that these macros convert a _PLD buffer to internal ACPI_PLD_INFO format.

Unfortunately, I donít know what ACPI PLD stands for, but I am sure Google does.

Why do you want to know these details?
I am new in programming .I think it will be easier to be a good programmer (like you and many other) if i know how other programmer build the whole system. please pardon me for my bad english and for my style of writing.but for people like you i am sure one day i will be a good programmer .
 
Old 09-19-2018, 06:35 PM   #5
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 2,041

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
Originally Posted by abdullah bin khaled View Post
I am new in programming .I think it will be easier to be a good programmer (like you and many other) if i know how other programmer build the whole system. please pardon me for my bad english and for my style of writing.but for people like you i am sure one day i will be a good programmer .
Your English is more than adequate. Better than many.

It's laudable that you want to understand the Linux kernel in order to gain programming skills, but I am afraid the code you picked is too advanced for a beginner. It's very close to the hardware and needs to solve very peculiar problems. Perhaps the Linux kernel in general is not the right example for a beginner.

Unfortunately, I am not a programmer and don't have suggestions which project to study instead. After a bit of googling I stumbled on this list. Give it a try and persevere.

Last edited by berndbausch; 09-19-2018 at 06:38 PM. Reason: rewording
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Libre Office macros and Linux file systems mp100 Linux - Newbie 8 06-27-2017 02:51 PM
Macros In C drumstick Programming 8 11-21-2005 05:37 PM
vi editor macros sailu_mvn Linux - Software 6 10-12-2005 02:44 AM
Macros Twi7ch Linux - General 2 08-27-2005 10:37 PM
macros file newbielinux Linux - Newbie 1 03-01-2004 12:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration