summaryrefslogtreecommitdiff
path: root/examples/kernel/thread_dynamic_simple.c
diff options
context:
space:
mode:
authorGalaIO <[email protected]>2015-09-10 22:59:51 +0800
committerGalaIO <[email protected]>2015-09-10 22:59:51 +0800
commitb886340e67df395261a4b863f65bf7c136d8c239 (patch)
tree14e946ac7e34813bbc52413b803c8ce6f766c9fe /examples/kernel/thread_dynamic_simple.c
parent0690980fb639ae5be732aea42f880977790a4aa5 (diff)
open and then get the new device
in rt_console_set_device, open new device first and get the new device to _console_device. 我在编写程序时,在device驱动中打印log,但是使用rt_kprintf时,如果_console_device存在非空,那就执行驱动的write函数,但是这是device还没有初始化成功,但是已经提前给_console_device赋值,导致了程序无故fault,以上述修改可避开这样的矛盾。
Diffstat (limited to 'examples/kernel/thread_dynamic_simple.c')
0 files changed, 0 insertions, 0 deletions