target: are we running algorithm code?
[fw/openocd] / src / target / target.h
index 7400b7e1942090504bffe254c1e7e0f85a325160..562724ba6f0b46b0434d736ed5253c80a051c6eb 100644 (file)
@@ -117,6 +117,14 @@ struct target
         */
        bool examined;
 
+       /** true iff the  target is currently running a downloaded
+        *  "algorithm" instetad of arbitrary user code.  OpenOCD code
+        *  invoking algorithms is trusted to maintain correctness of
+        *  any cached state (e.g. for flash status), which arbitrary
+        *  code will have no reason to know about.
+        */
+       bool running_alg;
+
        struct target_event_action *event_action;
 
        int reset_halt;                                         /* attempt resetting the CPU into the halted mode? */