X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Ftarget%2Fregister.c;h=1c1717c8ff3b39342c12f5ba3e1f7f82546371eb;hb=1eb19b8de5bf2f6699766f2178d1ef04ce4579a6;hp=65dc24f07ede8dfaabdfcdd48b37ff5a8578497c;hpb=374127301ec1d72033b9d573b72c7abdfd61990d;p=openocd.git diff --git a/src/target/register.c b/src/target/register.c index 65dc24f07e..1c1717c8ff 100644 --- a/src/target/register.c +++ b/src/target/register.c @@ -18,14 +18,13 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include #include "register.h" #include @@ -73,6 +72,14 @@ struct reg_cache **register_get_last_cache_p(struct reg_cache **first) return cache_p; } +void register_unlink_cache(struct reg_cache **cache_p, const struct reg_cache *cache) +{ + while (*cache_p && *cache_p != cache) + cache_p = &((*cache_p)->next); + if (*cache_p) + *cache_p = cache->next; +} + /** Marks the contents of the register cache as invalid (and clean). */ void register_cache_invalidate(struct reg_cache *cache) {