From 8f03a390471628081bd78b7c5f34a0a6a404ee95 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 10 Jul 2011 06:50:12 +0000 Subject: Added thread names to all demos. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3143 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARM7-AT91SAM7S-FATFS-GCC/main.c | 2 ++ demos/ARM7-AT91SAM7S-GCC/main.c | 1 + demos/ARM7-AT91SAM7X-FATFS-GCC/main.c | 1 + demos/ARM7-AT91SAM7X-GCC/main.c | 1 + demos/ARM7-AT91SAM7X-LWIP-GCC/main.c | 1 + demos/ARM7-AT91SAM7X-UIP-GCC/main.c | 1 + demos/ARM7-LPC214x-FATFS-GCC/main.c | 2 ++ demos/ARM7-LPC214x-GCC/main.c | 2 ++ demos/ARMCM0-LPC1114-LPCXPRESSO/main.c | 2 ++ demos/ARMCM3-LPC1343-LPCXPRESSO/main.c | 2 ++ demos/ARMCM3-STM32F100-DISCOVERY/main.c | 1 + demos/ARMCM3-STM32F103-FATFS/main.c | 1 + demos/ARMCM3-STM32F103/main.c | 1 + demos/ARMCM3-STM32F107/main.c | 1 + demos/ARMCM3-STM32L152-DISCOVERY/main.c | 1 + demos/MSP430-MSP430x1611-GCC/main.c | 1 + demos/PPC-SPC563-GCC/main.c | 1 + demos/STM8L-STM8L152-DISCOVERY-STVD/demo/main.c | 1 + demos/STM8S-STM8S105-DISCOVERY-STVD/demo/main.c | 1 + demos/STM8S-STM8S208-RC/main.c | 1 + testhal/LPC11xx/IRQ_STORM/main.c | 2 ++ testhal/LPC13xx/IRQ_STORM/main.c | 2 ++ testhal/STM32/ADC/main.c | 1 + testhal/STM32/CAN/main.c | 2 ++ testhal/STM32/IRQ_STORM/main.c | 2 ++ testhal/STM32/SPI/main.c | 2 ++ testhal/STM32/USB_CDC/main.c | 1 + testhal/STM32/USB_MSC/main.c | 1 + 28 files changed, 38 insertions(+) diff --git a/demos/ARM7-AT91SAM7S-FATFS-GCC/main.c b/demos/ARM7-AT91SAM7S-FATFS-GCC/main.c index c88480673..c525cdc54 100644 --- a/demos/ARM7-AT91SAM7S-FATFS-GCC/main.c +++ b/demos/ARM7-AT91SAM7S-FATFS-GCC/main.c @@ -228,6 +228,7 @@ static WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { (void)arg; + chRegSetThreadName("blinker1"); while (TRUE) { palTogglePad(IOPORT1, PIOA_LED1); if (fs_ready) @@ -245,6 +246,7 @@ static WORKING_AREA(waThread2, 64); static msg_t Thread2(void *p) { (void)p; + chRegSetThreadName("blinker2"); while (TRUE) { palSetPad(IOPORT1, PIOA_LED2); chThdSleepMilliseconds(100); diff --git a/demos/ARM7-AT91SAM7S-GCC/main.c b/demos/ARM7-AT91SAM7S-GCC/main.c index 64ce7bf9f..643a7f8aa 100644 --- a/demos/ARM7-AT91SAM7S-GCC/main.c +++ b/demos/ARM7-AT91SAM7S-GCC/main.c @@ -26,6 +26,7 @@ static WORKING_AREA(waThread1, 128); static msg_t Thread1(void *p) { (void)p; + chRegSetThreadName("blinker"); while (TRUE) { palSetPad(IOPORT1, PIOA_LED1); chThdSleepMilliseconds(100); diff --git a/demos/ARM7-AT91SAM7X-FATFS-GCC/main.c b/demos/ARM7-AT91SAM7X-FATFS-GCC/main.c index 8ebc9dd22..d761f2b2d 100644 --- a/demos/ARM7-AT91SAM7X-FATFS-GCC/main.c +++ b/demos/ARM7-AT91SAM7X-FATFS-GCC/main.c @@ -228,6 +228,7 @@ static WORKING_AREA(waThread1, 128); static msg_t Thread1(void *p) { (void)p; + chRegSetThreadName("blinker"); while (TRUE) { palSetPad(IOPORT2, PIOB_LCD_BL); chThdSleepMilliseconds(100); diff --git a/demos/ARM7-AT91SAM7X-GCC/main.c b/demos/ARM7-AT91SAM7X-GCC/main.c index df12fbc3a..da548e9ba 100644 --- a/demos/ARM7-AT91SAM7X-GCC/main.c +++ b/demos/ARM7-AT91SAM7X-GCC/main.c @@ -26,6 +26,7 @@ static WORKING_AREA(waThread1, 128); static msg_t Thread1(void *p) { (void)p; + chRegSetThreadName("blinker"); while (TRUE) { palSetPad(IOPORT2, PIOB_LCD_BL); chThdSleepMilliseconds(100); diff --git a/demos/ARM7-AT91SAM7X-LWIP-GCC/main.c b/demos/ARM7-AT91SAM7X-LWIP-GCC/main.c index 77bebd3fc..6d8fbb22d 100644 --- a/demos/ARM7-AT91SAM7X-LWIP-GCC/main.c +++ b/demos/ARM7-AT91SAM7X-LWIP-GCC/main.c @@ -29,6 +29,7 @@ static WORKING_AREA(waThread1, 128); static msg_t Thread1(void *p) { (void)p; + chRegSetThreadName("blinker"); while (TRUE) { palSetPad(IOPORT2, PIOB_LCD_BL); chThdSleepMilliseconds(100); diff --git a/demos/ARM7-AT91SAM7X-UIP-GCC/main.c b/demos/ARM7-AT91SAM7X-UIP-GCC/main.c index 491d62abc..e15f83772 100644 --- a/demos/ARM7-AT91SAM7X-UIP-GCC/main.c +++ b/demos/ARM7-AT91SAM7X-UIP-GCC/main.c @@ -30,6 +30,7 @@ static WORKING_AREA(waThread1, 128); static msg_t Thread1(void *p) { (void)p; + chRegSetThreadName("blinker"); while (TRUE) { palSetPad(IOPORT2, PIOB_LCD_BL); chThdSleepMilliseconds(100); diff --git a/demos/ARM7-LPC214x-FATFS-GCC/main.c b/demos/ARM7-LPC214x-FATFS-GCC/main.c index 63389e832..bb8c012af 100644 --- a/demos/ARM7-LPC214x-FATFS-GCC/main.c +++ b/demos/ARM7-LPC214x-FATFS-GCC/main.c @@ -80,6 +80,7 @@ static WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { (void)arg; + chRegSetThreadName("blinker1"); while (TRUE) { palClearPort(IOPORT1, PAL_PORT_BIT(PA_LED2)); chThdSleepMilliseconds(200); @@ -100,6 +101,7 @@ static WORKING_AREA(waThread2, 128); static msg_t Thread2(void *arg) { (void)arg; + chRegSetThreadName("blinker2"); while (TRUE) { palClearPad(IOPORT1, PA_LEDUSB); chThdSleepMilliseconds(200); diff --git a/demos/ARM7-LPC214x-GCC/main.c b/demos/ARM7-LPC214x-GCC/main.c index 030a35375..b78ce1e0e 100644 --- a/demos/ARM7-LPC214x-GCC/main.c +++ b/demos/ARM7-LPC214x-GCC/main.c @@ -31,6 +31,7 @@ static WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { (void)arg; + chRegSetThreadName("blinker1"); while (TRUE) { palClearPort(IOPORT1, PAL_PORT_BIT(PA_LED2)); chThdSleepMilliseconds(200); @@ -51,6 +52,7 @@ static WORKING_AREA(waThread2, 128); static msg_t Thread2(void *arg) { (void)arg; + chRegSetThreadName("blinker2"); while (TRUE) { palClearPad(IOPORT1, PA_LEDUSB); chThdSleepMilliseconds(200); diff --git a/demos/ARMCM0-LPC1114-LPCXPRESSO/main.c b/demos/ARMCM0-LPC1114-LPCXPRESSO/main.c index 62ecafded..0ca63f5d9 100644 --- a/demos/ARMCM0-LPC1114-LPCXPRESSO/main.c +++ b/demos/ARMCM0-LPC1114-LPCXPRESSO/main.c @@ -52,6 +52,7 @@ static WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { (void)arg; + chRegSetThreadName("blinker1"); while (TRUE) { palClearPad(GPIO0, GPIO0_LED2); chThdSleepMilliseconds(500); @@ -67,6 +68,7 @@ static WORKING_AREA(waThread2, 128); static msg_t Thread2(void *arg) { (void)arg; + chRegSetThreadName("blinker2"); while (TRUE) { palClearPort(GPIO1, PAL_PORT_BIT(GPIO1_LED3B) | PAL_PORT_BIT(GPIO1_LED3R) | diff --git a/demos/ARMCM3-LPC1343-LPCXPRESSO/main.c b/demos/ARMCM3-LPC1343-LPCXPRESSO/main.c index 2511b5b3c..fcef04556 100644 --- a/demos/ARMCM3-LPC1343-LPCXPRESSO/main.c +++ b/demos/ARMCM3-LPC1343-LPCXPRESSO/main.c @@ -52,6 +52,7 @@ static WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { (void)arg; + chRegSetThreadName("blinker1"); while (TRUE) { palClearPad(GPIO0, GPIO0_LED2); chThdSleepMilliseconds(500); @@ -67,6 +68,7 @@ static WORKING_AREA(waThread2, 128); static msg_t Thread2(void *arg) { (void)arg; + chRegSetThreadName("blinker2"); while (TRUE) { palClearPort(GPIO1, PAL_PORT_BIT(GPIO1_LED3B) | PAL_PORT_BIT(GPIO1_LED3R) | diff --git a/demos/ARMCM3-STM32F100-DISCOVERY/main.c b/demos/ARMCM3-STM32F100-DISCOVERY/main.c index ff9c4ec70..4aa8f421c 100644 --- a/demos/ARMCM3-STM32F100-DISCOVERY/main.c +++ b/demos/ARMCM3-STM32F100-DISCOVERY/main.c @@ -160,6 +160,7 @@ static msg_t Thread1(void *arg) { static uint32_t seconds_counter; (void)arg; + chRegSetThreadName("counter"); while (TRUE) { chThdSleepMilliseconds(1000); seconds_counter++; diff --git a/demos/ARMCM3-STM32F103-FATFS/main.c b/demos/ARMCM3-STM32F103-FATFS/main.c index 5efa25f4c..a2bc4cf03 100644 --- a/demos/ARMCM3-STM32F103-FATFS/main.c +++ b/demos/ARMCM3-STM32F103-FATFS/main.c @@ -216,6 +216,7 @@ static WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { (void)arg; + chRegSetThreadName("blinker"); while (TRUE) { palTogglePad(IOPORT3, GPIOC_LED); if (fs_ready) diff --git a/demos/ARMCM3-STM32F103/main.c b/demos/ARMCM3-STM32F103/main.c index d16bea6ab..f69a521df 100644 --- a/demos/ARMCM3-STM32F103/main.c +++ b/demos/ARMCM3-STM32F103/main.c @@ -29,6 +29,7 @@ static WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { (void)arg; + chRegSetThreadName("blinker"); while (TRUE) { palClearPad(GPIOC, GPIOC_LED); chThdSleepMilliseconds(500); diff --git a/demos/ARMCM3-STM32F107/main.c b/demos/ARMCM3-STM32F107/main.c index c68df6de2..570d6b2e3 100644 --- a/demos/ARMCM3-STM32F107/main.c +++ b/demos/ARMCM3-STM32F107/main.c @@ -29,6 +29,7 @@ static WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { (void)arg; + chRegSetThreadName("blinker"); while (TRUE) { palClearPad(GPIOC, GPIOC_LED_STATUS1); chThdSleepMilliseconds(500); diff --git a/demos/ARMCM3-STM32L152-DISCOVERY/main.c b/demos/ARMCM3-STM32L152-DISCOVERY/main.c index f5e583c81..6f0ea53a0 100644 --- a/demos/ARMCM3-STM32L152-DISCOVERY/main.c +++ b/demos/ARMCM3-STM32L152-DISCOVERY/main.c @@ -30,6 +30,7 @@ static WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { (void)arg; + chRegSetThreadName("blinker"); while (TRUE) { palSetPad(GPIOB, GPIOB_LED3); chThdSleepMilliseconds(250); diff --git a/demos/MSP430-MSP430x1611-GCC/main.c b/demos/MSP430-MSP430x1611-GCC/main.c index 6d1bd989d..e2c82a693 100644 --- a/demos/MSP430-MSP430x1611-GCC/main.c +++ b/demos/MSP430-MSP430x1611-GCC/main.c @@ -29,6 +29,7 @@ static WORKING_AREA(waThread1, 64); static msg_t Thread1(void *arg) { (void)arg; + chRegSetThreadName("blinker"); while (TRUE) { palSetPad(IOPORT6, P6_O_LED); chThdSleepMilliseconds(500); diff --git a/demos/PPC-SPC563-GCC/main.c b/demos/PPC-SPC563-GCC/main.c index cba0c4996..aa1b9fd7e 100644 --- a/demos/PPC-SPC563-GCC/main.c +++ b/demos/PPC-SPC563-GCC/main.c @@ -115,6 +115,7 @@ static WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { (void)arg; + chRegSetThreadName("blinker"); SIU.GPDO[GPIO_LED1].R = 1; SIU.GPDO[GPIO_LED2].R = 1; diff --git a/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/main.c b/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/main.c index 4582d0701..b631d28e6 100644 --- a/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/main.c +++ b/demos/STM8L-STM8L152-DISCOVERY-STVD/demo/main.c @@ -29,6 +29,7 @@ static WORKING_AREA(waThread1, 64); static msg_t Thread1(void *arg) { (void)arg; + chRegSetThreadName("blinker"); while (TRUE) { palSetPad(GPIOC, PC_LED4); chThdSleepMilliseconds(250); diff --git a/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/main.c b/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/main.c index 796246948..de0313316 100644 --- a/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/main.c +++ b/demos/STM8S-STM8S105-DISCOVERY-STVD/demo/main.c @@ -29,6 +29,7 @@ static WORKING_AREA(waThread1, 64); static msg_t Thread1(void *arg) { (void)arg; + chRegSetThreadName("blinker"); while (TRUE) { palClearPad(GPIOD, PD_LD10); chThdSleepMilliseconds(500); diff --git a/demos/STM8S-STM8S208-RC/main.c b/demos/STM8S-STM8S208-RC/main.c index 89a9f78cd..cf507eda4 100644 --- a/demos/STM8S-STM8S208-RC/main.c +++ b/demos/STM8S-STM8S208-RC/main.c @@ -29,6 +29,7 @@ static WORKING_AREA(waThread1, 64); static msg_t Thread1(void *arg) { (void)arg; + chRegSetThreadName("blinker"); while (TRUE) { palClearPad(IOPORT2, PB_LED(7)); chThdSleepMilliseconds(500); diff --git a/testhal/LPC11xx/IRQ_STORM/main.c b/testhal/LPC11xx/IRQ_STORM/main.c index 1efc169a4..b1746efa9 100644 --- a/testhal/LPC11xx/IRQ_STORM/main.c +++ b/testhal/LPC11xx/IRQ_STORM/main.c @@ -70,6 +70,8 @@ static msg_t WorkerThread(void *arg) { unsigned r; msg_t msg; + chRegSetThreadName("worker"); + /* Work loop.*/ while (TRUE) { /* Waiting for a message.*/ diff --git a/testhal/LPC13xx/IRQ_STORM/main.c b/testhal/LPC13xx/IRQ_STORM/main.c index 589184a8e..ec65677d5 100644 --- a/testhal/LPC13xx/IRQ_STORM/main.c +++ b/testhal/LPC13xx/IRQ_STORM/main.c @@ -70,6 +70,8 @@ static msg_t WorkerThread(void *arg) { unsigned r; msg_t msg; + chRegSetThreadName("worker"); + /* Work loop.*/ while (TRUE) { /* Waiting for a message.*/ diff --git a/testhal/STM32/ADC/main.c b/testhal/STM32/ADC/main.c index f702ab8a7..214f28b5f 100644 --- a/testhal/STM32/ADC/main.c +++ b/testhal/STM32/ADC/main.c @@ -68,6 +68,7 @@ static WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { (void)arg; + chRegSetThreadName("blinker"); while (TRUE) { palClearPad(IOPORT3, GPIOC_LED); chThdSleepMilliseconds(500); diff --git a/testhal/STM32/CAN/main.c b/testhal/STM32/CAN/main.c index c8879d6d4..ce52ee67a 100644 --- a/testhal/STM32/CAN/main.c +++ b/testhal/STM32/CAN/main.c @@ -43,6 +43,7 @@ static msg_t can_rx(void *p) { CANRxFrame rxmsg; (void)p; + chRegSetThreadName("receiver"); chEvtRegister(&CAND1.rxfull_event, &el, 0); while(!chThdShouldTerminate()) { if (chEvtWaitAnyTimeout(ALL_EVENTS, MS2ST(100)) == 0) @@ -64,6 +65,7 @@ static msg_t can_tx(void * p) { CANTxFrame txmsg; (void)p; + chRegSetThreadName("transmitter"); txmsg.IDE = CAN_IDE_EXT; txmsg.EID = 0x01234567; txmsg.RTR = CAN_RTR_DATA; diff --git a/testhal/STM32/IRQ_STORM/main.c b/testhal/STM32/IRQ_STORM/main.c index 4cdb7a193..7dcc62d61 100644 --- a/testhal/STM32/IRQ_STORM/main.c +++ b/testhal/STM32/IRQ_STORM/main.c @@ -70,6 +70,8 @@ static msg_t WorkerThread(void *arg) { unsigned r; msg_t msg; + chRegSetThreadName("worker"); + /* Work loop.*/ while (TRUE) { /* Waiting for a message.*/ diff --git a/testhal/STM32/SPI/main.c b/testhal/STM32/SPI/main.c index e9807e93c..3750203bc 100644 --- a/testhal/STM32/SPI/main.c +++ b/testhal/STM32/SPI/main.c @@ -54,6 +54,7 @@ static WORKING_AREA(spi_thread_1_wa, 256); static msg_t spi_thread_1(void *p) { (void)p; + chRegSetThreadName("SPI thread 1"); while (TRUE) { spiAcquireBus(&SPID1); /* Acquire ownership of the bus. */ palClearPad(IOPORT3, GPIOC_LED); /* LED ON. */ @@ -74,6 +75,7 @@ static WORKING_AREA(spi_thread_2_wa, 256); static msg_t spi_thread_2(void *p) { (void)p; + chRegSetThreadName("SPI thread 2"); while (TRUE) { spiAcquireBus(&SPID1); /* Acquire ownership of the bus. */ palSetPad(IOPORT3, GPIOC_LED); /* LED OFF. */ diff --git a/testhal/STM32/USB_CDC/main.c b/testhal/STM32/USB_CDC/main.c index e55e54685..a0a965bba 100644 --- a/testhal/STM32/USB_CDC/main.c +++ b/testhal/STM32/USB_CDC/main.c @@ -406,6 +406,7 @@ static WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { (void)arg; + chRegSetThreadName("blinker"); while (TRUE) { palClearPad(IOPORT3, GPIOC_LED); chThdSleepMilliseconds(500); diff --git a/testhal/STM32/USB_MSC/main.c b/testhal/STM32/USB_MSC/main.c index df5524a57..1bdda7a7d 100644 --- a/testhal/STM32/USB_MSC/main.c +++ b/testhal/STM32/USB_MSC/main.c @@ -265,6 +265,7 @@ static WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { (void)arg; + chRegSetThreadName("blinker"); while (TRUE) { palClearPad(IOPORT3, GPIOC_LED); chThdSleepMilliseconds(500); -- cgit v1.2.3