Messages in this thread | | | Date | Sat, 21 Aug 2004 21:46:32 -0700 | From | "David S. Miller" <> | Subject | Re: [patch] context-switching overhead in X, ioport(), 2.6.8.1 |
| |
FWIW, I would recommend a sparse bitmap implementation for the ioport stuff. Something simple like:
struct set_ent { u32 pos; u32 bits; struct set_ent *next; };
static inline int is_set(struct set_ent *head, int pos) { while (head != NULL) { if (pos >= head->pos) { if (pos < head->pos + 32) { if (head->bits & (1 << (pos - head->pos))) return 1; } break; }
head = head->next; } return 0; }
You get the idea. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |