some bug fixes
[IRC.git] / Robust / src / Runtime / multicoreruntime.h
1 #ifndef MULTICORE_RUNTIME
2 #define MULTICORE_RUNTIME
3
4 #ifndef INLINE
5 #define INLINE    inline __attribute__((always_inline))
6 #endif
7
8 #ifndef bool
9 #define bool int
10 #define true 1
11 #define false 0
12 #endif
13
14 ////////////////////////////////////////////////////////////////
15 // global variables                                          //
16 ///////////////////////////////////////////////////////////////
17
18 // record the starting time
19 unsigned long long bamboo_start_time;
20
21 // data structures for msgs
22 #define BAMBOO_OUT_BUF_LENGTH 3000
23 #define BAMBOO_MSG_BUF_LENGTH 3000
24 int msgdata[BAMBOO_MSG_BUF_LENGTH];
25 volatile int msgdataindex;
26 volatile int msgdatalast;
27 int msglength;
28 volatile bool msgdatafull;
29 int outmsgdata[BAMBOO_OUT_BUF_LENGTH];
30 int outmsgindex;
31 int outmsglast;
32 int outmsgleft;
33 volatile bool isMsgHanging;
34 //volatile bool isMsgSending;
35
36 #define MSG_INDEXINC_I() \
37   msgdataindex = (msgdataindex + 1) % (BAMBOO_MSG_BUF_LENGTH)
38
39 #define MSG_LASTINDEXINC_I() \
40   msgdatalast = (msgdatalast + 1) % (BAMBOO_MSG_BUF_LENGTH)
41
42 #define MSG_CACHE_I(n) \
43   msgdata[msgdatalast] = (n); \
44   MSG_LASTINDEXINC_I()
45
46 // NOTE: if msgdataindex == msgdatalast, it always means that the buffer if
47 //       full. In the case that the buffer is empty, should never call this
48 //       MACRO
49 #define MSG_REMAINSIZE_I(s) \
50   if(msgdataindex < msgdatalast) { \
51     (*(int*)s) = msgdatalast - msgdataindex; \
52   } else if((msgdataindex == msgdatalast) && (!msgdatafull)) { \
53     (*(int*)s) = 0; \
54   }       else { \
55     (*(int*)s) = (BAMBOO_MSG_BUF_LENGTH) -msgdataindex + msgdatalast; \
56   }
57
58 #define OUTMSG_INDEXINC() \
59   outmsgindex = (outmsgindex + 1) % (BAMBOO_OUT_BUF_LENGTH)
60
61 #define OUTMSG_LASTINDEXINC() \
62   outmsglast = (outmsglast + 1) % (BAMBOO_OUT_BUF_LENGTH); \
63   if(outmsglast == outmsgindex) { \
64     BAMBOO_EXIT(0xdd01); \
65   }
66
67 #define OUTMSG_CACHE(n) \
68   outmsgdata[outmsglast] = (n); \
69   OUTMSG_LASTINDEXINC();
70
71 #define MAX_PACKET_WORDS 5
72
73 /* Message format:
74  *      type + Msgbody
75  * type: 1 -- transfer object
76  *       2 -- transfer stall msg
77  *       3 -- lock request
78  *       4 -- lock grount
79  *       5 -- lock deny
80  *       6 -- lock release
81  *       // add for profile info
82  *       7 -- transfer profile output msg
83  *       8 -- transfer profile output finish msg
84  *       // add for alias lock strategy
85  *       9 -- redirect lock request
86  *       a -- lock grant with redirect info
87  *       b -- lock deny with redirect info
88  *       c -- lock release with redirect info
89  *       d -- status confirm request
90  *       e -- status report msg
91  *       f -- terminate
92  *      10 -- requiring for new memory
93  *      11 -- response for new memory request
94  *      12 -- GC init phase start
95  *      13 -- GC start
96  *      14 -- compact phase start
97  *      15 -- flush phase start
98  *      16 -- init phase finish
99  *      17 -- mark phase finish
100  *      18 -- compact phase finish
101  *      19 -- flush phase finish
102  *      1a -- GC finish
103  *      1b -- marked phase finish confirm request
104  *      1c -- marked phase finish confirm response
105  *      1d -- markedObj msg
106  *      1e -- start moving objs msg
107  *      1f -- ask for mapping info of a markedObj
108  *      20 -- mapping info of a markedObj
109  *      21 -- large objs info request
110  *      22 -- large objs info response
111  *      23 -- large objs mapping info
112  *
113  * ObjMsg: 1 + size of msg + obj's address + (task index + param index)+
114  * StallMsg: 2 + corenum + sendobjs + receiveobjs
115  *             (size is always 4 * sizeof(int))
116  * LockMsg: 3 + lock type + obj pointer + lock + request core
117  *            (size is always 5 * sizeof(int))
118  *          4/5/6 + lock type + obj pointer + lock
119  *            (size is always 4 * sizeof(int))
120  *          9 + lock type + obj pointer +  redirect lock + root request core
121  *            + request core
122  *            (size is always 6 * sizeof(int))
123  *          a/b + lock type + obj pointer + redirect lock
124  *              (size is always 4 * sizeof(int))
125  *          c + lock type + lock + redirect lock
126  *            (size is always 4 * sizeof(int))
127  *          lock type: 0 -- read; 1 -- write
128  * ProfileMsg: 7 + totalexetime
129  *               (size is always 2 * sizeof(int))
130  *             8 + corenum
131  *               (size is always 2 * sizeof(int))
132  * StatusMsg: d (size is always 1 * sizeof(int))
133  *            e + status + corenum + sendobjs + receiveobjs
134  *              (size is always 5 * sizeof(int))
135  *            status: 0 -- stall; 1 -- busy
136  * TerminateMsg: f (size is always 1 * sizeof(int)
137  * MemoryMsg: 10 + size + corenum
138  *              (size is always 3 * sizeof(int))
139  *           11 + base_va + size
140  *              (size is always 3 * sizeof(int))
141  * GCMsg: 12/13 (size is always 1 * sizeof(int))
142  *        14 + size of msg + (num of objs to move + (start address
143  *           + end address + dst core + start dst)+)?
144  *           + (num of incoming objs + (start dst + orig core)+)?
145  *           + (num of large obj lists + (start address + lenght
146  *           + start dst)+)?
147  *        15 (size is always 1 * sizeof(int))
148  *        16 + corenum
149  *           (size is always 2 * sizeof(int))
150  *        17 + corenum + gcsendobjs + gcreceiveobjs
151  *           (size if always 4 * sizeof(int))
152  *        18 + corenum + fulfilled blocks num + (finish compact(1) + current
153  *           heap top)/(need mem(0) + mem need)
154  *           size is always 5 * sizeof(int))
155  *        19 + corenum
156  *              (size is always 2 * sizeof(int))
157  *        1a (size is always 1 * sizeof(int))
158  *        1b (size if always 1 * sizeof(int))
159  *        1c + size of msg + corenum + gcsendobjs + gcreceiveobjs
160  *           (size is always 5 * sizeof(int))
161  *        1d + obj's address + request core
162  *           (size is always 3 * sizeof(int))
163  *        1e + corenum + start addr + end addr
164  *           (size if always 4 * sizeof(int))
165  *        1f + obj's address + corenum
166  *           (size is always 3 * sizeof(int))
167  *        20 + obj's address + dst address
168  *           (size if always 3 * sizeof(int))
169  *        21 (size is always 1 * sizeof(int))
170  *        22 + size of msg + corenum + current heap size
171  *           + (num of large obj lists + (start address + length)+)?
172  *        23 + orig large obj ptr + new large obj ptr
173  *            (size is always 3 * sizeof(int))
174  */
175 typedef enum {
176   MSGSTART = 0xD0,       // 0xD0
177   TRANSOBJ,              // 0xD1
178   TRANSTALL,             // 0xD2
179   LOCKREQUEST,           // 0xD3
180   LOCKGROUNT,            // 0xD4
181   LOCKDENY,              // 0xD5
182   LOCKRELEASE,           // 0xD6
183   PROFILEOUTPUT,         // 0xD7
184   PROFILEFINISH,         // 0xD8
185   REDIRECTLOCK,          // 0xD9
186   REDIRECTGROUNT,        // 0xDa
187   REDIRECTDENY,          // 0xDb
188   REDIRECTRELEASE,       // 0xDc
189   STATUSCONFIRM,         // 0xDd
190   STATUSREPORT,          // 0xDe
191   TERMINATE,             // 0xDf
192   MEMREQUEST,            // 0xE0
193   MEMRESPONSE,           // 0xE1
194 #ifdef MULTICORE_GC
195   GCSTARTINIT,           // 0xE2
196   GCSTART,               // 0xE3
197   GCSTARTCOMPACT,        // 0xE4
198   GCSTARTMAPINFO,        // 0xE5
199   GCSTARTFLUSH,          // 0xE6
200   GCFINISHINIT,          // 0xE7
201   GCFINISHMARK,          // 0xE8
202   GCFINISHCOMPACT,       // 0xE9
203   GCFINISHMAPINFO,       // 0xEa
204   GCFINISHFLUSH,         // 0xEb
205   GCFINISH,              // 0xEc
206   GCMARKCONFIRM,         // 0xEd
207   GCMARKREPORT,          // 0xEe
208   GCMARKEDOBJ,           // 0xEf
209   GCMOVESTART,           // 0xF0
210   GCMAPREQUEST,          // 0xF1
211   GCMAPINFO,             // 0xF2
212   GCMAPTBL,              // 0xF3
213   GCLOBJREQUEST,         // 0xF4
214   GCLOBJINFO,            // 0xF5
215   GCLOBJMAPPING,         // 0xF6
216 #ifdef GC_PROFILE//_S
217   GCPROFILES,            // 0xF7
218 #endif
219 #endif
220   MSGEND
221 } MSGTYPE;
222
223 /////////////////////////////////////////////////////////////////////////////////
224 // NOTE: BAMBOO_TOTALCORE -- number of the available cores in the processor.
225 //                           No greater than the number of all the cores in
226 //                           the processor
227 //       NUMCORES -- number of cores chosen to deploy the application. It can
228 //                   be greater than that required to fully parallelize the
229 //                   application. The same as NUMCORES.
230 //       NUMCORESACTIVE -- number of cores that really execute the
231 //                         application. No greater than NUMCORES
232 //       NUMCORES4GC -- number of cores for gc. No greater than NUMCORES.
233 //                      NOTE: currently only support ontinuous cores as gc
234 //                            cores, i.e. 0~NUMCORES4GC-1
235 ////////////////////////////////////////////////////////////////////////////////
236 // data structures of status for termination
237 // only check working cores
238 volatile int corestatus[NUMCORESACTIVE]; // records status of each core
239                                          // 1: running tasks
240                                          // 0: stall
241 volatile int numsendobjs[NUMCORESACTIVE]; // records how many objects a core
242                                           // has sent out
243 volatile int numreceiveobjs[NUMCORESACTIVE]; // records how many objects a
244                                              // core has received
245 volatile int numconfirm;
246 volatile bool waitconfirm;
247 bool busystatus;
248 int self_numsendobjs;
249 int self_numreceiveobjs;
250
251 // get rid of lock msgs for GC version
252 #ifndef MULTICORE_GC
253 // data structures for locking
254 struct RuntimeHash locktable;
255 static struct RuntimeHash* locktbl = &locktable;
256 struct RuntimeHash * lockRedirectTbl;
257 struct RuntimeHash * objRedirectLockTbl;
258 #endif
259 struct LockValue {
260   int redirectlock;
261   int value;
262 };
263 int lockobj;
264 int lock2require;
265 int lockresult;
266 bool lockflag;
267
268 // data structures for waiting objs
269 struct Queue objqueue;
270 struct Queue * totransobjqueue; // queue to hold objs to be transferred
271                                 // should be cleared whenever enter a task
272
273 // data structures for shared memory allocation
274 #ifdef TILERA_BME
275 #define BAMBOO_BASE_VA 0xd000000
276 #elif defined TILERA_ZLINUX
277 #ifdef MULTICORE_GC
278 #define BAMBOO_BASE_VA 0xd000000
279 #endif // MULTICORE_GC
280 #endif // TILERA_BME
281
282 #ifdef BAMBOO_MEMPROF
283 #define GC_BAMBOO_NUMCORES 56
284 #else
285 #define GC_BAMBOO_NUMCORES 62
286 #endif
287
288 #ifdef GC_DEBUG
289 #include "structdefs.h"
290 #define BAMBOO_NUM_PAGES (NUMCORES4GC*(2+1)+3)
291 #define BAMBOO_PAGE_SIZE (64 * 64)
292 #define BAMBOO_SMEM_SIZE (64 * 64) // (BAMBOO_PAGE_SIZE)
293 #define BAMBOO_SHARED_MEM_SIZE ((BAMBOO_PAGE_SIZE) *(BAMBOO_NUM_PAGES))
294 #else
295 #ifdef GC_LARGESHAREDHEAP
296 #define BAMBOO_NUM_PAGES ((GC_BAMBOO_NUMCORES)*(2+2))
297 #else
298 #define BAMBOO_NUM_PAGES ((GC_BAMBOO_NUMCORES)*(2+3)) //(15 * 1024) //(64 * 4 * 0.75) //(1024 * 1024 * 3.5)  3G
299 #endif
300 #ifdef GC_LARGEPAGESIZE
301 #define BAMBOO_PAGE_SIZE (4 * 1024 * 1024)  // (4096)
302 #define BAMBOO_SMEM_SIZE (4 * 1024 * 1024)
303 #elif defined GC_SMALLPAGESIZE
304 #define BAMBOO_PAGE_SIZE (256 * 1024)  // (4096)
305 #define BAMBOO_SMEM_SIZE (256 * 1024)
306 #else
307 #define BAMBOO_PAGE_SIZE (1024 * 1024)  // (4096)
308 #define BAMBOO_SMEM_SIZE (1024 * 1024)
309 #endif // GC_LARGEPAGESIZE
310 #define BAMBOO_SHARED_MEM_SIZE ((BAMBOO_PAGE_SIZE) * (BAMBOO_NUM_PAGES)) //(1024 * 1024 * 240)
311 //((unsigned long long int)(3.0 * 1024 * 1024 * 1024)) // 3G 
312 #endif // GC_DEBUG
313
314 #ifdef MULTICORE_GC
315 #include "multicoregarbage.h"
316
317 typedef enum {
318   SMEMLOCAL = 0x0,// 0x0, using local mem only
319   SMEMFIXED,      // 0x1, use local mem in lower address space(1 block only)
320                   //      and global mem in higher address space
321   SMEMMIXED,      // 0x2, like FIXED mode but use a threshold to control
322   SMEMGLOBAL,     // 0x3, using global mem only
323   SMEMEND
324 } SMEMSTRATEGY;
325
326 SMEMSTRATEGY bamboo_smem_mode; //-DSMEML: LOCAL; -DSMEMF: FIXED;
327                                //-DSMEMM: MIXED; -DSMEMG: GLOBAL;
328
329 struct freeMemItem {
330   INTPTR ptr;
331   int size;
332   int startblock;
333   int endblock;
334   struct freeMemItem * next;
335 };
336
337 struct freeMemList {
338   struct freeMemItem * head;
339   struct freeMemItem * backuplist; // hold removed freeMemItem for reuse;
340                                    // only maintain 1 freemMemItem
341 };
342
343 // table recording the number of allocated bytes on each block
344 // Note: this table resides on the bottom of the shared heap for all cores
345 //       to access
346 volatile int * bamboo_smemtbl;
347 volatile int bamboo_free_block;
348 //bool bamboo_smem_flushed;
349 //struct freeMemList * bamboo_free_mem_list;
350 int bamboo_reserved_smem; // reserved blocks on the top of the shared heap
351                           // e.g. 20% of the heap and should not be allocated
352                           // otherwise gc is invoked
353 volatile INTPTR bamboo_smem_zero_top;
354 #define BAMBOO_SMEM_ZERO_UNIT_SIZE (4 * 1024) // 4KB
355 #else
356 //volatile mspace bamboo_free_msp;
357 INTPTR bamboo_free_smemp;
358 int bamboo_free_smem_size;
359 #endif
360 volatile bool smemflag;
361 volatile INTPTR bamboo_cur_msp;
362 volatile int bamboo_smem_size;
363
364 // for test TODO
365 int total_num_t6;
366
367 // data structures for profile mode
368 #ifdef PROFILE
369
370 #define TASKINFOLENGTH 30000
371 #define INTERRUPTINFOLENGTH 500
372
373 bool stall;
374 //bool isInterrupt;
375 int totalexetime;
376 //unsigned long long interrupttime;
377
378 typedef struct task_info {
379   char* taskName;
380   unsigned long long startTime;
381   unsigned long long endTime;
382   unsigned long long exitIndex;
383   struct Queue * newObjs;
384 } TaskInfo;
385
386 // TODO
387 typedef struct interrupt_info {
388   unsigned long long startTime;
389   unsigned long long endTime;
390 } InterruptInfo;
391
392 TaskInfo * taskInfoArray[TASKINFOLENGTH];
393 int taskInfoIndex;
394 bool taskInfoOverflow;
395 // TODO
396 InterruptInfo * interruptInfoArray[INTERRUPTINFOLENGTH];
397 int interruptInfoIndex;
398 bool interruptInfoOverflow;
399 volatile int profilestatus[NUMCORESACTIVE]; // records status of each core
400                                             // 1: running tasks
401                                             // 0: stall
402 #endif // #ifdef PROFILE
403
404 #ifndef INTERRUPT
405 bool reside;
406 #endif
407 /////////////////////////////////////////////////////////////
408
409 ////////////////////////////////////////////////////////////
410 // these are functions should be implemented in           //
411 // multicore runtime for any multicore processors         //
412 ////////////////////////////////////////////////////////////
413 #ifdef TASK
414 #ifdef MULTICORE
415 INLINE void initialization(void);
416 INLINE void initCommunication(void);
417 INLINE void fakeExecution(void);
418 INLINE void terminate(void);
419 INLINE void initlock(struct ___Object___ * v);
420 #ifdef BAMBOO_MEMPROF
421 INLINE void terminatememprof(void);
422 #endif
423
424 // lock related functions
425 bool getreadlock(void* ptr);
426 void releasereadlock(void* ptr);
427 bool getwritelock(void* ptr);
428 void releasewritelock(void* ptr);
429 bool getwritelock_I(void* ptr);
430 void releasewritelock_I(void * ptr);
431 #ifndef MULTICORE_GC
432 void releasewritelock_r(void * lock, void * redirectlock);
433 #endif
434 /* this function is to process lock requests.
435  * can only be invoked in receiveObject() */
436 // if return -1: the lock request is redirected
437 //            0: the lock request is approved
438 //            1: the lock request is denied
439 INLINE int processlockrequest(int locktype,
440                               int lock,
441                               int obj,
442                               int requestcore,
443                               int rootrequestcore,
444                               bool cache);
445 INLINE void processlockrelease(int locktype,
446                                int lock,
447                                int redirectlock,
448                                bool redirect);
449
450 // msg related functions
451 INLINE void send_hanging_msg(bool isInterrupt);
452 INLINE void send_msg_1(int targetcore,
453                        unsigned long n0,
454                                            bool isInterrupt);
455 INLINE void send_msg_2(int targetcore,
456                        unsigned long n0,
457                        unsigned long n1,
458                                            bool isInterrupt);
459 INLINE void send_msg_3(int targetcore,
460                        unsigned long n0,
461                        unsigned long n1,
462                        unsigned long n2,
463                                            bool isInterrupt);
464 INLINE void send_msg_4(int targetcore,
465                        unsigned long n0,
466                        unsigned long n1,
467                        unsigned long n2,
468                        unsigned long n3,
469                                            bool isInterrupt);
470 INLINE void send_msg_5(int targetcore,
471                        unsigned long n0,
472                        unsigned long n1,
473                        unsigned long n2,
474                        unsigned long n3,
475                        unsigned long n4,
476                                            bool isInterrupt);
477 INLINE void send_msg_6(int targetcore,
478                        unsigned long n0,
479                        unsigned long n1,
480                        unsigned long n2,
481                        unsigned long n3,
482                        unsigned long n4,
483                        unsigned long n5,
484                                            bool isInterrupt);
485 INLINE void cache_msg_1(int targetcore,
486                         unsigned long n0);
487 INLINE void cache_msg_2(int targetcore,
488                         unsigned long n0,
489                         unsigned long n1);
490 INLINE void cache_msg_3(int targetcore,
491                         unsigned long n0,
492                         unsigned long n1,
493                         unsigned long n2);
494 INLINE void cache_msg_4(int targetcore,
495                         unsigned long n0,
496                         unsigned long n1,
497                         unsigned long n2,
498                         unsigned long n3);
499 INLINE void cache_msg_5(int targetcore,
500                         unsigned long n0,
501                         unsigned long n1,
502                         unsigned long n2,
503                         unsigned long n3,
504                         unsigned long n4);
505 INLINE void cache_msg_6(int targetcore,
506                         unsigned long n0,
507                         unsigned long n1,
508                         unsigned long n2,
509                         unsigned long n3,
510                         unsigned long n4,
511                         unsigned long n5);
512 INLINE void transferObject(struct transObjInfo * transObj);
513 INLINE int receiveMsg(uint32_t send_port_pending);
514
515 #ifdef MULTICORE_GC
516 INLINE void transferMarkResults();
517 #endif
518
519 #ifdef PROFILE
520 INLINE void profileTaskStart(char * taskname);
521 INLINE void profileTaskEnd(void);
522 void outputProfileData();
523 #endif  // #ifdef PROFILE
524 ///////////////////////////////////////////////////////////
525
526 /////////////////////////////////////////////////////////////////////////////
527 // For each version of BAMBOO runtime, there should be a header file named //
528 // runtim_arch.h defining following MARCOS:                                //
529 // BAMBOO_NUM_OF_CORE: the # of current residing core                      //
530 // BAMBOO_GET_NUM_OF_CORE(): compute the # of current residing core        //
531 // BAMBOO_COORDS(c, x, y): convert the cpu # to coords (*x, *y)            //
532 // BAMBOO_DEBUGPRINT(x): print out integer x                               //
533 // BAMBOO_DEBUGPRINT_REG(x): print out value of variable x                 //
534 // BAMBOO_EXIT_APP(x): exit the whole application                          //
535 // BAMBOO_EXIT(x): error exit routine with error #                         //
536 // BAMBOO_DIE(x): error exit routine with error msg                        //
537 // BAMBOO_GET_EXE_TIME(): rountine to get current clock cycle number       //
538 // BAMBOO_MSG_AVAIL(): checking if there are msgs coming in                //
539 // BAMBOO_GCMSG_AVAIL(): checking if there are gcmsgs coming in            //
540 // BAMBOO_ENTER_RUNTIME_MODE_FROM_CLIENT(): change to runtime mode from    //
541 //                                          client mode                    //
542 // BAMBOO_ENTER_CLIENT_MODE_FROM_RUNTIME(): change to client mode from     //
543 //                                          runtime mode                   //
544 // BAMBOO_ENTER_SEND_MODE_FROM_CLIENT(): change to send mode from          //
545 //                                       client mode                       //
546 // BAMBOO_ENTER_CLIENT_MODE_FROM_SEND(): change to client mode from        //
547 //                                       send mode                         //
548 // BAMBOO_ENTER_RUNTIME_MODE_FROM_SEND(): change to runtime mode from      //
549 //                                        send mode                        //
550 // BAMBOO_ENTER_SEND_MODE_FROM_RUNTIME(): change to send mode from         //
551 //                                        runtime mode                     //
552 // BAMBOO_WAITING_FOR_LOCK(): routine executed while waiting for lock      //
553 //                            request response                             //
554 // BAMBOO_LOCAL_MEM_CALLOC(x, y): allocate an array of x elements each of  //
555 //                                whose size in bytes is y on local memory //
556 // BAMBOO_LOCAL_MEM_FREE(x): free space with ptr x on local memory         //
557 // BAMBOO_LOCAL_MEM_CLOSE(): close the local heap                          //
558 // BAMBOO_SHARE_MEM_CALLOC_I(x, y): allocate an array of x elements each of//
559 //                                whose size in bytes is y on shared memory//
560 // BAMBOO_SHARE_MEM_CLOSE(): close the shared heap                        //
561 // BAMBOO_CACHE_LINE_SIZE: the cache line size                             //
562 // BAMBOO_CACHE_LINE_MASK: mask for a cache line                           //
563 // BAMBOO_CACHE_FLUSH_RANGE(x, y): flush cache lines started at x with     //
564 //                                 length y                                //
565 // BAMBOO_CACHE_FLUSH_ALL(): flush the whole cache of a core if necessary  //
566 // BAMBOO_MEMSET_WH(x, y, z): memset the specified region of memory (start //
567 //                            address x, size z) to value y with write     //
568 //                            hint, the processor will not fetch the       //
569 //                            current content of the memory and directly   //
570 //                            write                                        //
571 /////////////////////////////////////////////////////////////////////////////
572
573 #endif  // #ifdef MULTICORE
574 #endif  // #ifdef TASK
575 #endif  // #ifndef MULTICORE_RUNTIME