c 知识
#ifdef, #ifndef, #else, #define
等宏定义。
它可以被 gcc 编译的时候定义。
例如 如下代码:
#ifndef USE_PTHREAD_LOCK
可以在编译的时候 gcc -DUSE_PTHREAD_LOCK
定义.
How to detect the cpu architecture such as x__86_64__ and x__i386__
C restrict
keyword
In the C programming language, restrict is a keyword, introduced by the C99 standard, that can be used in pointer declarations. By adding this type qualifier, a programmer hints to the compiler that for the lifetime of the pointer, no other pointer will be used to access the object to which it points.
How to Preprocess code only?
gcc -E main.c
time types in c
How to start a process in background
./a.out &
;