send data between 2 threads

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: send data between 2 threads

Post by Giovanni »

Probably both should use synchronous messages instead of mailboxes.

Giovanni
mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Been thanked: 1 time

Re: send data between 2 threads

Post by mabl »

The wrapper is using synchronous messages.
https://github.com/mabl/ChibiosFatFSWor ... sWrapper.c

The return code of the commands is used, and the functions it is wrapping are blocking. So this is the obvious choice..
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: send data between 2 threads

Post by Tectu »

Oh, I mixed up these names... ChibiOS/GFX does use synchronus messages as well... (mostly the return value is just not used).
Sorry for the confusion!


~ Tectu
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: send data between 2 threads

Post by Giovanni »

Ah OK, I remembered about messages but Tectu's post confused me.

Anyway, synchronous messages is the way to go for this kind of applications.

Giovanni
Post Reply