Documentation error?

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
eribla
Posts: 20
Joined: Fri Nov 29, 2013 1:10 am

Documentation error?

Post by eribla »

Hi

reading the how-to about threads http://www.chibios.org/dokuwiki/doku.php?id=chibios:howtos:createthread I am stumbling across this:

Code: Select all

static WORKING_AREA(myThreadWorkingArea, 128);
 
/*
 * LED flashing thread.
 */
static msg_t myThread(void *arg) {
  /* Blink, blink*/
  }
  return (msg_t)i;
}
 
int main(int argc, char *argv[]) {
 
     Thread *tp = chThdCreateFromHeap(NULL, THD_WA_SIZE(128), NORMALPRIO+1, myThread, NULL);
 
     if (tp == NULL)  chSysHalt();    /* Memory exausted. */

//...
//...
}


I can see what the " static WORKING_AREA(myThreadWorkingArea, 128); " is doing for the static threads explained on the same page but not why it's here for the dynamic ones?

Thanks
User avatar
Giovanni
Site Admin
Posts: 14894
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Documentation error?

Post by Giovanni »

Hi,

Thanks for finding, fixed.

Giovanni
Post Reply