Re: block_cache

"Salvatore Benedetto" <[email protected]> Wed, 20 Aug 2008 09:54:01 +0000
Newsgroups gmane.os.openbeos.kernel.devel
Message-ID <[email protected]>
Hi there,

I saw your commit and I have another thing to ask :-)

In cache_block_delete, the mutex_lock it seems to be called
unconditionally.

Under the assumption that two thread can call block_cache_delete()
on the very same cache object, it just will lead to a crash, as there is
not check on sCache.Remove(cache). Actually, I just relaized that it
can crash sooner on block_cache_sync() if, after both thread have entered
the function, one of them succefully delete the object before the call.

Regards,
-- 
Salvatore Benedetto (a.k.a. emitrax)
Student of Computer Engineer
University of Pisa
www.haiku-os.it

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/