[2/3] dwarf-reader: Improve comments of reader::maybe_associate_die_to_type
Commit Message
While looking into something else, I noticed that the comments of
reader::maybe_associate_die_to_type could be more specific about its
implications in the context of parallel processing.
* src/abg-dwarf-reader.cc (reader::maybe_associate_die_to_type):
Add better comments about the implication of calling this function
in a multi-threaded environment.
Signed-off-by: Dodji Seketeli <dodji@seketeli.org>
---
src/abg-dwarf-reader.cc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
@@ -3746,10 +3746,16 @@ public:
/// represents, if and only if no IR type node was already
/// associated the DIE.
///
- /// If another IR type node, was previously associated with this new
+ /// If another IR type node was previously associated with this new
/// DIE, then the NEW type node is NOT associated. The previous
/// type node that was already associated is returned.
///
+ /// Otherwise, if this is the first time that the DIE is being
+ /// associated to a type IR node, the function makes that type IR
+ /// node be available to other threads calling
+ /// reader::lookup_artifact_from_die or
+ /// reader::lookup_type_artifact_from_die.
+ ///
/// @param die the DIE to consider.
///
/// @param type the type to associate the DIE to.