diff mbox series

[3/8] libpdbg: Add state() method to thread

Message ID 20201009040001.310868-4-amitay@ozlabs.org
State Accepted
Headers show
Series Fix thread status for sbefifo thread driver | expand

Commit Message

Amitay Isaacs Oct. 9, 2020, 3:59 a.m. UTC
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
---
 libpdbg/hwunit.h | 1 +
 libpdbg/p8chip.c | 1 +
 libpdbg/p9chip.c | 1 +
 3 files changed, 3 insertions(+)

Comments

Joel Stanley Oct. 9, 2020, 12:46 p.m. UTC | #1
On Fri, 9 Oct 2020 at 04:00, Amitay Isaacs <amitay@ozlabs.org> wrote:
>
> Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>

Reviewed-by: Joel Stanley <joel@jms.id.au>


> ---
>  libpdbg/hwunit.h | 1 +
>  libpdbg/p8chip.c | 1 +
>  libpdbg/p9chip.c | 1 +
>  3 files changed, 3 insertions(+)
>
> diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h
> index ee825bb..c7d8edf 100644
> --- a/libpdbg/hwunit.h
> +++ b/libpdbg/hwunit.h
> @@ -126,6 +126,7 @@ struct thread {
>         struct pdbg_target target;
>         struct thread_state status;
>         int id;
> +       struct thread_state (*state)(struct thread *);
>         int (*step)(struct thread *, int);
>         int (*start)(struct thread *);
>         int (*stop)(struct thread *);
> diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c
> index d7664b8..6349a38 100644
> --- a/libpdbg/p8chip.c
> +++ b/libpdbg/p8chip.c
> @@ -649,6 +649,7 @@ static struct thread p8_thread = {
>                 .probe = p8_thread_probe,
>                 .release = p8_thread_release,
>         },
> +       .state = p8_thread_state,
>         .step = p8_thread_step,
>         .start = p8_thread_start,
>         .stop = p8_thread_stop,
> diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c
> index db6efd5..e72a16a 100644
> --- a/libpdbg/p9chip.c
> +++ b/libpdbg/p9chip.c
> @@ -428,6 +428,7 @@ static struct thread p9_thread = {
>                 .probe = p9_thread_probe,
>                 .release = p9_thread_release,
>         },
> +       .state = p9_thread_state,
>         .start = p9_thread_start,
>         .stop = p9_thread_stop,
>         .step = p9_thread_step,
> --
> 2.26.2
>
> --
> Pdbg mailing list
> Pdbg@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/pdbg
diff mbox series

Patch

diff --git a/libpdbg/hwunit.h b/libpdbg/hwunit.h
index ee825bb..c7d8edf 100644
--- a/libpdbg/hwunit.h
+++ b/libpdbg/hwunit.h
@@ -126,6 +126,7 @@  struct thread {
 	struct pdbg_target target;
 	struct thread_state status;
 	int id;
+	struct thread_state (*state)(struct thread *);
 	int (*step)(struct thread *, int);
 	int (*start)(struct thread *);
 	int (*stop)(struct thread *);
diff --git a/libpdbg/p8chip.c b/libpdbg/p8chip.c
index d7664b8..6349a38 100644
--- a/libpdbg/p8chip.c
+++ b/libpdbg/p8chip.c
@@ -649,6 +649,7 @@  static struct thread p8_thread = {
 		.probe = p8_thread_probe,
 		.release = p8_thread_release,
 	},
+	.state = p8_thread_state,
 	.step = p8_thread_step,
 	.start = p8_thread_start,
 	.stop = p8_thread_stop,
diff --git a/libpdbg/p9chip.c b/libpdbg/p9chip.c
index db6efd5..e72a16a 100644
--- a/libpdbg/p9chip.c
+++ b/libpdbg/p9chip.c
@@ -428,6 +428,7 @@  static struct thread p9_thread = {
 		.probe = p9_thread_probe,
 		.release = p9_thread_release,
 	},
+	.state = p9_thread_state,
 	.start = p9_thread_start,
 	.stop = p9_thread_stop,
 	.step = p9_thread_step,