1. 功能:创建以个等待队列头 2. 函数原型 #define DECLARE_WAIT_QUEUE_HEAD (name) / wait_queue_head_t name = __WAIT_QUEUE_HEAD_INITIALIZER(name) #define __WAIT_QUEUE_HEAD_INITIALIZER (name) { / .lock = __SPIN_LOCK_UNLOCKED(name.lock), / .task_list = { &(name).task_list, &(nam...
010_Linux驱动之_DECLARE_WAIT_QUEUE_HEAD函数 010_Linux驱动之_DECLARE_WAIT_QUEUE_HEAD函数1. 功能:创建以个等待队列头 2. 函数原型 #define DECLARE_WAIT_QUEUE_HEAD (name) / wait_queue_head_t name = __WAIT_QUEUE_HEAD_INITIALIZER(name) #define __WAIT_QUEUE_HEAD_INITIALIZER (name) { / .lock...
Subject: Re: DECLARE_WAIT_QUEUE_HEAD; structure badly initialized... I have had similar problems with static/global initialization in USB module code. A wait_queue_head was not properly initialized and we had to re-initialize it in module_init(). I also noticed that the static text strings...