/* Change Logs: Date Author Notes  RT-Thread First version  xqyjlj perf rt_hw_interrupt_disable/enable  */
void resource_id_init(resource_id_t *mgr, int size, void **res)
/* Change Logs: Date Author Notes  RT-Thread First version  xqyjlj perf rt_hw_interrupt_disable/enable  */
void resource_id_init(resource_id_t *mgr, int size, void **res)
{
    if (mgr)
    {
        mgr->size = size;
        mgr->_res = res;
        mgr->noused = 0;
        mgr->_free = RT_NULL;
        rt_spin_lock_init(&(mgr->spinlock));
    }
}