[CCC DEV] Polling
Mathias Spiessens
mathias.spiessens at student.kuleuven.be
Thu Jul 19 14:46:47 BST 2012
Hi all,
I'm struggling with cleaning up some occam code.
I've written a process that will poll for newly arrived messages and put
these messages on a channel:
PROC sccMesh.recv(CHAN SCCMSG out!)
INT coreID, string.length, success:
[64]BYTE buffer:
WHILE TRUE
SEQ
coreID := 0
c.sccMesh.recv(coreID, string.length, buffer, success) -- wrapper
process around FFI function
IF
success > 0
out ! coreID; string.length::buffer
TRUE -- nasty
out ! coreID; 0::"" -- nasty
:
This is not entirely nice. I do not want to send "empty" messages (see
last lines of the code snippet).
However, leaving out those lines breaks the entire application running
on the TVM (TVM exit code = 0x2912ba4). Is there a nice way to solve this?
If additional information is needed, feel free to ask.
Best regards,
Mathias Spiessens
More information about the developers
mailing list