Open rellermeyer opened 10 years ago
assert.h is sort of already implemented with the testing framework. But it's definitely non-standard. Some headers I think are a bit unnecessary, for example setjmp.h, iso646.h and signal.h (the last one only makes sense in userland). Locale.h can be usful maybe, but usually I think userland processes are responsible for stuff like that, and it's something that the kernel doesn't need to worry about much. You might also want to think about adding some things that are especially useful for the kernel. An example of that is the constants.h file we have with some definition of memory sizes. Apart from that: great work setting up a to do list!
assert.h is sort of already implemented with the testing framework. But it's definitely non-standard. Some headers I think are a bit unnecessary, for example setjmp.h, iso646.h and signal.h (the last one only makes sense in userland). Locale.h can be usful maybe, but usually I think userland processes are responsible for stuff like that, and it's something that the kernel doesn't need to worry about much. You might also want to think about adding some things that are especially useful for the kernel. An example of that is the constants.h file we have with some definition of memory sizes. Apart from that: great work setting up a to do list!
It deliberately says to implement or to research! The point is to make this a comprehensive look at the libc to prevent anyone else having to worry about it, so I added all the headers from C99 so I could cross them out here and give my reason why here. For example, the chance that I will implement wide characters is really small but if I look at them first and document my reasons for skipping them then people won't have to worry about it in the future
alright, you're right it does say that :+1: Then this is just my initial reaction on them. But doing your research seems like a good idea. I suspect you will have to embrace the fact that libc of a kernel just has different needs than ansi C 99. But I think you already know that :)
We will need a restricted set of libc-like functions in the kernel. E.g., some way of printing output for debugging, some initial way of dynamically allocating memory a la kmalloc, etc.