I am trying to do
memset(&idt_entries, 0, sizeof(idt_entry_t)*256);
which produces
error: cannot convert ‘idt_entry_t (*)[256] {aka idt_entry_struct ()[256]}’ to ‘u8int {aka unsigned char*}’ for argument ‘1’ to ‘void memset(u8int*, u8int, u32int)’
If it helps, it is C code wraped in extern "C" {...}.
Thanks!
idt_entriesis an array 256 ofidt_entry_t.The value of the array
idt_entriesis a pointer to its first element. Use this value as the first argument tomemset. The size of your array issizeof idt_entries.So here is how to correctly call
memsetto set all array elements to 0: