@@ -343,7 +343,7 @@ traditional two-stack queue data structure:
343343``` ocaml
344344type 'a queue = {
345345 front: 'a list Loc.t;
346- back: 'a list Loc.t
346+ back: 'a list Loc.t;
347347}
348348```
349349
@@ -354,7 +354,7 @@ the two locations:
354354``` ocaml
355355# let queue () = {
356356 front = Loc.make [];
357- back = Loc.make []
357+ back = Loc.make [];
358358 }
359359val queue : unit -> 'a queue = <fun>
360360```
@@ -972,7 +972,7 @@ To create a cache we just create the data structures:
972972# let cache ?hashed_type capacity = {
973973 space = Loc.make capacity;
974974 table = Hashtbl.create ?hashed_type ();
975- order = Dllist.create ()
975+ order = Dllist.create ();
976976 }
977977val cache : ?hashed_type:'a Hashtbl.hashed_type -> int -> ('a, 'b) cache =
978978 <fun>
@@ -1435,7 +1435,7 @@ A queue is then a pair of pointers to the head and tail of a queue:
14351435``` ocaml
14361436type 'a queue = {
14371437 head : 'a node Loc.t Loc.t;
1438- tail : 'a node Loc.t Atomic.t
1438+ tail : 'a node Loc.t Atomic.t;
14391439}
14401440```
14411441
@@ -1622,7 +1622,7 @@ First we redefine the `queue` type to include a `middle` location:
16221622type 'a queue = {
16231623 back : 'a list Loc.t;
16241624 middle : 'a list Loc.t;
1625- front : 'a list Loc.t
1625+ front : 'a list Loc.t;
16261626}
16271627```
16281628
@@ -1744,7 +1744,7 @@ separate chaining. Here is a type for such a basic hash table:
17441744``` ocaml
17451745type ('k, 'v) basic_hashtbl = {
17461746 size: int Loc.t;
1747- data: ('k * 'v Loc.t) list Loc.t array Loc.t
1747+ data: ('k * 'v Loc.t) list Loc.t array Loc.t;
17481748}
17491749```
17501750
@@ -1753,7 +1753,7 @@ The basic hash table constructor just allocates all the locations:
17531753``` ocaml
17541754# let basic_hashtbl () = {
17551755 size = Loc.make 0;
1756- data = Loc.make (Loc.make_array 4 [])
1756+ data = Loc.make (Loc.make_array 4 []);
17571757 }
17581758val basic_hashtbl : unit -> ('a, 'b) basic_hashtbl = <fun>
17591759```
@@ -1847,7 +1847,7 @@ To avoid taking on such adversarial races, we can use a level of indirection:
18471847``` ocaml
18481848type ('k, 'v) hashtbl = {
18491849 pending: [`Nothing | `Rehash of int] Loc.t;
1850- basic: ('k, 'v) basic_hashtbl
1850+ basic: ('k, 'v) basic_hashtbl;
18511851}
18521852```
18531853
@@ -1950,7 +1950,7 @@ After creating a constructor function
19501950``` ocaml
19511951# let hashtbl () = {
19521952 pending = Loc.make `Nothing;
1953- basic = basic_hashtbl ()
1953+ basic = basic_hashtbl ();
19541954 }
19551955val hashtbl : unit -> ('a, 'b) hashtbl = <fun>
19561956```
@@ -1998,7 +1998,7 @@ Perhaps contrary to how it is often described, false sharing doesn't require the
19981998use of atomic variables or atomic instructions. Consider the following example:
19991999
20002000``` ocaml
2001- # type state = { mutable counter : int; mutable finished: bool }
2001+ # type state = { mutable counter : int; mutable finished: bool; }
20022002type state = { mutable counter : int; mutable finished : bool; }
20032003
20042004# let state = { counter = 1_000; finished = false }
@@ -2056,7 +2056,7 @@ following sketch of a queue data structure:
20562056``` ocaml
20572057type 'a queue = {
20582058 head: 'a list Loc.t;
2059- tail: 'a list Loc.t
2059+ tail: 'a list Loc.t;
20602060}
20612061```
20622062
@@ -2065,7 +2065,7 @@ Even if you allocate the locations with padding
20652065``` ocaml
20662066# let queue () = {
20672067 head = Loc.make ~padded:true [];
2068- tail = Loc.make ~padded:true []
2068+ tail = Loc.make ~padded:true [];
20692069 }
20702070val queue : unit -> 'a queue = <fun>
20712071```
@@ -2099,7 +2099,7 @@ one would write
20992099# let queue () =
21002100 Multicore_magic.copy_as_padded {
21012101 head = Loc.make ~padded:true [];
2102- tail = Loc.make ~padded:true []
2102+ tail = Loc.make ~padded:true [];
21032103 }
21042104val queue : unit -> 'a queue = <fun>
21052105```
0 commit comments