-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
std.os.linux: resurrect shm #19266
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
base: master
Are you sure you want to change the base?
std.os.linux: resurrect shm #19266
Conversation
(was going to enumerate the way the types were different but it ended up as 9 comments and thought that would be over-bearing) |
98cc499
to
632e4cf
Compare
@nektro I've resolved the last two points you made. Not sure what to do about the types though. |
|
632e4cf
to
7cc94e8
Compare
Ok, I've updated shmdt and shmid. Made a few of the |
4d73a92
to
9960431
Compare
@RossComputerGuy can you share the steps you used to come up with this patch? |
@andrewrk I used the original implementation and then updated it by looking at the header files which define the methods and stuff. I then ran std tests on my system to see if the shm test passes. |
This reintroduces Linux's shared memory system calls which was in ziglang#7214. It also adds the externs necessary for C.
9960431
to
97f91fe
Compare
A core zig team member will need to check this work. We've unfortunately seen a lot of mistakes in the ABI bits from contributors. |
Note that if you want to do SHM for X11 it actually supports the modern POSIX shared memory too, it's just that the 1.2 version of MIT-SHM that introduced it is entirely undocumented. You'd have to take a peek at the libXCB source code instead or the like. |
Trying to do Wayland shm. |
Seems to be POSIX shared memory on Wayland as well, though? https://wayland-book.com/surfaces/shared-memory.html |
You don't want these syscalls for Wayland shared memory for software rendering buffers ( |
Oh it might been that I needed this for something else but I don't remember. |
This reintroduces Linux's shared memory system calls which was in #7214. It also adds the externs necessary for C.