Author: pschweitzer
Date: Sat May 27 16:50:29 2017
New Revision: 74682
URL:
http://svn.reactos.org/svn/reactos?rev=74682&view=rev
Log:
[RXCE]
Implement FCB refcounting
CORE-11327
Modified:
trunk/reactos/sdk/lib/drivers/rxce/rxce.c
Modified: trunk/reactos/sdk/lib/drivers/rxce/rxce.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/drivers/rxce/rxce.…
==============================================================================
--- trunk/reactos/sdk/lib/drivers/rxce/rxce.c [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/drivers/rxce/rxce.c [iso-8859-1] Sat May 27 16:50:29 2017
@@ -4367,12 +4367,25 @@
return Freed;
}
+/*
+ * @implemented
+ */
LONG
RxpDereferenceNetFcb(
PFCB Fcb)
{
- UNIMPLEMENTED;
- return 0;
+ LONG NewCount;
+
+ PAGED_CODE();
+
+ ASSERT(NodeTypeIsFcb(Fcb));
+
+ NewCount = InterlockedDecrement((volatile long *)&Fcb->NodeReferenceCount);
+ ASSERT(NewCount >= 0);
+
+ PRINT_REF_COUNT(NETFCB, NewCount);
+
+ return NewCount;
}
/*
@@ -4491,12 +4504,24 @@
return Container;
}
+/*
+ * @implemented
+ */
LONG
RxpReferenceNetFcb(
PFCB Fcb)
{
- UNIMPLEMENTED;
- return 0;
+ LONG NewCount;
+
+ PAGED_CODE();
+
+ ASSERT(NodeTypeIsFcb(Fcb));
+
+ NewCount = InterlockedIncrement((volatile long *)&Fcb->NodeReferenceCount);
+
+ PRINT_REF_COUNT(NETFCB, Fcb->NodeReferenceCount);
+
+ return NewCount;
}
/*