This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
cyg_thread_delay() caused an exit on at91 platform
Hi, there,
The cyg_thread_delay() function invoked from a thread caused an exit on my
at91 board.
The arm-elf-gdb showed as attached. It stoped at line 77.
Could anyone let me know why this happened? Is it a system bug or a fault of
my own programme. BTW, cyg_thread_delay() worked well in standard main()
style, but didn't work when I used cyg_user_start() with the same checkout
of eCos.
Thanks a lot.
David
65 externC void
66 exit( int status )
- 67 {
68 CYG_REPORT_FUNCTION(); // shouldn't return, but CYG_FAIL will catch
it
69 CYG_REPORT_FUNCARG1DV( status );
70
71 // Strictly the only thing exit() does is invoke the atexit
handlers
72 // and flush stdio buffers. Anything else is for _exit()
73 // within the implementation)
74
75 #ifdef CYGFUN_LIBC_ATEXIT
76 // we start with the atexit handlers
77 cyg_libc_invoke_atexit_handlers();
78 #endif
79
80 #ifdef CYGSEM_LIBC_EXIT_CALLS_FFLUSH
81
82 int rc;
83
84 CYG_TRACE0( true, "Calling fflush( NULL )" );
- 85 rc = fflush( NULL );
86
87 CYG_TRACE2( rc != 0, "fflush() returned non-zero. It returned %d
and "
88 "errno indicates the error: %s", rc, strerror(errno) );
89 #endif
90
- 91 _exit( status );
92
93 CYG_FAIL( "__libc_exit() returning!!!" );
94
95 CYG_REPORT_RETURN();
96 } // __libc_exit()
97
98 // EOF exit.cxx