diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2013-06-19 10:05:32 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2013-06-19 10:05:32 +0900 |
commit | 058ba0f939f18d890e11828f6a2535559e72bdb7 (patch) | |
tree | 3d0dab69d099b39eecd0aae0de29917511334b43 | |
parent | b65635756347245c8ea52e9ba2b6f1576834140b (diff) |
add chopstx_main
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | chopstx.c | 4 | ||||
-rw-r--r-- | chopstx.h | 2 |
3 files changed, 9 insertions, 0 deletions
@@ -1,5 +1,8 @@ 2013-06-19 Niibe Yutaka <gniibe@fsij.org> + * chopstx.c (chopstx_main): New. + (chx_init): Initialize chopstx_main. + * example-cdc/sample.c (usb_intr): No disable/enable interrupt, but call the handler. @@ -712,6 +712,8 @@ static uint32_t *const AIRCR = (uint32_t *const)0xE000ED0C; static uint32_t *const SHPR2 = (uint32_t *const)0xE000ED1C; static uint32_t *const SHPR3 = (uint32_t *const)0xE000ED20; +chopstx_t chopstx_main; + void chx_init (struct chx_thread *tp) { @@ -741,6 +743,8 @@ chx_init (struct chx_thread *tp) chx_cpu_sched_lock (); tp->prio = CHX_PRIO_MAIN; + + chopstx_main = (chopstx_t)tp; } @@ -29,6 +29,8 @@ typedef uint32_t chopstx_t; typedef uint8_t chopstx_prio_t; +extern chopstx_t chopstx_main; + /* NOTE: This signature is different to PTHREAD's one. */ chopstx_t chopstx_create (uint32_t flags_and_prio, |