How are macros different from inline functions?Macros are normally used whenever a set of instructions/tasks have to be repeatedly performed. They are small programs to carryout some predefined actions.We normally use the #define directive in case we need to define the values of some constants so in case a change is needed only the value can be changed and is reflected throughout.#define mul(a,b) (a*b)The major disadvantage of macros is that they are not really functions and the usual error checking and stepping through of the code does not occur.Inline functions are expanded whenever it is invoked rather than the control going to the place where the function is defined and avoids all the activities such as saving the return address when a jump is performed. Saves time in case of short codes.
inline float add(float a,float b)
Inline is just a request to the compiler and it is upto to the compiler whether to substitute the code at the place of invocation or perform a jump based on its performance algorithms.What could be the reasons for a System to have gone blank and how would you Debug it?Possible reasons could be,PC being overheated.Dust having being accumulated all around.CPU fans not working properly .Faulty power connections.Faulty circuit board from where the power is being drawn.Support Drivers not having being installed.
CONTINUE READING »
via IngenuityDias ingenuitydias.blogspot.com/2015/06/embedded-systems-inter…
Tagged: , IngenuityDias , Science , Tutorials