Fix chx_fatal
This commit is contained in:
15
AUTHORS
15
AUTHORS
@@ -23,16 +23,21 @@ Mateusz Zalega:
|
||||
|
||||
NIIBE Yutaka:
|
||||
Write the library:
|
||||
chopstx.c, eventflag.c, entry.c,
|
||||
clk_gpio_init-kl.c, clk_gpio_init-stm32.c
|
||||
chopstx.c, entry.c, eventflag.c,
|
||||
chopstx.h, eventflag.h
|
||||
Write the drivers mcu/*:
|
||||
clk_gpio_init-mkl27z.c, clk_gpio_init-stm32.c,
|
||||
sys-stm32f103.c, sys-stm32f030.c, sys-mkl27z.c,
|
||||
adc-stm32f103.c, adc-mkl27z.c
|
||||
Draw the logo:
|
||||
chopstx.svg, chopstx.png
|
||||
Write examples:
|
||||
example-led, example-cdc, example-fsm-55
|
||||
Write board:
|
||||
example-led, example-cdc, example-fsm-55, example-fs-bb48
|
||||
Write board/*:
|
||||
board-fst-01.h, board-fst-01-00.h,
|
||||
board-olimex-stm32-h103.h, board-stm8s-discovery.h
|
||||
board-cq-starm.h, board-stbee-mini.h, board-stbee.h,
|
||||
|
||||
board-stm32f0-discovery.h, board-fsm-55.h
|
||||
board-stm32f0-discovery.h, board-fsm-55.h,
|
||||
|
||||
board-fs-bb48.h
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2016-06-01 NIIBE Yutaka <gniibe@fsij.org>
|
||||
|
||||
* chopstx.h (chx_fatal): Remove weak attribute from declaration.
|
||||
* chopstx.c (chx_fatal): Add weak attribute to implementation.
|
||||
|
||||
2016-05-31 NIIBE Yutaka <gniibe@fsij.org>
|
||||
|
||||
* VERSION: 0.12.
|
||||
|
||||
@@ -208,6 +208,8 @@ chx_prio_init (void)
|
||||
| (CPU_EXCEPTION_PRIORITY_PENDSV << 16));
|
||||
}
|
||||
|
||||
void __attribute__((weak)) chx_fatal (uint32_t err_code);
|
||||
|
||||
/**
|
||||
* chx_fatal - Fatal error point.
|
||||
* @err_code: Error code
|
||||
@@ -444,8 +446,8 @@ enum {
|
||||
THREAD_WAIT_MTX,
|
||||
THREAD_WAIT_CND,
|
||||
THREAD_WAIT_TIME,
|
||||
THREAD_WAIT_EXIT,
|
||||
THREAD_WAIT_POLL,
|
||||
THREAD_JOIN,
|
||||
/**/
|
||||
THREAD_EXITED=0x0E,
|
||||
THREAD_FINISHED=0x0F
|
||||
@@ -1191,7 +1193,7 @@ requeue (struct chx_thread *tp)
|
||||
chx_spin_unlock (&cond->lock);
|
||||
/* We don't know who can wake up this thread. */
|
||||
}
|
||||
else if (tp->state == THREAD_JOIN)
|
||||
else if (tp->state == THREAD_WAIT_EXIT)
|
||||
/* Requeue is not needed as waiting for the thread is only by one. */
|
||||
return (struct chx_thread *)tp->v;
|
||||
|
||||
@@ -1572,7 +1574,7 @@ chopstx_join (chopstx_t thd, void **ret)
|
||||
chx_spin_lock (&q_join.lock);
|
||||
ll_prio_enqueue ((struct chx_pq *)running, &q_join.q);
|
||||
running->v = (uint32_t)tp;
|
||||
running->state = THREAD_JOIN;
|
||||
running->state = THREAD_WAIT_EXIT;
|
||||
tp->flag_join_req = 1;
|
||||
|
||||
/* Priority inheritance. */
|
||||
|
||||
@@ -83,7 +83,7 @@ void chopstx_cond_broadcast (chopstx_cond_t *cond);
|
||||
* Library provides default implementation as weak reference.
|
||||
* User can replace it.
|
||||
*/
|
||||
void chx_fatal (uint32_t err_code) __attribute__((__weak__, __noreturn__));
|
||||
void chx_fatal (uint32_t err_code) __attribute__((__noreturn__));
|
||||
|
||||
int chopstx_join (chopstx_t, void **);
|
||||
void chopstx_exit (void *retval) __attribute__((__noreturn__));
|
||||
|
||||
Reference in New Issue
Block a user