| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
changes the indentation style from 4 spaces to 8 spaces which we expect to
see in other FreeBSD source files.
|
|
|
|
| |
Pointed out by: Amir Shalem
|
|
|
|
|
|
|
|
| |
Add a flags argument to wait_for_lock so that O_NONBLOCK can be
passed to open if a user doesn't want the open to sleep until the
lock becomes available.
Submitted by: Amir Shalem (partially modified)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for mutual exclusion:
A brief description of the problem:
1) Proc A picks up non-blocking lock on file X
2) Proc B attempts to pickup lock, fails then waits
3) Proc C attempts to pickup lock, fails then waits
4) Proc A releases lock
5) Proc B acquires lock, release it to pickup a non-blocking version
6) Proc C acquires lock, release it to pickup a non-blocking version
7) Both process B and C race each other to pickup lock again
This occurs mainly because the processes do not keep the lock after they have
been waiting on it. They drop it, attempt to re-acquire it. (They use the wait
to notify when the lock has become available then race to pick it up). This
results in additional CPU utilization during the race, and can also result
in processes picking locks up out of order.
This change attempts to correct this problem by eliminating the test/acquire
race and having the operating system handle it.
Reported by: kris
Tested by: kris
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
that have at least 3 characters.
MFC after: 1 week
Thanks to: Music band ``Chingon''
for keeping me company while searching for these.
|
|
|
|
| |
Approved by: re (blanket)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
help the GCC3 transition and CURRENT in general.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
rather than removed.
Submitted by: Nick Barnes <Nick.Barnes@pobox.com>
|
| |
|
| |
|
|
|
|
| |
posix standard on the topic.
|
| |
|
|
|
|
|
|
|
|
| |
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
|
|
|
|
|
|
|
|
|
|
| |
return EX_TEMPFAIL if the file was already locked. This makes it easier
to distinguish between lock collisions and failures within the command
being executed.
Also, don't complain if the unlink() fails in the cleanup handler. It
doesn't matter anyway, and it obscured the exit status returned from
the command that was executed.
|
|
while holding an exclusive lock on a file.
|