Hi Alan, > I have a mysterious crash in a SDL based program when it attempts to > do a pthread_wait in an atexit handler. The error is: pthreads: > ***fatal error, aborting*** pthread_yield called with context > switching disabled. > > My guess is this means that GCC is shutting down the threads system > before the atexit handler is being called.
Are you calling atexit(3) before or after your initialise pthreads? I'd call it after as the registered functions are called in reverse order so if pthreads is registering one itself to "shutdown" then you want that called after yours. Cheers, Ralph. _______________________________________________ GCCSDK mailing list gcc@gccsdk.riscos.info Bugzilla: http://www.riscos.info/bugzilla/index.cgi List Info: http://www.riscos.info/mailman/listinfo/gcc Main Page: http://www.riscos.info/index.php/GCCSDK