X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Ftarget%2Fregister.c;h=1d63e12f70bd83b719171e0160e8d25d80eedae0;hb=6738e447c5c010c4b3451e3714df86e9ab653e1f;hp=42b3b8b64e2fa7e2dcba049f025ba8e8907b0731;hpb=08d4411b59dd8bd0e7d8009003b71d23acbf6eee;p=openocd.git diff --git a/src/target/register.c b/src/target/register.c index 42b3b8b64e..1d63e12f70 100644 --- a/src/target/register.c +++ b/src/target/register.c @@ -16,9 +16,7 @@ * GNU General Public License for more details. * * * * 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., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * along with this program. If not, see . * ***************************************************************************/ #ifdef HAVE_CONFIG_H @@ -72,6 +70,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) {