Changed out of memory response from system halt to system restart

This commit is contained in:
dnc40085 2018-04-22 22:18:36 -07:00
parent 2735426fc0
commit da2bc7395d
1 changed files with 2 additions and 3 deletions

View File

@ -394,9 +394,8 @@ static void add_to_reg_queue(void* timer_cb_ptr, uint8 suspend_policy){
tmr_cb_queue_t* queue_temp = c_zalloc(sizeof(tmr_cb_queue_t)); tmr_cb_queue_t* queue_temp = c_zalloc(sizeof(tmr_cb_queue_t));
if(!queue_temp){ if(!queue_temp){
//it's boot time currently and we're already out of memory, something is very wrong... //it's boot time currently and we're already out of memory, something is very wrong...
dbg_printf("\n\t%s:out of memory, system halted!\n", __FUNCTION__); dbg_printf("\n\t%s:out of memory, rebooting.", __FUNCTION__);
while(1) system_restart();
system_soft_wdt_feed();
} }
queue_temp->tmr_cb_ptr = timer_cb_ptr; queue_temp->tmr_cb_ptr = timer_cb_ptr;
queue_temp->suspend_policy = suspend_policy; queue_temp->suspend_policy = suspend_policy;