dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Disk hangs creating file in new thread

Disk hangs creating file in new thread

From: TP Diffenbach <>
Date: Sun, 10 Aug 2003 11:43:27 -0400

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!
Received on 2003-08-10

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy