[kaffe] [gump] utf8const.c

Helmer Krämer hkraemer at freenet.de
Wed Jan 5 05:03:11 PST 2005


Davanum Srinivas <dims at yahoo.com> wrote:

> looks like we need a lock for locking access to utfLockRoot :(
> 

I'd think that the whole utfLockRoot thing is broken (you'd
need one utfLockRoot per thread since it's perfectly legal
for two threads to work on utf8 constants at the same time).
However, I think we could just remove the utfLockRoot thing
completely, couldn't we? Even if one of the allocations in
utf8const.c triggers a garbage collection, the thread holding
the utf8Lock will be resumed before the finaliser starts to
free unreachable objects (at least with kaffe-gc). This means
that we don't have to drop the lock before doing an allocation,
which renders utf8LockRoot useless. Or I just overlooked
something ...

Regards,
Helmer 




More information about the kaffe mailing list