Adriaan van Os wrote:
Frank Heckenbach wrote:
As I said, files use a few global variables. Other parts (also used automatically by the compiler) might, but I've never checked them.
I've also never checked the compiler generated code for such cases. Initializers use global flags, but since I suppose threading usually starts after initializers are run, this should be no problem.
Any thoughts on what makes the gpc runtime library kernel-safe or kernel-unsafe ? I assume --no-exceptions is on by default in gpc ?
Kernel-safe!? Do you mean you want to implement a kernel in GPC using the runtime library? I don't think that's a way to go, since the runtime is much more high-level -- e.g., it uses files while the kernel must implement files on the lowest level; also the floating point (including complex) routines should not be useful for a kernel where FP is usually avoided; etc.
This doesn't mean that the Pascal compiler itself couldn't be used to compile a kernel, but that's a situation where it's probably better to start with a different, minimal runtime library.
Frank