Skip to content

Conversation

@crabtw
Copy link
Contributor

@crabtw crabtw commented Oct 8, 2012

The pretty printer does not indent foreign constants well.
It outputs

extern  {
    const VAR1: c_int;
        const VAR2: c_int;    }

@crabtw
Copy link
Contributor Author

crabtw commented Oct 14, 2012

The new patch removes duplicate visibilities and fix indentations, for example

pub struct Union_U {
        pub data: [c_uchar]/16,
    }
pub pub const E1: c_uint = 0;
pub pub extern  {

@catamorphism
Copy link
Contributor

Merged, thanks!

bors pushed a commit to rust-lang-ci/rust that referenced this pull request May 15, 2021
RalfJung pushed a commit to RalfJung/rust that referenced this pull request Jul 14, 2024
implement `libc::sched_setaffinity` on linux

fixes rust-lang/miri#2749

the implementation, like `libc::sched_getaffinity`, just always returns `EINVAL`, which kind of simulates a device with zero cpus. I believe the idea is that callers of this function always do it to optimize, so they are likely to gracefully recover from this function returning an error.

based on the libc crate, these functions are also available on android and freebsd (but not on macos or windows). So should the implementation of the `sched_*` functions just be copied to the android and freebsd shims?
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.

2 participants