| // Copyright 2019 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| // DEPRECATED: This library is being replaced. Do not add new dependencies |
| // to this interface. |
| |
| library fuchsia.scheduler.deprecated; |
| |
| using zx; |
| |
| // Corresponds to zx_cpu_set_t. |
| @deprecated |
| type CpuSet = struct { |
| mask array<uint64, 8>; |
| }; |
| |
| @deprecated |
| @discoverable |
| closed protocol ProfileProvider { |
| /// Obtain a profile handle. |
| /// |
| /// TODO(https://fxbug.dev/42116876): This API will be deprecated and removed in the future, use |
| /// SetProfileByRole instead. |
| strict GetProfile(struct { |
| priority uint32; |
| name string:64; |
| }) -> (resource struct { |
| status zx.Status; |
| profile zx.Handle:<PROFILE, optional>; |
| }); |
| |
| /// Obtain a deadline profile handle. |
| /// |
| /// TODO(https://fxbug.dev/42116876): This API will be deprecated and removed in the future, use |
| /// SetProfileByRole instead. |
| strict GetDeadlineProfile(struct { |
| capacity uint64; |
| deadline uint64; |
| period uint64; |
| name string:64; |
| }) -> (resource struct { |
| status zx.Status; |
| profile zx.Handle:<PROFILE, optional>; |
| }); |
| |
| /// Obtain a handle for a profile that sets CPU affinity. |
| /// |
| /// TODO(https://fxbug.dev/42116876): This API will be deprecated and removed in the future, use |
| /// SetProfileByRole instead. |
| strict GetCpuAffinityProfile(struct { |
| cpu_mask CpuSet; |
| }) -> (resource struct { |
| status zx.Status; |
| profile zx.Handle:<PROFILE, optional>; |
| }); |
| |
| /// Sets the given object's profile based on the requested role. The exact |
| /// parameters of the profile are system dependent and may vary based on |
| /// device-specific tuning and/or runtime system goals. |
| strict SetProfileByRole(resource struct { |
| handle zx.Handle; |
| role string:2048; |
| }) -> (struct { |
| status zx.Status; |
| }); |
| }; |