Skip to content

Apple: add host_cpu_load_info#3916

Merged
tgross35 merged 1 commit into
rust-lang:mainfrom
stepancheg:host-cpu-load-info
Nov 6, 2024
Merged

Apple: add host_cpu_load_info#3916
tgross35 merged 1 commit into
rust-lang:mainfrom
stepancheg:host-cpu-load-info

Conversation

@stepancheg

Copy link
Copy Markdown
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

rustbot commented Sep 11, 2024

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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
Copy Markdown
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
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