[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openocd-development
Subject:    [OpenOCD-devel] Should we make all target_write_xxx() return void?
From:       Øyvind_Harboe <oyvind.harboe () zylin ! com>
Date:       2012-04-25 10:56:08
Message-ID: CACELUGevacJAsCRCueAxmTq6QPasSDQEw6=U7xPzd8+8oiWUXg () mail ! gmail ! com
[Download RAW message or body]

Should we return void for target_write_xxx()?

Basically the next jtag_execute_queue() (either invoked directly or
through a synchronous ready operation that invokes it indirectly) will
propagate any error.

This would clean out a lot of unnecessary and noisy error handling
throughout the code.

We're using jtag_execute_queue() to place propagation of errors in a
single spot. In lieu of having real C++ exceptions, I think this is
pretty clean.

Here be dragons! I realize that I haven't checked if
target_write_xxx() follow the queuing paradigm today and we may have
to insert some explicitly jtag_execute_queue() if some versions of
target_write_xxx()   are in fact synchronous.

--
Øyvind Harboe - Can Zylin Consulting help on your project?
US toll free 1-866-980-3434
http://www.zylin.com/

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic