Different type of Makefile
- Default/legacy make file -> GNU Makefile
- Cmake
- Autotool -> Makefile.am -> Makefile.in
- Linux kernel special Makefile
- Android.mk
Build system/tool
- Ninja and Meson
- Yocto
- Cerbero
C/C++ programming, Linux Programming, Android native application, Embedded systems
The volatile keyword is a type qualifier which tells compiler to not to optimize/cache any operation with these variable.
Value of this variable can change between two read or two write by external forces or event
The volatile keyword is mainly used where we directly deal with GPIO, interrupt or flag Register. It is also used with a global variable or buffer which shared between the threads.
- Write a program to Draw circle
- Write a program for Matrix multiplication
- Write a program to reverse bitstream. (bit by bit reverse in 1 byte of data)
https://stackoverflow.com/questions/22004690/print-odd-and-even-numbers-using-2-threads-using-mutex-in-c
#define my_sizeof(type) (char *)(&type+1)-(char*)(&type)
Little and big endian are two ways of storing multibyte data-types.
Suppose integer is stored as 4 bytes then a variable x with value 0x01234567 will be stored as following in Big Endian
Big Endian:
01, 23, 45, 67
0x100 0x101 0x102 0x103
Little Endian
67, 45, 23, 01
0x100 0x101 0x102 0x103
Sample C program to check this.,
int
main()
{
unsigned
int
i = 1;
char
*c = (
char
*)&i;
if
(*c)
cout<<
"Little endian"
;
else
cout<<
"Big endian"
;
return
0;
}