summaryrefslogtreecommitdiffstats
path: root/libpdbg/chip.c
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2018-05-24 13:42:49 +1000
committerAlistair Popple <alistair@popple.id.au>2018-05-24 13:42:49 +1000
commit070d7cd51ed14b5c9997524305004de0fbabb7da (patch)
tree6025dad79e0918c25aba6456ef30c3d7917d98c7 /libpdbg/chip.c
parent9d8dfd7ea4a133c1c14198ba4a00df043ca1911b (diff)
downloadpdbg-070d7cd51ed14b5c9997524305004de0fbabb7da.tar.gz
pdbg-070d7cd51ed14b5c9997524305004de0fbabb7da.zip
libpdbg: Abstract thread status
There is currently no abstraction of thread status between library and application. It just passes the hardware specific values down. There is also no interface exported in the library headers to read status. This makes it difficult to implement more advanced functionality in the application as there is no way hardware agnostic way to determine if a thread is in powersave mode or not for example. Instead introduce a hardware agnostic thread state so that we can implement more advanced functionality such as automatically stopping threads if required. Signed-off-by: Alistair Popple <alistair@popple.id.au>
Diffstat (limited to 'libpdbg/chip.c')
-rw-r--r--libpdbg/chip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpdbg/chip.c b/libpdbg/chip.c
index 8925494..0e890a6 100644
--- a/libpdbg/chip.c
+++ b/libpdbg/chip.c
@@ -92,7 +92,7 @@ static uint64_t ld(uint64_t rt, uint64_t ds, uint64_t ra)
return LD_OPCODE | (rt << 21) | (ra << 16) | (ds << 2);
}
-uint64_t thread_status(struct pdbg_target *target)
+struct thread_state thread_status(struct pdbg_target *target)
{
struct thread *thread;
OpenPOWER on IntegriCloud