···125125 uint32_t start; /* 40 - Thread start address, or NULL when started */
126126};
127127128128-#ifdef CPU_PP
129129-#ifdef HAVE_CORELOCK_OBJECT
130130-/* No reliable atomic instruction available - use Peterson's algorithm */
131131-struct corelock
132132-{
133133- volatile unsigned char myl[NUM_CORES];
134134- volatile unsigned char turn;
135135-} __attribute__((packed));
136136-137137-/* Too big to inline everywhere */
138138-void corelock_init(struct corelock *cl);
139139-void corelock_lock(struct corelock *cl);
140140-int corelock_try_lock(struct corelock *cl);
141141-void corelock_unlock(struct corelock *cl);
142142-#endif /* HAVE_CORELOCK_OBJECT */
143143-#endif /* CPU_PP */
144128#elif defined(CPU_MIPS)
145129struct regs
146130{
···171155#endif
172156#endif /* PLATFORM_NATIVE */
173157158158+#ifdef CPU_PP
159159+#ifdef HAVE_CORELOCK_OBJECT
160160+/* No reliable atomic instruction available - use Peterson's algorithm */
161161+struct corelock
162162+{
163163+ volatile unsigned char myl[NUM_CORES];
164164+ volatile unsigned char turn;
165165+} __attribute__((packed));
166166+167167+/* Too big to inline everywhere */
168168+void corelock_init(struct corelock *cl);
169169+void corelock_lock(struct corelock *cl);
170170+int corelock_try_lock(struct corelock *cl);
171171+void corelock_unlock(struct corelock *cl);
172172+#endif /* HAVE_CORELOCK_OBJECT */
173173+#endif /* CPU_PP */
174174+174175/* NOTE: The use of the word "queue" may also refer to a linked list of
175176 threads being maintained that are normally dealt with in FIFO order
176177 and not necessarily kernel event_queue */
···266267 object where thread is blocked - used
267268 for implicit unblock and explicit wake
268269 states: STATE_BLOCKED/STATE_BLOCKED_W_TMO */
269269-#if NUM_CORES > 1
270270+#ifdef HAVE_CORELOCK_OBJECT
270271 struct corelock *obj_cl; /* Object corelock where thead is blocked -
271272 states: STATE_BLOCKED/STATE_BLOCKED_W_TMO */
272273 struct corelock waiter_cl; /* Corelock for thread_wait */
···323324/* Specify current thread in a function taking an ID. */
324325#define THREAD_ID_CURRENT ((unsigned int)-1)
325326326326-#if NUM_CORES > 1
327327+#ifdef HAVE_CORELOCK_OBJECT
327328/* Operations to be performed just before stopping a thread and starting
328329 a new one if specified before calling switch_thread */
329330enum
···356357 threads */
357358#endif
358359 long next_tmo_check; /* soonest time to check tmo threads */
359359-#if NUM_CORES > 1
360360+#ifdef HAVE_CORELOCK_OBJECT
360361 struct thread_blk_ops blk_ops; /* operations to perform when
361362 blocking a thread */
362363 struct corelock rtr_cl; /* Lock for rtr list */