send data between 2 threads

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

Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess

User avatar
Giovanni
Site Admin
Posts: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: send data between 2 threads

Postby Giovanni » Mon Feb 04, 2013 10:31 am

Probably both should use synchronous messages instead of mailboxes.

Giovanni

mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Location: Karlsruhe, Germany
Been thanked: 1 time
Contact:

Re: send data between 2 threads

Postby mabl » Mon Feb 04, 2013 10:35 am

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: 1226
Joined: Thu May 10, 2012 9:50 am
Location: Switzerland
Contact:

Re: send data between 2 threads

Postby Tectu » Mon Feb 04, 2013 10:38 am

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: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: send data between 2 threads

Postby Giovanni » Mon Feb 04, 2013 11:22 am

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


Return to “General Support”

Who is online

Users browsing this forum: No registered users and 54 guests