Lines Matching refs:tsk

68  * @tsk: The BestComm task structure
73 extern void bcom_enable(struct bcom_task *tsk);
77 * @tsk: The BestComm task structure
82 extern void bcom_disable(struct bcom_task *tsk);
87 * @tsk: The BestComm task structure
90 bcom_get_task_irq(struct bcom_task *tsk) {
91 return tsk->irq;
101 * @tsk: pointer to task structure
106 _bcom_next_index(struct bcom_task *tsk)
108 return ((tsk->index + 1) == tsk->num_bd) ? 0 : tsk->index + 1;
112 * @tsk: pointer to task structure
117 _bcom_next_outdex(struct bcom_task *tsk)
119 return ((tsk->outdex + 1) == tsk->num_bd) ? 0 : tsk->outdex + 1;
124 * @tsk: The BestComm task structure
127 bcom_queue_empty(struct bcom_task *tsk)
129 return tsk->index == tsk->outdex;
134 * @tsk: The BestComm task structure
137 bcom_queue_full(struct bcom_task *tsk)
139 return tsk->outdex == _bcom_next_index(tsk);
144 * @tsk: The BestComm task structure
148 *bcom_get_bd(struct bcom_task *tsk, unsigned int index)
152 return ((void *)tsk->bd) + (index * tsk->bd_size);
157 * @tsk: The BestComm task structure
160 bcom_buffer_done(struct bcom_task *tsk)
163 if (bcom_queue_empty(tsk))
166 bd = bcom_get_bd(tsk, tsk->outdex);
172 * @tsk: The BestComm task structure
177 bcom_prepare_next_buffer(struct bcom_task *tsk)
181 bd = bcom_get_bd(tsk, tsk->index);
187 bcom_submit_next_buffer(struct bcom_task *tsk, void *cookie)
189 struct bcom_bd *bd = bcom_get_bd(tsk, tsk->index);
191 tsk->cookie[tsk->index] = cookie;
194 tsk->index = _bcom_next_index(tsk);
195 if (tsk->flags & BCOM_FLAGS_ENABLE_TASK)
196 bcom_enable(tsk);
200 bcom_retrieve_buffer(struct bcom_task *tsk, u32 *p_status, struct bcom_bd **p_bd)
202 void *cookie = tsk->cookie[tsk->outdex];
203 struct bcom_bd *bd = bcom_get_bd(tsk, tsk->outdex);
209 tsk->outdex = _bcom_next_outdex(tsk);