Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years, 12 months ago.
Threadのスタックサイズ指定
すみません。スタックのサイズを少し大きく取りたくて、下記のような簡単なスレッドを 試してみました。デフォルト・スタック指定や、スタックサイズが10kの場合はうまく 動作するようなのですが、サイズ20kではうまく動作しないみたい、なんですが、...
void thread1(const void *av)
{
while(1) {
printf("Thread 1 is running\n") ;
wait(1.0) ;
}
}
int main()
{
printf("Starting,...\n") ;
Thread t(thread1, NULL, osPriorityNormal, 20000);
// Thread t(thread1, NULL, osPriorityNormal, 10000); /* OK */
// Thread t(thread1, NULL, osPriorityNormal); /* OK */
while(1)
wait(1.0) ;
}