70 #define COPU_CHECK if (coreid_as() != 0) return PN_ERR_COPU;
80 #define ALL_HALTED if (read_PNCE_as() > 1) return PN_ERR_MATCH;
90 #define BEGIN_THREADED_LINKED_SEC_CHECK \
93 if ((numcores > numcores_as()) || (numcores <= 1)) \
94 return PN_ERR_PARAM; \
95 if (numcores >= PN_RWIDTH) \
104 #define BEGIN_THREADED_LINKED_SEC_CHECK_M \
107 if (!(coremask & 0b1)) \
108 return PN_ERR_PARAM; \
116 #define CREATE_THREAD_SEC_CHECK_M \
118 if (!(coremask & 0b1)) \
119 return PN_ERR_PARAM; \
127 extern int shared_mem_size;
128 #define BEGIN_LINKED_STACK_FRAME_CHECK \
129 if (frame_adr != NULL && \
130 (frame_adr < stack_ptr_as() || \
131 frame_adr > (stack_ptr_as() + shared_mem_size))) \
132 return PN_ERR_PARAM; \
139 #define CONVERT_NUMC_TO_MASK \
140 for (i = 2; i < numcores; i++) \
141 coremask |= (1 << i);
148 #define TERMNL "\n\r"
200 extern void halt_as(
void);
201 extern PN_NUMC numcores_as(
void);
202 extern PN_CID coreid_as(
void);
203 extern PN_CMSK read_PNCE_as(
void);
204 extern PN_CMSK read_PNLM_as(
void);
205 extern void enable_CPU_as(
PN_CMSK coremask);
207 extern int simulation_as(
void);
int32_t PN_CID
Signed type that can be used to address any core in this architecture.
Definition: paranut.h:356
int32_t PN_NUMC
Signed type that can hold the maximum number of cores in this architecture.
Definition: paranut.h:357
uint32_t PN_CMSK
Unsigned type that can act as a core mask.
Definition: paranut.h:358