In order to bring consistency in-tree, migrate all samples to the use
the new prefix <zephyr/...>. Note that the conversion has been scripted:
```python
from pathlib import Path
import re
EXTENSIONS = ("c", "h", "cpp", "rst")
for p in Path(".").glob("samples/**/*"):
if not p.is_file() or p.suffix and p.suffix[1:] not in EXTENSIONS:
continue
content = ""
with open(p) as f:
for line in f:
m = re.match(r"^(.*)#include <(.*)>(.*)$", line)
if (m and
not m.group(2).startswith("zephyr/") and
(Path(".") / "include" / "zephyr" / m.group(2)).exists()):
content += (
m.group(1) +
"#include <zephyr/" + m.group(2) +">" +
m.group(3) + "\n"
)
else:
content += line
with open(p, "w") as f:
f.write(content)
```
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
23 lines
512 B
C
23 lines
512 B
C
/*
|
|
* Copyright (c) 2020 BayLibre, SAS
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#ifndef THREAD_DEF_H
|
|
#define THREAD_DEF_H
|
|
|
|
#include <zephyr/kernel.h>
|
|
|
|
#define THREAD_STACKSIZE 2048
|
|
|
|
struct k_thread user_thread;
|
|
K_THREAD_STACK_DEFINE(user_stack, THREAD_STACKSIZE);
|
|
void supervisor_thread_function(void *p1, void *p2, void *p3);
|
|
|
|
struct k_thread supervisor_thread;
|
|
K_THREAD_STACK_DEFINE(supervisor_stack, THREAD_STACKSIZE);
|
|
void user_thread_function(void *p1, void *p2, void *p3);
|
|
|
|
#endif /* THREAD_DEF_H */
|