void rt_icmp_cleanup_echo_requests(void) { unsigned long flags; struct list_head *entry = &echo_calls; struct list_head *next; rtos_spin_lock_irqsave(&echo_calls_lock, flags); entry = echo_calls.next; INIT_LIST_HEAD(&echo_calls); rtos_spin_unlock_irqrestore(&echo_calls_lock, flags); while (entry != &echo_calls) { next = entry->next; rtpc_complete_call_nrt((struct rt_proc_call *)entry, -EINTR); entry = next; } }
void rt_icmp_cleanup_echo_requests(void) { unsigned long flags; struct list_head *entry = &echo_calls; struct list_head *next; rtos_spin_lock_irqsave(&echo_calls_lock, flags); entry = echo_calls.next; INIT_LIST_HEAD(&echo_calls); rtos_spin_unlock_irqrestore(&echo_calls_lock, flags); while (entry != &echo_calls) { next = entry->next; rtpc_complete_call_nrt((struct rt_proc_call *)entry, -EINTR); entry = next; } /* purge any pending ICMP fragments */ rt_ip_frag_invalidate_socket(&icmp_socket); }
void rt_icmp_cleanup_echo_requests(void) { rtdm_lockctx_t context; struct list_head *entry; struct list_head *next; rtdm_lock_get_irqsave(&echo_calls_lock, context); entry = echo_calls.next; INIT_LIST_HEAD(&echo_calls); rtdm_lock_put_irqrestore(&echo_calls_lock, context); while (entry != &echo_calls) { next = entry->next; rtpc_complete_call_nrt((struct rt_proc_call *)entry, -EINTR); entry = next; } /* purge any pending ICMP fragments */ rt_ip_frag_invalidate_socket(icmp_socket); }