From df7815f2140a87e25e8e321f49c3a04d0a421977 Mon Sep 17 00:00:00 2001
From: Vishal Gupta <vishalgupta7972@gmail.com>
Date: Wed, 13 Apr 2022 13:36:55 +0200
Subject: [PATCH] Fix typo in lab 7

---
 labs/lab7-hazard-pointer/hazardptr.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/labs/lab7-hazard-pointer/hazardptr.md b/labs/lab7-hazard-pointer/hazardptr.md
index 4554466..3f8edaa 100644
--- a/labs/lab7-hazard-pointer/hazardptr.md
+++ b/labs/lab7-hazard-pointer/hazardptr.md
@@ -23,7 +23,7 @@ abstract class AbstractHazardPointer(numPointerPerThread: Int) extends Monitor:
 
   val hazardPointerArray: ArrayBuffer[Option[Node]] = ArrayBuffer.fill(numPointerPerThread * maxThreads)(None)
 
-  val retiredListArray: ArrayBuffer[ArrayBuffer[Node]] = ArrayBuffer.fill(maxThreads)(ArrayBuffer())
+  val retiredListArray: ArrayBuffer[ArrayBuffer[Option[Node]]] = ArrayBuffer.fill(maxThreads)(ArrayBuffer())
 
   // This function will be overridden when running in parallel.
   def getMyId(): Int = 0
@@ -34,7 +34,7 @@ abstract class AbstractHazardPointer(numPointerPerThread: Int) extends Monitor:
   // Return ith per-thread hazard pointer ( 0 <= i <= numPointerPerThread )
   def get(i: Int): Option[Node]
 
-  def retireNode(node: Node) : Unit
+  def retireNode(node: Option[Node]) : Unit
 ```
 
 hazardPointerArray is an Array of hazard pointers. This array will store per-thread hazard pointers. You can use `get` / `update` functions to read/write per-thread hazard pointers.
@@ -44,7 +44,7 @@ You have to implement the retireNode function in the hazardPointer class.
 ```scala
 class HazardPointer(numPointerPerThread: Int) extends AbstractHazardPointer(numPointerPerThread):
 
-  def retireNode(node: Node) = ???
+  def retireNode(node: Option[Node]) = ???
 ```
 ### `retireNode`
 
-- 
GitLab