rtos: move prototype of rtos_thread_packet() in rtos.h 77/7677/2
authorAntonio Borneo <borneo.antonio@gmail.com>
Sun, 7 May 2023 12:35:51 +0000 (14:35 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Thu, 18 May 2023 10:16:32 +0000 (10:16 +0000)
The function rtos_thread_packet() is used across rtos and declared
locally as extern.

Move the prototype of the function in common include rtos.h

Change-Id: I50d311b583148a2de628de0997ef1afc9103a70e
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7677
Tested-by: jenkins
src/rtos/eCos.c
src/rtos/hwthread.c
src/rtos/rtos.c
src/rtos/rtos.h

index 963bb61cff2dec31686f5555a13f839b83962113..10ed12809f381f743d39c3de5a4c322d1a235f1d 100644 (file)
@@ -1161,9 +1161,6 @@ static bool ecos_detect_rtos(struct target *target)
        return false;
 }
 
-extern int rtos_thread_packet(struct connection *connection,
-               const char *packet, int packet_size);
-
 /* Since we should never have 0 as a valid eCos thread ID we use $Hg0 as the
  * indicator of a new session as regards flushing any cached state. */
 static int ecos_packet_hook(struct connection *connection,
index 03c4d8550397d151f7ea9e44a8fc65e13e291420..895f11cfc93348dbcfd34f753c4c876a6f7e3751 100644 (file)
@@ -32,8 +32,6 @@ static int hwthread_write_buffer(struct rtos *rtos, target_addr_t address,
 
 #define HW_THREAD_NAME_STR_SIZE (32)
 
-extern int rtos_thread_packet(struct connection *connection, const char *packet, int packet_size);
-
 static inline threadid_t threadid_from_target(const struct target *target)
 {
        return target->coreid + 1;
index 6c88de33cde065a556537e541a8ca175c7c35fb6..136d93bf6204b80986a7157eb969f1c32af16854 100644 (file)
@@ -36,8 +36,6 @@ static const struct rtos_type *rtos_types[] = {
 
 static int rtos_try_next(struct target *target);
 
-int rtos_thread_packet(struct connection *connection, const char *packet, int packet_size);
-
 int rtos_smp_init(struct target *target)
 {
        if (target->rtos->type->smp_init)
index e283dd21b2c7103dce2b2801bb129569566bced3..5ba8b269451e24bb348d52a6e1c8c175ea520029 100644 (file)
@@ -123,6 +123,7 @@ int rtos_generic_stack_read(struct target *target,
                struct rtos_reg **reg_list,
                int *num_regs);
 int gdb_thread_packet(struct connection *connection, char const *packet, int packet_size);
+int rtos_thread_packet(struct connection *connection, const char *packet, int packet_size);
 int rtos_get_gdb_reg(struct connection *connection, int reg_num);
 int rtos_get_gdb_reg_list(struct connection *connection);
 int rtos_update_threads(struct target *target);

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)