/* Sorted add to a list. List is linear searched until first bigger element is found.  */
static void list_add_sorted(struct vtimer_list *timer, struct list_head *head)
/* Sorted add to a list. List is linear searched until first bigger element is found.  */
static void list_add_sorted(struct vtimer_list *timer, struct list_head *head)
{
	struct vtimer_list *event;
	list_for_each_entry(event, head, entry) {
		if (event->expires > timer->expires) {
			list_add_tail(&timer->entry, &event->entry);
			return;
		}
	}
	list_add_tail(&timer->entry, head);
}