[Trivial] Add dragonfly implementation for shared memory#2106
[Trivial] Add dragonfly implementation for shared memory#2106dlang-bot merged 1 commit intodlang:stablefrom
Conversation
|
Thanks for your pull request and interest in making D better, @dkgroot! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
joakim-noah
left a comment
There was a problem hiding this comment.
Properly scoped, LGTM.
wilzbach
left a comment
There was a problem hiding this comment.
Don't you want to target stable?
src/core/sys/posix/sys/shm.d
Outdated
| time_t shm_atime; | ||
| time_t shm_dtime; | ||
| time_t shm_ctime; | ||
| void * __shm_internal; |
There was a problem hiding this comment.
DStyle: void* (also do you have any resource where it's __shm_internal. I did a quick search, but could only find shm_internal like it's for FreeBSD.
There was a problem hiding this comment.
On Dfly, /usr/include/sys/shm.h looks like:
struct shmid_ds {
struct ipc_perm shm_perm; /* operation permission structure */
size_t shm_segsz; /* size of segment in bytes */
pid_t shm_lpid; /* process ID of last shared memory op */
pid_t shm_cpid; /* process ID of creator */
shmatt_t shm_nattch; /* number of current attaches */
time_t shm_atime; /* time of last shmat() */
time_t shm_dtime; /* time of last shmdt() */
time_t shm_ctime; /* time of last change by shmctl() */
void *shm_internal; /* sysv stupidity */
};
Have not looked at the use or implementation of this header file. I did have to gloss over the comment for this pointer (Logically it would be the opaque pointer to an internal representation/expansion for this struct,). But i thought size might matter (doesn't it always).
There was a problem hiding this comment.
Thanks.
I would suggest to keep the shm_internal name then. You could set it to private though?
But i thought size might matter
Yes.
|
@wilzbach > Don't you want to target stable? |
The master -> stable branch-off already happened. If you target stable, it will be part of the 2.079 tag. |
|
For reference, when retargeting a PR to Also if you depend on this in master, you can simply run |
wilzbach
left a comment
There was a problem hiding this comment.
FYI: I squashed your PR + fixed the DStyle (void* not void *)
|
Thanks @wilzbach / @joakim-noah |
This one was overlooked (and noticed by @joakim-noah in backporting to ldc-ltsmaster)