tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: compat code function pointers
hello. I like the compat.* filenames as I think they're more
descriptive than the junk names. If the contents of these files is just
for device links, you might even use:
kern_devcompat.*, which is even more descriptive.
Just my 2 cents.
-thanks
-Brian
On Mar 18, 9:00pm, Christos Zoulas wrote:
} Subject: compat code function pointers
}
} Hi,
}
} Paul and I have been working towards separating the compat code from the
} main kernel and eliminating all the COMPAT_XX ifdefs. This will allow
} the compat modules to work properly even if the kernel is not compiled
} with the compat options.
}
} The general approach to this is to move all the compat code out of the
} main kernel leaving behind function pointers that typically point to
} noops (enosys) that the compat code can then repoint to the compat code
} functions when it loads (and re-point them to noops when it unloads).
}
} The question came up where to store the function pointers for device
} drivers that are not always present in the kernel. We could use weak
} references in the compat code so that the code links, but the kernel
} linker does not currently support weak pointers. Another alternative
} is to create a file in the kernel that contains those function pointers.
}
} Paul suggested:
}
} src/sys/kern/kern_junk.c
} src/sys/sys/kern_junk.h
}
} I suggested:
}
} src/sys/kern/kern_compat.c
} src/sys/sys/compat.h
}
} Opinions?
}
} christos
>-- End of excerpt from Christos Zoulas
Home |
Main Index |
Thread Index |
Old Index