在阅读linux内核的过程中,经常会碰到自定义类型,如:typedef struct aa_s{...};起初看时有点不明白_s和_t的区别,直到前几天才恍然大悟。按照我的理解:_s后缀应该是表示struct(一个结构体)的意思。_t后缀应该是表示一个type(一个类型)。下面举个例子:
struct record_s{
int a;
int b;
};
typedef struct record_s record_t;
typedef int pid_t;
在阅读Linux内核时,常遇到自定义类型。作者起初不明白_s和_t后缀的区别,后来理解到_s后缀表示struct(结构体),_t后缀表示一个type(类型),并举例说明,如struct record_s及typedef struct record_s record_t等。
在阅读linux内核的过程中,经常会碰到自定义类型,如:typedef struct aa_s{...};起初看时有点不明白_s和_t的区别,直到前几天才恍然大悟。按照我的理解:_s后缀应该是表示struct(一个结构体)的意思。_t后缀应该是表示一个type(一个类型)。下面举个例子:
struct record_s{
int a;
int b;
};
typedef struct record_s record_t;
typedef int pid_t;
您可能感兴趣的与本文相关的镜像
Stable-Diffusion-3.5
Stable Diffusion 3.5 (SD 3.5) 是由 Stability AI 推出的新一代文本到图像生成模型,相比 3.0 版本,它提升了图像质量、运行速度和硬件效率
2018
1531
4116
1932

被折叠的 条评论
为什么被折叠?