From f0733c2dc7de49ac469fcbe0386728159e988c7e Mon Sep 17 00:00:00 2001 From: skidder Date: Sun, 2 May 2010 08:41:37 +0000 Subject: [PATCH] Add comments (hopefully helpful) --- src/jrd/dfw.epp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/jrd/dfw.epp b/src/jrd/dfw.epp index 4447318b87..5d3ab18cd5 100644 --- a/src/jrd/dfw.epp +++ b/src/jrd/dfw.epp @@ -158,6 +158,17 @@ typedef Hash< DeferredWork > DfwHash; +// NS: This needs careful refactoring. +// +// Deferred work item: +// * Encapsulates deferred invocation of the task routine with a given set of +// arguments. +// * Has code to maintain a doubly linked list of itself. +// +// These two functions need to be split, and linked list of custom entries can +// become generic. +// + class DeferredWork : public pool_alloc, public DfwHash::Entry { @@ -309,7 +320,7 @@ class DfwSavePoint : public DfwSavePointHash::Entry SLONG dfw_sav_number; public: - DfwHash hash; + DfwHash hash; // Deferred work items posted under this savepoint explicit DfwSavePoint(SLONG number) : dfw_sav_number(number) { } @@ -327,10 +338,11 @@ public: } }; +// List of deferred work items (with per-savepoint break-down) class DeferredJob { public: - DfwSavePointHash hash; + DfwSavePointHash hash; // Hash set of savepoints, that posted work DeferredWork* work; DeferredWork** end;