#include <zpp.hpp>
#include <chrono>
Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 26 of file main.cpp.
32 using namespace std::chrono;
52 const char* string_arg =
"Hello World from thread tid={}\n";
55 my_thread_tcb, my_thread_tstack(), my_thread_attr, &my_heap,
56 [&print_lock](
const char* t) noexcept
94 print(
"Hello World from main tid={}\n",
lock_guard using zpp::mutex as a lock.
Thread creation attributes.
static constexpr thread_prio preempt(int prio) noexcept
Create a preemptive priority value.
The class thread repecents a single Zephyr thread.
auto get_id() noexcept
Get the thread ID of the current thread.
auto sleep_for(const std::chrono::duration< T_Rep, T_Period > &sleep_duration)
Suspend the current thread for a specified time duration.
void print(const char *fmt, T_Args &&... args) noexcept
simple typesafe print function
References zpp::this_thread::get_id(), zpp::no, zpp::thread_prio::preempt(), zpp::print(), and zpp::this_thread::sleep_for().