Skip to content
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

Add support for shared memory operations for solaris/illumos #1584

Merged
merged 4 commits into from Nov 28, 2019
Merged

Add support for shared memory operations for solaris/illumos #1584

merged 4 commits into from Nov 28, 2019

Conversation

psumbera
Copy link
Contributor

@psumbera psumbera commented Nov 6, 2019

This is needed because Firefox now uses slice-deque rust crate.

This is needed because Firefox now uses slice-deque rust crate.
@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @gnzlbg (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@gnzlbg
Copy link
Contributor

gnzlbg commented Nov 18, 2019

cc @bgermann @jasonbking

@bors: r+

@bors
Copy link
Contributor

bors commented Nov 18, 2019

📌 Commit a7c0dcf has been approved by gnzlbg

@gnzlbg
Copy link
Contributor

gnzlbg commented Nov 18, 2019

@bors p=100

@bors
Copy link
Contributor

bors commented Nov 18, 2019

⌛ Testing commit a7c0dcf with merge 6b25a56...

bors added a commit that referenced this pull request Nov 18, 2019
Add support for shared memory operations for solaris/illumos

This is needed because Firefox now uses slice-deque rust crate.
@bors
Copy link
Contributor

bors commented Nov 18, 2019

💔 Test failed - checks-cirrus-freebsd-11

@gnzlbg
Copy link
Contributor

gnzlbg commented Nov 19, 2019

@bors: retry

@bors
Copy link
Contributor

bors commented Nov 19, 2019

⌛ Testing commit a7c0dcf with merge 993f102...

bors added a commit that referenced this pull request Nov 19, 2019
Add support for shared memory operations for solaris/illumos

This is needed because Firefox now uses slice-deque rust crate.
@bors
Copy link
Contributor

bors commented Nov 19, 2019

💔 Test failed - status-azure

Copy link
Contributor

@bgermann bgermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shmid_ds is okay for 64 bit CPUs. For 32 bit there would have to be additional padding. But I do not think that Rust supports Solaris on 32 bit.

IPC_ALLOC, IPC_CREAT, IPC_EXCL, and IPC_NOWAIT take different values on illumos.

Everything else seems to be okay.

pub struct shmid_ds {
pub shm_perm: ipc_perm,
pub shm_segsz: ::size_t,
pub shm_flags: ::uintptr_t,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no shm_flags in illumos. This is also at the location where shm_amp would be for illumos. In addition, shm_gransize and shm_allocated are not defined on illumos, and the padding appears to be incorrect for illumos.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/sys/shm.h#L88-L115 shows the illumos definition (as @bgermann said, currently there is no 32-bit support for rust on illumos, so it's probably not necessary to add the 32-bit versions -- if that were to ever happen, it'd probably better be done as its own change since many more things would need to be updated).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The IPC_* values are ok -- for likely historical reasons lost to time, the values are defined in octal on illumos (but appear to match what you have)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yes, so forget about that.

@gnzlbg
Copy link
Contributor

gnzlbg commented Nov 21, 2019

Is there anything that @psumbera needs to update here or is this ready?

@jasonbking
Copy link
Contributor

The shmid_ds struct is wrong for illumos. I cannot say if it's correct for Solaris or not. At minimum it either needs to be guarded so it's only used with the solaris target, or updated so it's correct on both.

@jasonbking
Copy link
Contributor

Looks good now. Thanks for the update!

@gnzlbg
Copy link
Contributor

gnzlbg commented Nov 25, 2019

@bors: r+

@bors
Copy link
Contributor

bors commented Nov 25, 2019

📌 Commit 3c1b0ee has been approved by gnzlbg

@bors
Copy link
Contributor

bors commented Nov 25, 2019

⌛ Testing commit 3c1b0ee with merge 6df8682...

bors added a commit that referenced this pull request Nov 25, 2019
Add support for shared memory operations for solaris/illumos

This is needed because Firefox now uses slice-deque rust crate.
@bors
Copy link
Contributor

bors commented Nov 25, 2019

💔 Test failed - status-azure

@gnzlbg
Copy link
Contributor

gnzlbg commented Nov 27, 2019

@bors: r+

@bors
Copy link
Contributor

bors commented Nov 27, 2019

📌 Commit 412dd4e has been approved by gnzlbg

@bors
Copy link
Contributor

bors commented Nov 27, 2019

⌛ Testing commit 412dd4e with merge c870690...

bors added a commit that referenced this pull request Nov 27, 2019
Add support for shared memory operations for solaris/illumos

This is needed because Firefox now uses slice-deque rust crate.
@bors
Copy link
Contributor

bors commented Nov 27, 2019

💔 Test failed - status-azure

@gnzlbg
Copy link
Contributor

gnzlbg commented Nov 28, 2019

@bors: retry

bors added a commit that referenced this pull request Nov 28, 2019
Add support for shared memory operations for solaris/illumos

This is needed because Firefox now uses slice-deque rust crate.
@bors
Copy link
Contributor

bors commented Nov 28, 2019

⌛ Testing commit 412dd4e with merge 096d868...

@bors
Copy link
Contributor

bors commented Nov 28, 2019

☀️ Test successful - checks-cirrus-freebsd-10, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, status-azure
Approved by: gnzlbg
Pushing 096d868 to master...

@bors bors merged commit 412dd4e into rust-lang:master Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants