Is this buffer shared ?
peterz
Posts: 59
I have three objects: A,B,C
Object A is the main object, which contains the starting Spin code. Lets say it is running in COG0.
When it starts·it calls object C, which in place launches a new ASM routine in COG1.
Then object A initializes object B which in place launches a new SPIN routine in·COG2.
Threafter·COG0 and COG2 keep calling routines in object C·which communicates with ASM code running in COG1 by means of a buffer.
In object C·this buffer is declared as LONG Buffer[noparse][[/noparse]32] in the SPIN section. The buffer is passed to ASM code by means of 'par'.
Would this buffer be shared among COG0 and COG2· ?
·
Object A is the main object, which contains the starting Spin code. Lets say it is running in COG0.
When it starts·it calls object C, which in place launches a new ASM routine in COG1.
Then object A initializes object B which in place launches a new SPIN routine in·COG2.
Threafter·COG0 and COG2 keep calling routines in object C·which communicates with ASM code running in COG1 by means of a buffer.
In object C·this buffer is declared as LONG Buffer[noparse][[/noparse]32] in the SPIN section. The buffer is passed to ASM code by means of 'par'.
Would this buffer be shared among COG0 and COG2· ?
·
Comments
From A spin code I call a C Spin routine that manages the Buffer. And the same from B.
I don't manipulate directly the buffer from A or B, just call a function within C that manages the buffer.
My question is: say A calls C, and it result in Buffer[noparse][[/noparse]0] to become certain value. If then I call C from B, would Buffer[noparse][[/noparse]0] be the same value ?
VAR
LONG Buffer[noparse][[/noparse]32]
to....
DAT
Buffer LONG 0,0,0,0,0..................0