// © 2021 Qualcomm Innovation Center, Inc. All rights reserved. // // SPDX-License-Identifier: BSD-3-Clause define THREAD_STACK_MAX_BITS constant type count_t = 15; define THREAD_STACK_MAX_SIZE constant size = 1 << THREAD_STACK_MAX_BITS; define THREAD_STACK_MAP_ALIGN_BITS constant type count_t = THREAD_STACK_MAX_BITS + 1; define THREAD_STACK_MAP_ALIGN constant type count_t = 1 << THREAD_STACK_MAP_ALIGN_BITS; define thread_kind enumeration { }; define thread_state enumeration { // INIT state is set by zero-initialisation init = 0; ready; killed; exited; }; define thread_entry_reason enumeration { none = 0; interrupt; exception; hypercall; }; extend thread object { state enumeration thread_state(atomic); kind enumeration thread_kind; params uintptr; stack_base uintptr; stack_size size; }; extend thread_create structure { kind enumeration thread_kind; params uintptr; stack_size size; };