Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Drewery <bryan@shatow.net>2015-04-16 05:45:07 +0300
committerBryan Drewery <bryan@shatow.net>2015-04-17 01:12:45 +0300
commit4b91b68d0a6bc083a39069553fae7b0c7fad7cd4 (patch)
tree325508921da2893cd6f9de021d92b24d02b24b4a /.gitignore
parentca3cbc6d5522cca90613b2b45fa0117efbc04118 (diff)
Rewrite lock_acquire() to not spam 'sleep 0.1'
This now uses a lockf(1)-inspired helper named 'locked_mkdir'. It uses lockf(1)-style locking with open(O_EXLOCK) to serialize 'locked_mkdir' itself for the mkdir(2) call. The act of creating a directory is considered obtaining the lock since it is not bound to a specific process and is atomic. If the directory already exists (or is a file) then kqueue(2) is used to wait to mkdir(2) once it is deleted. A timeout is added that is shared between the O_EXLOCK lock and kqueue(2) wait.
Diffstat (limited to '.gitignore')
-rw-r--r--.gitignore1
1 files changed, 1 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index a1299cf5..be6937fd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,7 @@
/cpdup
/dirempty
/dirwatch
+/locked_mkdir
/jexecd
/make_index
/nc