Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Disk hangs creating file in new thread
From: TP Diffenbach (rockbox_at_diffenbach.org)
Date: 2003-08-10


I've writen a thread to do some simple monitoring; one of the first things it does
is create a file.

Well, it tries to: when it creates the file, the drive light comes on and stays on
until the unit is hard re-booted.

Can anyone explain what I'm doing wrong, please?

Incidently, what happens if a thread function returns, because it's done doing
whatever it does, or because it can't do what it does? Is this ok?

Here's the (relevant) code:

static void myThread( void ) {
    
    sleep( 60 * HZ ) ;
    
    /* make sure we can create the file */
    ok = ( fd = creat( "/p.log", O_WRONLY ) ) != -1 ;
    
    if( ok ) {
        close( fd ) ;
    }

-- 
Archos FM has a Rockbox!



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa