[En-Nut-Discussion] Problem in multi thread

Ole Reinhardt ole.reinhardt at embedded-it.de
Tue Aug 23 14:31:27 CEST 2011


Hello,

>          I am using two threads in my program. In both the threads accesing
> same port. due to this program crash. how to avoid thiz.

Could you please explain a little more in detail what your program shall
do and how you have implemented it? What do you mean with "crash"? A
Real lock up / exception? Or does the output on the port (UART?) is
corrupted?

Futher informations would be needed:

- Which board?
- Which Nut/OS version?
- Which port?

Perhaps you could post your code or part of it here?

As a first assumption you might have a stack or buffer overflow here.
These are the most common reasons for Nut/OS crashes.

If you just get corrupted (mixed) output on your port you can avoid this
by using a mutex.

Best regards,

Ole Reinhardt

-- 

Thermotemp GmbH, Embedded-IT

Embedded Hard-/ Software and Open Source Development, 
Integration and Consulting

http://www.embedded-it.de

Geschäftsstelle Siegen - Steinstraße 67 - D-57072 Siegen - 
tel +49 (0)271 5513597, +49 (0)271-73681 - fax +49 (0)271 736 97

Hauptsitz - Hademarscher Weg 7 - 13503 Berlin
Tel +49 (0)30 4315205 - Fax +49 (0)30 43665002
Geschäftsführer: Jörg Friedrichs, Ole Reinhardt
Handelsregister Berlin Charlottenburg HRB 45978 UstID DE 156329280 




More information about the En-Nut-Discussion mailing list