Oopenvela-robotexamples/pipe: fix double close
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
cmake:refine cmake build for apps/examples Signed-off-by: xuxin19 <xuxin19@xiaomi.com> | 2 个月前 | |
pipe: modify default stack size to fix stack overflow Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com> | 2 个月前 | |
nshlib: support c++ access nsh api N/A Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com> | 2 个月前 | |
nshlib: support c++ access nsh api N/A Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com> | 2 个月前 | |
examples/pipe: fix double close Signed-off-by: yinshengkai <yinshengkai@xiaomi.com> | 2 个月前 | |
tools/mksymtab.sh: Using getopts to parse parameters Use the "-a" option to specify additional lists Examples - The basic.txt $ cat basic.txt basic_func0 basic_func1 basic_func2 - The additional.txt $ cat additional.txt additional_func0 additional_func1 additional_func2 1. Get symbols from directory "EMPTY_DIR" and additional list basic.txt ./tools/mksymtab.sh ./EMPTY_DIR -a basic.txt #if defined(CONFIG_EXECFUNCS_HAVE_SYMTAB) const struct symtab_s CONFIG_EXECFUNCS_SYMTAB_ARRAY[] = #elif defined(CONFIG_NSH_SYMTAB) const struct symtab_s CONFIG_NSH_SYMTAB_ARRAYNAME[] = #else const struct symtab_s dummy_symtab[] = #endif { {"basic_func0", &basic_func0}, {"basic_func1", &basic_func1}, {"basic_func2", &basic_func2}, }; 2. Get symbols from directory "EMPTY_DIR" and two additional lists basic.txt, additional.txt ./tools/mksymtab.sh ./EMPTY_DIR -a basic.txt -a additional.txt #if defined(CONFIG_EXECFUNCS_HAVE_SYMTAB) const struct symtab_s CONFIG_EXECFUNCS_SYMTAB_ARRAY[] = #elif defined(CONFIG_NSH_SYMTAB) const struct symtab_s CONFIG_NSH_SYMTAB_ARRAYNAME[] = #else const struct symtab_s dummy_symtab[] = #endif { {"additional_func0", &additional_func0}, {"additional_func1", &additional_func1}, {"additional_func2", &additional_func2}, {"basic_func0", &basic_func0}, {"basic_func1", &basic_func1}, {"basic_func2", &basic_func2}, }; 3. Set prefix and get symbols from directory "EMPTY_DIR" and two additional lists basic.txt, additional.txt ./tools/mksymtab.sh ./EMPTY_DIR PREFIX_TEST -a basic.txt -a additional.txt const struct symtab_s PREFIX_TEST_exports[] = { {"additional_func0", &additional_func0}, {"additional_func1", &additional_func1}, {"additional_func2", &additional_func2}, {"basic_func0", &basic_func0}, {"basic_func1", &basic_func1}, {"basic_func2", &basic_func2}, }; 4. Error: Missing <imagedirpath> $ ./tools/mksymtab.sh ERROR: Missing <imagedirpath> Usage: ./tools/mksymtab.sh <imagedirpath> [symtabprefix] [-a additionalsymbolspath] UNSUPPORTED usage examples # getopt supports these, but the usage in GNU and macOS is incompatible. - ./tools/mksymtab.sh ./EMPTY_DIR -a basic.txt PREFIX_TEST -a additional.txt - ./tools/mksymtab.sh -a basic.txt ./EMPTY_DIR PREFIX_TEST -a additional.txt References BASH(1) -- getopts GETOPT(1) -- getopt Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com> | 2 个月前 | |
remove <nuttx/xxx.h> in stdio need add depend header file libuv: CC: pthread/pthread_mutexattr_setrobust.c libuv/src/unix/thread.c: In function ‘uv_thread_create_ex’: libuv/src/unix/thread.c:174:24: error: storage size of ‘param’ isn’t known 174 | struct sched_param param; | ^~~~~ btsak_main: In file included from btsak_main.c:39: btsak.h:149:1: error: unknown type name ‘bool’ 149 | bool btsak_str2bool(FAR const char *str); pipe_main.c: CC: sim/sim_registerdump.c pipe_main.c:44:30: error: unknown type name ‘pthread_addr_t’ 44 | static void *open_write_only(pthread_addr_t pvarg) | ^~~~~~~~~~~~~~ pipe_main.c: In function ‘pipe_main’: pipe_main.c:81:3: error: unknown type name ‘pthread_t’ 81 | pthread_t writeonly; redirect_test.c: In function ‘redirection_test’: redirect_test.c:205:3: error: unknown type name ‘pthread_t’ 205 | pthread_t readerid; | ^~~~~~~~~ redirect_test.c:206:3: error: unknown type name ‘pthread_t’ 206 | pthread_t writerid; | ^~~~~~~~~ drivertest_posix_timer.c:48:29: error: ‘optarg’ undeclared (first use in this function) 48 | value = (type)strtoul(optarg, &ptr, base); \ drivertest_posix_timer.c:208:3: warning: implicit declaration of function ‘sleep’ [-Wimplicit-function-declaration] 208 | sleep(SLEEPSECONDS); | ^~~~~ drivertest_uart.c:92:13: warning: implicit declaration of function ‘read’; did you mean ‘fread’? [-Wimplicit-function-declaration] 92 | len = read(fd, &tmp_char, 1); | ^~~~ | fread drivertest_uart.c:323:44: error: ‘optopt’ undeclared (first use in this function) 323 | printf("Unknown option: %c\n", optopt); kernel/fs/cases/fs_getfilep_test.c:71:9: warning: implicit declaration of function ‘fs_getfilep’ [-Wimplicit-function-declaration] 71 | ret = fs_getfilep(fileno(fp), &filep); | ^~~~~~~~~~~ kernel/mm/cases/mm_test_008.c:148:9: warning: implicit declaration of function ‘task_create’; did you mean ‘timer_create’? [-Wimplicit-function-declaration] 148 | pid = task_create("TestNuttx08_routine_1", | ^~~~~~~~~~~ | timer_create /home/ajh/work/nuttxwork/apps/testing/cmocka/cmocka_main.c:171:11: warning: implicit declaration of function ‘setenv’ [-Wimplicit-function-declaration] 171 | setenv("CMOCKA_XML_FILE", xml_path, 1); | ^~~~~~ drivertest_pm_runtime.c:123:7: warning: implicit declaration of function ‘usleep’ [-Wimplicit-function-declaration] 123 | usleep(210 * 1000); | ^~~~~~ Signed-off-by: anjiahao <anjiahao@xiaomi.com> | 2 个月前 | |
remove <nuttx/xxx.h> in stdio need add depend header file libuv: CC: pthread/pthread_mutexattr_setrobust.c libuv/src/unix/thread.c: In function ‘uv_thread_create_ex’: libuv/src/unix/thread.c:174:24: error: storage size of ‘param’ isn’t known 174 | struct sched_param param; | ^~~~~ btsak_main: In file included from btsak_main.c:39: btsak.h:149:1: error: unknown type name ‘bool’ 149 | bool btsak_str2bool(FAR const char *str); pipe_main.c: CC: sim/sim_registerdump.c pipe_main.c:44:30: error: unknown type name ‘pthread_addr_t’ 44 | static void *open_write_only(pthread_addr_t pvarg) | ^~~~~~~~~~~~~~ pipe_main.c: In function ‘pipe_main’: pipe_main.c:81:3: error: unknown type name ‘pthread_t’ 81 | pthread_t writeonly; redirect_test.c: In function ‘redirection_test’: redirect_test.c:205:3: error: unknown type name ‘pthread_t’ 205 | pthread_t readerid; | ^~~~~~~~~ redirect_test.c:206:3: error: unknown type name ‘pthread_t’ 206 | pthread_t writerid; | ^~~~~~~~~ drivertest_posix_timer.c:48:29: error: ‘optarg’ undeclared (first use in this function) 48 | value = (type)strtoul(optarg, &ptr, base); \ drivertest_posix_timer.c:208:3: warning: implicit declaration of function ‘sleep’ [-Wimplicit-function-declaration] 208 | sleep(SLEEPSECONDS); | ^~~~~ drivertest_uart.c:92:13: warning: implicit declaration of function ‘read’; did you mean ‘fread’? [-Wimplicit-function-declaration] 92 | len = read(fd, &tmp_char, 1); | ^~~~ | fread drivertest_uart.c:323:44: error: ‘optopt’ undeclared (first use in this function) 323 | printf("Unknown option: %c\n", optopt); kernel/fs/cases/fs_getfilep_test.c:71:9: warning: implicit declaration of function ‘fs_getfilep’ [-Wimplicit-function-declaration] 71 | ret = fs_getfilep(fileno(fp), &filep); | ^~~~~~~~~~~ kernel/mm/cases/mm_test_008.c:148:9: warning: implicit declaration of function ‘task_create’; did you mean ‘timer_create’? [-Wimplicit-function-declaration] 148 | pid = task_create("TestNuttx08_routine_1", | ^~~~~~~~~~~ | timer_create /home/ajh/work/nuttxwork/apps/testing/cmocka/cmocka_main.c:171:11: warning: implicit declaration of function ‘setenv’ [-Wimplicit-function-declaration] 171 | setenv("CMOCKA_XML_FILE", xml_path, 1); | ^~~~~~ drivertest_pm_runtime.c:123:7: warning: implicit declaration of function ‘usleep’ [-Wimplicit-function-declaration] 123 | usleep(210 * 1000); | ^~~~~~ Signed-off-by: anjiahao <anjiahao@xiaomi.com> | 2 个月前 | |
examples/pipe: fix write usage write returns in case some bytes were written but not everything can fit. This wasn't the case in NuttX but commit d0680fd1bc51b7ead0b068fb24a31a144d22dc6c introduced this standard behavior. | 2 个月前 |