Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/acpi/madt.c

    r4edd57fd re9f4b59  
    131131};
    132132
    133 static int madt_cmp(void *a, void *b)
    134 {
    135         uint8_t typea = ((struct madt_apic_header *) a)->type;
    136         uint8_t typeb = ((struct madt_apic_header *) b)->type;
     133static int madt_cmp(void *a, void *b, void *arg)
     134{
     135        uint8_t typea = (*((struct madt_apic_header **) a))->type;
     136        uint8_t typeb = (*((struct madt_apic_header **) b))->type;
    137137       
    138138        if (typea > typeb)
     
    208208       
    209209        /* Sort MADT index structure */
    210         qsort(madt_entries_index, madt_entries_index_cnt, sizeof(uintptr_t),
    211             &madt_cmp);
     210        if (!gsort(madt_entries_index, madt_entries_index_cnt,
     211            sizeof(struct madt_apic_header *), madt_cmp, NULL))
     212                panic("Sorting error.");
    212213       
    213214        /* Parse MADT entries */
Note: See TracChangeset for help on using the changeset viewer.