jtag: linuxgpiod: drop extra parenthesis
[openocd.git] / contrib / rtos-helpers / uCOS-III-openocd.c
1 // SPDX-License-Identifier: Apache-2.0
2
3 /*
4 * The original version of this file did not reported any license nor
5 * copyright, but the author clearly stated that:
6 * "This file should be linked along with the [uC/OS-III user's] project
7 * to enable RTOS support for uC/OS-III."
8 * Such statement implies the willing to have this file's license compatible
9 * with the license Apache 2.0 of uC/OS-III.
10 */
11
12 /*
13 * uC/OS-III does not provide a fixed layout for OS_TCB, which makes it
14 * impossible to determine the appropriate offsets within the structure
15 * unaided. A priori knowledge of offsets based on os_dbg.c is tied to a
16 * specific release and thusly, brittle. The constants defined below
17 * provide the necessary information OpenOCD needs to provide support in
18 * the most robust manner possible.
19 *
20 * This file should be linked along with the project to enable RTOS
21 * support for uC/OS-III.
22 */
23
24 #include <os.h>
25
26 #if OS_CFG_DBG_EN == 0
27 #error "OS_CFG_DBG_EN is required to enable RTOS support for OpenOCD"
28 #endif
29
30 #define OFFSET_OF(type, member) ((CPU_SIZE_T)&(((type *)0)->member))
31
32 #ifdef __GNUC__
33 #define USED __attribute__((used))
34 #else
35 #define USED
36 #endif
37
38 const CPU_SIZE_T USED openocd_OS_TCB_StkPtr_offset = OFFSET_OF(OS_TCB, StkPtr);
39 const CPU_SIZE_T USED openocd_OS_TCB_NamePtr_offset = OFFSET_OF(OS_TCB, NamePtr);
40 const CPU_SIZE_T USED openocd_OS_TCB_TaskState_offset = OFFSET_OF(OS_TCB, TaskState);
41 const CPU_SIZE_T USED openocd_OS_TCB_Prio_offset = OFFSET_OF(OS_TCB, Prio);
42 const CPU_SIZE_T USED openocd_OS_TCB_DbgPrevPtr_offset = OFFSET_OF(OS_TCB, DbgPrevPtr);
43 const CPU_SIZE_T USED openocd_OS_TCB_DbgNextPtr_offset = OFFSET_OF(OS_TCB, DbgNextPtr);

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)