-
Notifications
You must be signed in to change notification settings - Fork 74
Shared memory synchronization primitives #126
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
Comments
I'm a collaborator of nginx-module-vts which is collecting and viewing the virtual host’s traffic status with shared memory. Unfortunately, we knew the issue it is not supported shared memory on this library, it could not start to rewrite with this. |
Greetings, That's an interesting coincidence. Past couple of weeks I've been working on preparing the shared zone support code from an internal project for publishing. Hopefully, I'll get the pull-request ready this week. The initial plan is to add:
A good starting point for you would be to determine the data layout for your shared memory and see what additional types and data structures you will need. We can discuss these requirements when I publish the initial support. One thing you've mentioned is a better support for unit-tests. This scenario isn't well supported right now; most of the code from |
To enable use of shared memory in the modules, we need a set of safe abstractions over
src/os/unix/ngx_atomic.h
,src/core/ngx_shmtx.h
,src/core/ngx_slab.h
andsrc/core/ngx_rwlock.h
.The goal is both to offer good safe Rust types and to be interoperable with the existing C types (upstream peers might be the most important here). It is acceptable if these goals lead to a two distinct sets of types.
Some inspiration could be taken from the Rust for Linux project and the Rust Atomics and Locks book.
The text was updated successfully, but these errors were encountered: