?????????????????????????block????????
???????????? ???????[ 2012/10/18 10:28:39 ] ????????
??????????????????????????????????????wait_option????????????????к????block??????????????????????????????????棬???????????????????????????????????????????????????block???????????NULL??
RAW_U16 raw_block_release(MEM_POOL *pool_ptr?? RAW_VOID *block_ptr)
{
LIST *block_list_head;
RAW_U8 *work_ptr; /* Working block pointer */
RAW_U8 need_schedule = 0;
RAW_SR_ALLOC();
#if (RAW_BLOCK_FUNCTION_CHECK > 0)
if (block_ptr == 0) {
return RAW_NULL_OBJECT;
}
if (pool_ptr == 0) {
return RAW_NULL_OBJECT;
}
#endif
block_list_head = &pool_ptr->common_block_obj.block_list;
RAW_CRITICAL_ENTER();
work_ptr = ((RAW_U8 *) block_ptr);
if (is_list_empty(block_list_head)) {
/* Put the block back in the available list. */
*((RAW_U8 **) work_ptr) = pool_ptr ->raw_block_pool_available_list;
/* Adjust the head pointer. */
pool_ptr ->raw_block_pool_available_list = work_ptr;
/* Increment the count of available blocks. */
pool_ptr ->raw_block_pool_available++;
}
else {
need_schedule = 1;
wake_send_msg(list_entry(block_list_head->next?? RAW_TASK_OBJ?? task_list)?? block_ptr);
}
RAW_CRITICAL_EXIT();
if (need_schedule) {
raw_sched();
}
/* Return completion status. */
return RAW_SUCCESS;
}
???????????????free????????????????free???????????wake_send_msg??????????????????????????????????????????????????????????????????????????need_schedule?????1??????????????е?????????????????????????????м?????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11