Re: Locks in Base_mappable class
Adam Lackorzynski <[email protected]>
| Newsgroups | gmane.comp.micro-kernel.l4.devel |
|---|---|
| Message-ID | <[email protected]> |
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 [email protected]
Lackorzynski http://os.inf.tu-dresden.de/~adam/