在线时间0 小时
UID2004101
注册时间2013-4-23
NXP金币0
该用户从未签到
新手上路

- 积分
- 0
- 最后登录
- 1970-1-1
|
在调用_time_delay函数时,会发生下列函数自己调自己的情况
#define _QUEUE_INSERT(queue,queue_member,element) \
_queue_insert((QUEUE_STRUCT_PTR)(queue), \
(QUEUE_ELEMENT_STRUCT_PTR)((pointer)(queue_member)), \
(QUEUE_ELEMENT_STRUCT_PTR)((pointer)(element)))
boolean _queue_insert
(
QUEUE_STRUCT_PTR q_ptr,
QUEUE_ELEMENT_STRUCT_PTR qe_ptr,
QUEUE_ELEMENT_STRUCT_PTR e_ptr
)
{ /* Body */
if (qe_ptr == NULL)
{
/* Insert at the front */
qe_ptr = (QUEUE_ELEMENT_STRUCT_PTR) ((pointer) q_ptr);
} /* Endif */
_int_disable();
if ((q_ptr->MAX != 0) && (q_ptr->SIZE >= q_ptr->MAX))
{
_int_enable();
return (FALSE);
} /* Endif */
_QUEUE_INSERT(q_ptr, qe_ptr, e_ptr);
_int_enable();
return (TRUE);
} /* Endbody */
请问这个函数是怎样结束的,它是怎样把任务描述符加入超时队列的?我看着怎么像是一个死循环啊?
|
|