blob: e6718d6757498c187c0f554f8691018645c3eee5 [file] [log] [blame]
// 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.
@available(added=HEAD)
library fuchsia.scheduler.deprecated;
using zx;
// Corresponds to zx_cpu_set_t.
@deprecated
type CpuSet = struct {
mask array<uint64, 8>;
};
// TODO(https://fxbug.dev/42116876): This protocol will be removed in the
// future. Use fuchsia.sheduler.RoleManager instead.
@deprecated
@discoverable
closed protocol ProfileProvider {
/// Obtain a profile handle.
strict GetProfile(struct {
priority uint32;
name string:64;
}) -> (resource struct {
status zx.Status;
profile zx.Handle:<PROFILE, optional>;
});
/// Obtain a deadline profile handle.
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.
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;
});
};