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?
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 Posts
Re: Does spe_in_mbox_write yield on SPE_MBOX_ALL_BLOCKING?2010-07-12T23:23:40ZThis is the accepted answer. This is the accepted answer.From 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.