39#ifndef __INCLUDE_ASMP_MPTASK_H
40#define __INCLUDE_ASMP_MPTASK_H
62# define CPU_ZERO(s) do { *(s) = 0; } while (0)
66# define CPU_SET(c,s) do { *(s) |= (1 << (c)); } while (0)
70# define CPU_CLR(c,s) do { *(s) &= ~(1 << (c)); } while (0)
74# define CPU_ISSET(c,s) ((*(s) & (1 << (c))) != 0)
78# define CPU_COUNT(s) sched_cpu_count(s)
84# define CPU_AND(d,s1,s2) do { *(d) = *(s1) & *(s2); } while (0)
90# define CPU_OR(d,s1,s2) do { *(d) = *(s1) | *(s2); } while (0)
96# define CPU_XOR(d,s1,s2) do { *(d) = *(s1) ^ *(s2); } while (0)
100# define CPU_EQUAL(s1,s2) (*(s2) == *(s2))
105# define CPU_ALLOC(n) (FAR cpu_set_t *)malloc(sizeof(cpu_set_t));
109# define CPU_FREE(s) free(s)
113# define CPU_ALLOC_SIZE(n) sizeof(cpu_set_t)
117# define CPU_ZERO_S(n,s) CPU_ZERO_S(s)
121# define CPU_SET_S(c,n,s) CPU_SET(c,s)
125# define CPU_CLR_S(c,n,s) CPU_CLR(c,s)
129# define CPU_ISSET_S(c,n,s) CPU_ISSET(c,s)
133# define CPU_COUNT_S(n,s) CPU_COUNT(s)
140# define CPU_AND_S(n,d,s1,s2) CPU_AND(d,s1,s2)
147# define CPU_OR_S(n,d,s1,s2) CPU_OR(d,s1,s2)
154# define CPU_XOR_S(n,d,s1,s2) CPU_XOR(d,s1,s2)
160# define CPU_EQUAL_S(n,s1,s2) CPU_EQUAL(s1,s2)
174#define mptask_bindobj(t, o) mptask_bind((t), (mpobj_t *)(o))
278#define EXTERN extern "C"
516#ifdef SDK_EXPERIMENTAL
int16_t cpuid_t
Definition: types.h:64
int16_t mpobjtype_t
Definition: types.h:71
struct mptask_attr mptask_attr_t
struct mptask mptask_t
MP task object.
struct mpbindobj mpbindobj_t
Bind object type.
mptask_state
Definition: mptask.h:188
@ STATE_PAUSED
Definition: mptask.h:191
@ STATE_EXIT
Definition: mptask.h:192
@ STATE_EXEC
Definition: mptask.h:190
@ STATE_INIT
Definition: mptask.h:189
int mptask_getcpuidset(mptask_t *task, cpu_set_t *cpuids)
int mptask_getattr(mptask_t *task, mptask_attr_t *attr)
int mptask_exec(mptask_t *task)
int mptask_init(mptask_t *task, const char *filename)
cpuid_t mptask_getsubcoreid(mptask_t *task)
int mptask_init_secure(mptask_t *task, const char *filename)
int mptask_join(mptask_t *task, int *exit_status)
int mptask_assign_cpus(mptask_t *task, int ncpus)
int mptask_assign(mptask_t *task)
int mptask_destroy(mptask_t *task, bool force, int *exit_status)
int mptask_attr_init(mptask_attr_t *attr)
int mptask_setattr(mptask_t *task, const mptask_attr_t *attr)
int mptask_bind(mptask_t *task, mpobj_t *obj)
cpuid_t mptask_getcpuid(mptask_t *task)
int8_t status
Definition: mptask.h:210
uint32_t exit_status
Definition: mptask.h:213
cpu_set_t affinity
Definition: mptask.h:212
int8_t flags
Definition: mptask.h:211