Add wrappers for target->type->examined:
- replace all checks of target->type->examined with target_was_examined(). - replace all setting of target->type->examined with target_set_examined(). - replace clearing of target->type->examined with target_reset_examined(). - add documentation in target_s to warn not to access field directly. git-svn-id: svn://svn.berlios.de/openocd/trunk@1962 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
@@ -109,6 +109,12 @@ typedef struct target_type_s
|
||||
{
|
||||
char *name;
|
||||
|
||||
/**
|
||||
* Indicates whether this target has been examined.
|
||||
*
|
||||
* Do @b not access this field directly, use target_was_examined()
|
||||
* target_set_examined(), and target_reset_examined().
|
||||
*/
|
||||
int examined;
|
||||
|
||||
/* poll current target status */
|
||||
@@ -383,6 +389,13 @@ extern target_t* get_current_target(struct command_context_s *cmd_ctx);
|
||||
extern int get_num_by_target(target_t *query_target);
|
||||
extern target_t *get_target(const char *id);
|
||||
|
||||
/// @returns @c true if the target has been examined.
|
||||
extern bool target_was_examined(struct target_s *target);
|
||||
/// Sets the @c examined flag for the given target.
|
||||
extern void target_set_examined(struct target_s *target);
|
||||
/// Reset the @c examined flag for the given target.
|
||||
extern void target_reset_examined(struct target_s *target);
|
||||
|
||||
/**
|
||||
* Run an algorithm on the @a target given.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user