First, thank you experts for taking the time to help me. You are helping me make it through my first internship.
I am reading all over about how inline functions have certain restrictions and properties and that sometimes compilers will ignore the inline function command and treat the inline function as a normal function. I do not understand why and where this happens even after reading much. Generally, the only time I will want to use an inline function is if I want to eliminate the function all together. Apparently, this is only done if "all the calls are know, i.e. are placed in the same source file as the function." I do not understand this. So I cannot make an inline function in init.c and call it in main.c???? Also, I keep reading that if the purpose is only to remove the function completely, "the inline function should be marked as "static inline" rather than just inline, so that it cannot be seen from other files. Otherwise the function will have to be kept (even though it might still be inlined at some calls), and we rely on the liner to remove it if it is no called." Can someone explain this more? I greatly appreciate your help!
I am reading all over about how inline functions have certain restrictions and properties and that sometimes compilers will ignore the inline function command and treat the inline function as a normal function. I do not understand why and where this happens even after reading much. Generally, the only time I will want to use an inline function is if I want to eliminate the function all together. Apparently, this is only done if "all the calls are know, i.e. are placed in the same source file as the function." I do not understand this. So I cannot make an inline function in init.c and call it in main.c???? Also, I keep reading that if the purpose is only to remove the function completely, "the inline function should be marked as "static inline" rather than just inline, so that it cannot be seen from other files. Otherwise the function will have to be kept (even though it might still be inlined at some calls), and we rely on the liner to remove it if it is no called." Can someone explain this more? I greatly appreciate your help!