[En-Nut-Discussion] Should drivers yield explicit?

Ole Reinhardt ole.reinhardt at embedded-it.de
Mon Jul 16 11:29:07 CEST 2012

Hi Uwe,

> in my CANBUS driver for the STM32, the normal case is that the message gets
> loaded to the fifo and the function return immediate. In that case, there is
> no scheduling point and the calling thread keeps control. 
> Should a NutSleep(O) or NutThreadYield() get inserted in that case?

I don't see any reason why? But you should implement the case where the
FIFO is full and your calling thread has to wait until there is a free
buffer available again.

Anyway I would vote to mark functions with possible scheduling point in
the documentation but don't have a good idea yet how this could be done
in an intelligent way...

Best regards,



Thermotemp GmbH, Embedded-IT

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


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