Heavy Kaffe I/O at startup
Archie Cobbs
archie at whistle.com
Fri Oct 16 11:25:18 PDT 1998
Godmar Back writes:
> > In other words, how does stdio differ from "a simple stdio-like
> > buffer scheme" in the sense of thread safety?
>
> fread calls read(2) directly.
>
> The "read" you see in jar.c is actually a #define Kaffe_syscall.read(),
> which calls jthreadedRead(), blocking the thread (and not the whole process)
> if the I/O can't succeed.
Ah, that is very tricky.. (and, arguably, bad practice because
it's misleading).. but anyway now I understand -- thanks!
> I think the answer is to write a minimal stdio that calls our "read"
> (i.e., the jsyscall Kaffe_syscall.read) instead of going directly to
> the system, as the "real" stdio does.
Yes.. I also like the mmap approach, though it's presumably less portable.
-Archie
___________________________________________________________________________
Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com
More information about the kaffe
mailing list