Locks in Base_mappable class
adam at os.inf.tu-dresden.de
Sun Aug 24 23:38:50 CEST 2014
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?
What I did just now:
- Look up src/kern/mapping_tree.cpp, find class Base_mappable, find
this line in the class:
typedef ::Lock Lock;
- Seeing that Lock is of type ::Lock
- Searching for 'lock' within the file
- Finding out that #include "lock.h" is the most obvious way to go on
- Opening src/kern/lock.cpp
- Seeing: typedef Helping_lock Lock;
So the point with going further to lock.cpp may not be so obvious but
generally it's just reading around in the code.
Adam adam at os.inf.tu-dresden.de
More information about the l4-hackers