Hi,
In the process of porting my project to ChibiOS 2.2.0, it looks like the sdGetWouldBlock and sdPutWouldBlock macro's haven't been updated to the new names for chIQIsEmptyI and chOQIsFullI.
Since they are now I-class APIs, does that mean I should wrap my sdGet/PutWouldBlock calls in lock zones? If so, then perhaps the sd macros should be renamed also.
I think Ian had reported this already, but I noticed they haven't been changed yet in trunk, so thought I'd post in a separate thread.
Thanks!
sdGetWouldBlock and sdPutWouldBlock invalid
Moderators: RoccoMarco, lbednarz, tfAteba
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: sdGetWouldBlock and sdPutWouldBlock invalid
Thanks for reporting, I must have forgot this.
Anyway, probably those wouldblock functions probably should be deprecated because it is not possible to atomically check for the channel status and then read/write, there are no I-class get/put/read/write.
I think the best way to check the channel status is to use get/put with timeout specification TIME_IMMEDIATE, that makes the test+I/O atomic.
Giovanni
Anyway, probably those wouldblock functions probably should be deprecated because it is not possible to atomically check for the channel status and then read/write, there are no I-class get/put/read/write.
I think the best way to check the channel status is to use get/put with timeout specification TIME_IMMEDIATE, that makes the test+I/O atomic.
Giovanni