Locks in Base_mappable class

Adam Lackorzynski adam at os.inf.tu-dresden.de
Sun Aug 24 23:57:22 CEST 2014


On Sun Aug 24, 2014 at 23:38:50 +0200, Adam Lackorzynski wrote:
> On Fri Aug 22, 2014 at 16:45:51 -0400, Yuxin Ren wrote:
> > In the Base_mappable class, in /fiasco/src/kern/mapping_tree.cpp file,
> > what is type of the lock in this class, helping lock, spin lock or others?
> 
> Looks like it's a Helping_lock.
>  
> > And usually I find it is hard to identify the type of a lock.
> > Could someone tell me how to figure out the lock's type?
> 
> So the point with going further to lock.cpp may not be so obvious but
> generally it's just reading around in the code.

For this one it wasn't obvious to me but generally gdb can do the
reading for us:
$ gdb fiasco.image
(gdb) ptype Base_mappable::Lock
type = class Helping_lock : private Switch_lock {
  ...
}
(gdb) 




Adam
-- 
Adam                 adam at os.inf.tu-dresden.de
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/




More information about the l4-hackers mailing list