-
Notifications
You must be signed in to change notification settings - Fork 8k
ext/opcache: use pthread_mutex_t instead of a fcntl(F_SETLK) #10277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Wouldn't that introduce a pthreads requirement even for NTS builds? |
This PR does add a dependency, but it's optional - it will fall back to flock as before if pthreads is not available. (That (optional) dependency already exists in the PHP core ( |
|
LINUX_X64_RELEASE_ZTS fails due to segfault in |
|
I've triggered a re-run. Let's see. |
|
All green. So the segfault appears to be an existing PHP bug, and unrelated to my code changes. |
e077ffd to
71968c5
Compare
|
Rebased & fixed conflict. |
|
LINUX_X32_DEBUG_ZTS failure unrelated to this PR. |
71968c5 to
27f456f
Compare
|
Rebased & fixed conflict again. |
2d6905e to
a6d76df
Compare
pthread mutexes are lighter than fcntl(F_SETLK) because non-contending operations can avoid the system call. Note that this commit preserves the "lock_file" variable because it is used by ZendAccelerator.c - now that php#10276 is merged, we may consider removing it.
a6d76df to
6e9f69f
Compare
|
Rebased & fixed conflict. |
pthread mutexes are lighter than fcntl(F_SETLK) because non-contending operations can avoid the system call.
Note that this commit preserves the "lock_file" variable because it is used by ZendAccelerator.c - to be removed after
#10276 is merged.