Simple question actually... If I've got a thread on the PPU that calls spe_in_mbox_write(...,SPE_MBOX_ALL_BLOCKING), and the mbox of the SPU is full, does the calling thread yield or just spin?
If it does not yield, how bad would it be to do the following
while ( !spe_in_mbox_status( myspe ) )
spe_in_mbox_write( myspe , ... , SPE_MBOX_ALL_BLOCKING );
Is there, perhaps, a more elegant solution?
This topic has been locked.
1 reply Latest Post - 2010-07-12T23:23:40Z by jadamcze
Pinned topic Does spe_in_mbox_write yield on SPE_MBOX_ALL_BLOCKING?
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2010-07-12T23:23:40Z at 2010-07-12T23:23:40Z by jadamcze
jadamcze 060000NGAR219 PostsACCEPTED ANSWER
Re: Does spe_in_mbox_write yield on SPE_MBOX_ALL_BLOCKING?2010-07-12T23:23:40Z in response to PedroGonnetFrom the source of the function (libspe2/spebase/mbox.c) it appears that the blocking modes use the poll() system call to wait until writing to the relevant spufs file will not block. There is no need to manually loop in the way you've suggested.