From ecf494db75faa6850316b993a16ddf89e9e62931 Mon Sep 17 00:00:00 2001 From: Nathan Memmott Date: Thu, 6 Jul 2023 13:50:07 -0700 Subject: [PATCH] Support locking of directory entries Moves the locking algorithm from file entry to file system entry. Fixes #137 --- index.bs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.bs b/index.bs index 9526b99..13000b0 100644 --- a/index.bs +++ b/index.bs @@ -135,8 +135,8 @@ To take a lock with a |value| of 1. Let |lock| be the |entry|'s [=file system entry/lock=]. 1. Let |count| be the |entry|'s [=file system entry/shared lock count=]. -1. If |entry| is a [=directory entry=]: - 1. Let |descendantLockStatus| be the result of [=file system entry/lock/checking for a descendant lock=] on |entry|. +1. If |entry| is a [=directory entry=]: + 1. Let |descendantLockStatus| be the result of [=file system entry/checking for a descendant lock=] on |entry|. 1. If |descendantLockStatus| is "`taken`": 1. Return "`failure`". 1. If |value| is "`exclusive`": @@ -158,7 +158,7 @@ Note: These steps have to be run on the [=file system queue=].
-To check for a descendant lock on a given +To check for a descendant lock on a given [=directory entry=] |directory|: 1. [=set/For each=] |child| of |directory|'s [=directory entry/children=]: @@ -166,7 +166,7 @@ To check for a descendant lock on a give 1. If |lock| is not "`open`": 1. Return "`taken`". 1. If |child| is a [=directory entry=]: - 1. Let |descendantLockStatus| be the result of [=file system entry/lock/checking for a descendant lock=] on |child|. + 1. Let |descendantLockStatus| be the result of [=file system entry/checking for a descendant lock=] on |child|. 1. If |descendantLockStatus| is "`taken`": 1. Return "`taken`". 1. Return "`open`".