# HG changeset patch # User lbessard # Date 1150815399 -7200 # Node ID 88812de1d7cce739a4d585e32597eaa8f63add4e # Parent 3e24a4d68325ecee15460046c2ae60d04b9283c4 Bug on receiveLoopTask termination corrected diff -r 3e24a4d68325 -r 88812de1d7cc drivers/can_peak/can_peak.c --- a/drivers/can_peak/can_peak.c Mon Jun 19 16:35:12 2006 +0200 +++ b/drivers/can_peak/can_peak.c Tue Jun 20 16:56:39 2006 +0200 @@ -62,7 +62,7 @@ UNS8 data; TPCANMsg peakMsg; if ((errno = CAN_Read(((CANPort*)fd0)->fd, & peakMsg))) { // Blocks until no new message or error. - if(errno != -EIDRM) // error is not "Can Port closed while reading" + if(errno != -EIDRM && errno != -EPERM) // error is not "Can Port closed while reading" { perror("!!! Peak board : error of reading. (from f_can_receive function) \n"); } diff -r 3e24a4d68325 -r 88812de1d7cc drivers/timers_unix/timers_unix.c --- a/drivers/timers_unix/timers_unix.c Mon Jun 19 16:35:12 2006 +0200 +++ b/drivers/timers_unix/timers_unix.c Tue Jun 20 16:56:39 2006 +0200 @@ -75,9 +75,10 @@ pthread_create(Thread, NULL, (void *)&ReceiveLoop, (void*)fd0); } -void WaitReceiveTaskEnd(TASK_HANDLE Thread) +void WaitReceiveTaskEnd(TASK_HANDLE *Thread) { - pthread_join(Thread, NULL); + pthread_kill(*Thread, SIGTERM); + pthread_join(*Thread, NULL); } #define max(a,b) a>b?a:b diff -r 3e24a4d68325 -r 88812de1d7cc drivers/timers_xeno/timers_xeno.c --- a/drivers/timers_xeno/timers_xeno.c Mon Jun 19 16:35:12 2006 +0200 +++ b/drivers/timers_xeno/timers_xeno.c Tue Jun 20 16:56:39 2006 +0200 @@ -120,9 +120,9 @@ } } -void WaitReceiveTaskEnd(TASK_HANDLE Thread) +void WaitReceiveTaskEnd(TASK_HANDLE *Thread) { - rt_task_delete(&Thread); + rt_task_delete(Thread); } //#define max(a,b) a>b?a:b diff -r 3e24a4d68325 -r 88812de1d7cc src/led.c --- a/src/led.c Mon Jun 19 16:35:12 2006 +0200 +++ b/src/led.c Tue Jun 20 16:56:39 2006 +0200 @@ -66,7 +66,7 @@ void led_set_state(CO_Data *d, int state) { -printf("led_set_state(%x)\n", state); +//printf("led_set_state(%x)\n", state); switch(state) { @@ -236,7 +236,7 @@ if (led_seq_index_green > strlen(led_sequence_table[led_sequence_green])) led_seq_index_green = 0; - led_set_redgreen(d, bits); + //led_set_redgreen(d, bits); }