#include <os/workgroup_interval.h>

os/workgroup_interval.h

For header doc
3 typedefs · 3 functions · 1 macro

typedefos_workgroup_interval_t

OS_WORKGROUP_SUBCLASS_DECL(os_workgroup_interval, os_workgroup, WorkGroupInterval)

typedefos_workgroup_interval_data_s

@typedef os_workgroup_interval_data, os_workgroup_interval_data_t @abstract An opaque structure containing additional configuration for the workgroup interval.
typedef struct os_workgroup_interval_data_opaque_s os_workgroup_interval_data_s

typedefos_workgroup_interval_data_t

typedef struct os_workgroup_interval_data_opaque_s *os_workgroup_interval_data_t

macroOS_WORKGROUP_INTERVAL_DATA_INITIALIZER

#define OS_WORKGROUP_INTERVAL_DATA_INITIALIZER { .sig = _OS_WORKGROUP_INTERVAL_DATA_SIG_INIT }

functionos_workgroup_interval_start

API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0)) OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT int os_workgroup_interval_start(
	os_workgroup_interval_t wg,
	uint64_t start,
	uint64_t deadline,
	os_workgroup_interval_data_t _Nullable data
)
@function os_workgroup_interval_start @abstract Indicates to the system that the member threads of this os_workgroup_interval_t have begun working on an instance of the repeatable interval workload with the specified timestamps. This function is real time safe. This function will set and return an errno in the following cases: - The current thread is not a member of the os_workgroup_interval_t - The os_workgroup_interval_t has been cancelled - The timestamps passed in are malformed - os_workgroup_interval_start() was previously called on the os_workgroup_interval_t without an intervening os_workgroup_interval_finish() - A concurrent workgroup interval configuration operation is taking place. @param start Start timestamp specified in the os_clockid_t with which the os_workgroup_interval_t was created. This is generally a time in the past and indicates when the workgroup started working on an interval period @param deadline Deadline timestamp specified in the os_clockid_t with which the os_workgroup_interval_t was created. This specifies the deadline which the interval period would like to meet. @param data This field is currently unused and should be NULL

functionos_workgroup_interval_update

API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0)) OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT int os_workgroup_interval_update(
	os_workgroup_interval_t wg,
	uint64_t deadline,
	os_workgroup_interval_data_t _Nullable data
)
@function os_workgroup_interval_update @abstract Updates an already started workgroup interval to have the new deadline specified. This function is real time safe. This function will return an error in the following cases: - The current thread is not a member of the os_workgroup_interval_t - The os_workgroup_interval_t has been cancelled - The timestamp passed in is malformed - os_workgroup_interval_start() was not previously called on the os_workgroup_interval_t or was already matched with an os_workgroup_interval_finish() - A concurrent workgroup interval configuration operation is taking place @param deadline Timestamp specified in the os_clockid_t with which the os_workgroup_interval_t was created. @param data This field is currently unused and should be NULL

functionos_workgroup_interval_finish

API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0)) OS_REFINED_FOR_SWIFT OS_WORKGROUP_EXPORT OS_WORKGROUP_WARN_RESULT int os_workgroup_interval_finish(
	os_workgroup_interval_t wg,
	os_workgroup_interval_data_t _Nullable data
)
@function os_workgroup_interval_finish @abstract Indicates to the system that the member threads of this os_workgroup_interval_t have finished working on the current instance of the interval workload. This function is real time safe. This function will return an error in the following cases: - The current thread is not a member of the os_workgroup_interval_t - os_workgroup_interval_start() was not previously called on the os_workgroup_interval_t or was already matched with an os_workgroup_interval_finish() - A concurrent workgroup interval configuration operation is taking place. @param data This field is currently unused and should be NULL