Hi, I was digging throw the code and I seems that you are rigth (Peter). It seems that the buffer should be release even if the endPacket argument is fail or error. The case of receiveTaskPending == TRUE isnt really a problem I think because the only situation this can happens is if another async event endPacket cames before you process the pending receive task; in which the receive state will be well defined.
-Bill On Wed, Aug 19, 2009 at 2:04 PM, Michael Schippling <[email protected]>wrote: > Sorry, I'm lost...where is a "current buffer" and how is it {un}locked? > MS > > [email protected] wrote: > > Hi There > > > > In my stressing test, I also found another problem, which is the event > > ReceiveBytePacket.endPacket(error_t result) in SerialDispatcherP.nc > component > > > > async event void ReceiveBytePacket.endPacket(error_t result) { > > uint8_t postsignalreceive = FALSE; > > atomic { > > if (!receiveTaskPending && result == SUCCESS) { > > /***** I evict the concrete code here *****/ > > } > > } > > if (postsignalreceive){ > > post receiveTask(); > > } > > } > > > > Generally, this event is signaled once the transmission of byte stream > > on the receive > > path is finished. If the condition flags within the atomic section are > > fulfilled, then > > everything is fine... > > > > However, if these flags can't be met, based on current design, there > > is no further > > handling. Note that the current buffer is still locked, and there is > > no buffer swapping > > either. In other words, if new byte stream comes in, then it will > > still try to enter this > > locked buffer, resulting in the deadlock. > > > > Is my analysis correct? Thanks a lot for your clarification! > > > > Regards > > > > Peng > > > > ---------------------------------------------------------------- > > This message was sent using IMP, the Internet Messaging Program. > > > > _______________________________________________ > > Tinyos-help mailing list > > [email protected] > > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- Ing. Guillermo De Cesco Invenio Ingenieria srl. tel: (54)2944 442119 web: www.invenioing.com Av. Pioneros 4163 Dpto 6. CP(R8402AMH) San Carlos de Bariloche. Rio Negro, Argentina.
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
