list_for_each_entry_safe的形参说明
时间: 2023-05-10 15:55:35 浏览: 94
list_for_each_entry_safe的形参说明如下:
1. pos:指向当前遍历的节点的指针。
2. n:指向下一个节点的指针。
3. head:指向链表头节点的指针。
4. member:链表节点在结构体中的成员名。
5. type:结构体类型。
6. tmp:用于保存当前节点的指针,以便在删除节点时使用。
7. 注意:list_for_each_entry_safe是一个宏定义,不是一个函数。
相关问题
initializer_list形参
initializer_list是C++11提供的一种新类型,定义在头文件<initializer_list>中。它用于表示某种特定类型的值的数组。和vector一样,initializer_list也是一种模板类型。你可以像定义vector一样定义initializer_list对象,即使用{}括号括起来并用逗号分隔每个元素。
pthread_create形参
pthread_create函数的形参如下:
int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
void *(*start_routine) (void *), void *arg);
具体解释如下:
1. thread:一个指向 pthread_t 类型对象的指针,用于存储新创建线程的标识符。
2. attr:一个指向 pthread_attr_t 类型对象的指针,用于设置新创建线程的属性。可以将其设置为 NULL,使用默认属性。
3. start_routine:一个函数指针,指向新线程要执行的函数。这个函数必须具有以下特征:返回类型为 void*,参数类型为 void*。
4. arg:传递给 start_routine 函数的参数。可以是任何类型的指针,将被传递给 start_routine 函数。
相关推荐
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)