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

Apple: add host_cpu_load_info #3916

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

stepancheg
Copy link
Contributor

Snippet from host_info.h:

struct host_cpu_load_info {             /* number of ticks while running... */
    natural_t       cpu_ticks[CPU_STATE_MAX]; /* ... in the given mode */
};

typedef struct host_cpu_load_info       host_cpu_load_info_data_t;
typedef struct host_cpu_load_info       *host_cpu_load_info_t;

@rustbot
Copy link
Collaborator

rustbot commented Sep 11, 2024

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@tgross35
Copy link
Contributor

Thanks! Are you able to put this in a s! block rather than s_no_extra_traits! so you don't need to manually write the hash/eq/debug implementations?

@rustbot author

(just comment @rustbot review after you do that change or if it doesn't work for some reason)

Snippet from `host_info.h`:

```
struct host_cpu_load_info {             /* number of ticks while running... */
    natural_t       cpu_ticks[CPU_STATE_MAX]; /* ... in the given mode */
};

typedef struct host_cpu_load_info       host_cpu_load_info_data_t;
typedef struct host_cpu_load_info       *host_cpu_load_info_t;
```
@stepancheg
Copy link
Contributor Author

@rustbot review

@tgross35 tgross35 changed the title Add host_cpu_load_info on Apple Apple: add host_cpu_load_info Nov 6, 2024
@tgross35 tgross35 added this pull request to the merge queue Nov 6, 2024
@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Nov 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 6, 2024
@tgross35 tgross35 added this pull request to the merge queue Nov 6, 2024
Merged via the queue into rust-lang:main with commit 00d01ad Nov 6, 2024
41 checks passed
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Nov 7, 2024
Snippet from `host_info.h`:

```
struct host_cpu_load_info {             /* number of ticks while running... */
    natural_t       cpu_ticks[CPU_STATE_MAX]; /* ... in the given mode */
};

typedef struct host_cpu_load_info       host_cpu_load_info_data_t;
typedef struct host_cpu_load_info       *host_cpu_load_info_t;
```

(backport <rust-lang#3916>)
(cherry picked from commit f31fe2a)
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Nov 7, 2024
Snippet from `host_info.h`:

```
struct host_cpu_load_info {             /* number of ticks while running... */
    natural_t       cpu_ticks[CPU_STATE_MAX]; /* ... in the given mode */
};

typedef struct host_cpu_load_info       host_cpu_load_info_data_t;
typedef struct host_cpu_load_info       *host_cpu_load_info_t;
```

(backport <rust-lang#3916>)
(cherry picked from commit f31fe2a)
@tgross35 tgross35 mentioned this pull request Nov 7, 2024
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review stable-applied This PR has been cherry-picked to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants