Am 17.03.2014 um 00:59 schrieb John Kasunich <[email protected]>:

> Implementation of the "copy dummy to signal" fix would look
> something like:
> 
> 
> 1093     /* everything is OK, make the new link */
> 1094     data_ptr_addr = SHMPTR(pin->data_ptr_addr);
> 1095     comp = SHMPTR(pin->owner_ptr);
> 1096     data_addr = comp->shmem_base + sig->data_ptr;
> 1097     *data_ptr_addr = data_addr;
> new      if (( sig->readers == 0 ) && ( sig->writers == 0 ) && ( sig->bidirs 
> == 0 )) {
> new          /* this is the first pin for this signal, copy value from pin's 
> "dummy" field */
> new          memcpy(data_addr, &pin->dummysig, sizeof(hal_data_u));
> 1098     /* update the signal's reader/writer/bidir counts */


that assumes: 'copy value on first link ever'

a more robust interpretation would be:

'copy value on link to first pin which is HAL_OUT or HAL_IO'

you could shuffle .hal lines (assuming a HAL_OUT, not HAL_IO) and still get the 
same result

not sure it's a valuable distinction, probably 'inherit value from first linked 
pin in a .hal file' is the more easily remembered semantics

- Michael



------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to