/* Returns a vector_desc entry for an intno/cpu. Either returns a preexisting one or allocates a new one and inserts it into the list. Returns NULL on malloc fail.  */
static struct vector_desc_t* get_desc_for_int(int intno, int cpu)
/* Returns a vector_desc entry for an intno/cpu. Either returns a preexisting one or allocates a new one and inserts it into the list. Returns NULL on malloc fail.  */
static struct vector_desc_t* get_desc_for_int(int intno, int cpu)
{
	struct vector_desc_t *vd = find_desc_for_int(intno, cpu);
	if (vd == NULL) {
		struct vector_desc_t *newvd = k_malloc(sizeof(struct vector_desc_t));
		if (newvd == NULL) {
			return NULL;
		}
		memset(newvd, 0, sizeof(struct vector_desc_t));
		newvd->intno = intno;
		newvd->cpu = cpu;
		insert_vector_desc(newvd);
		return newvd;
	} else {
		return vd;
	}
}