A thread can terminate itself with remove_thread(NULL). No other step is needed and that call will never return. No need to save the pointer or yield afterwards as _had_ been the norm before.
----- Original Message ----- From: "Timo Horstschäfer" <[EMAIL PROTECTED]> To: "Rockbox development" <[email protected]> Sent: Wednesday, March 14, 2007 11:42 AM Subject: Re: Optimizing plugin-shutdowns using threads > Jonas Hellesøe Nielsen wrote: > > What about making a thread f.ex. named "Rockboy save thread", which still > > runs 1-5 seconds _after_ the game is finished, and when finished with > > saving exits itself (If the thread API allows a thread to close itself)? > I think some kind of a disk write-queue would achieve the same. > Or maybe just a global write buffer, that flushes on every disk spin up. > > -- > Timo Horstschäfer >
