Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
threads_arch.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2025 The Paparazzi Team
3 *
4 * This file is part of paparazzi.
5 *
6 * Paparazzi is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * See LICENSE file for the full license version, or see http://www.gnu.org/licenses/
12 */
14#include "modules/core/threads_arch.h"
15#include "stdbool.h"
16
17
19 (void)mtx;
20 return 0;
21}
22
24 (void)mtx;
25 return 0;
26}
27
29 (void)mtx;
30 (void)mtx;
31 return 0;
32}
33
35 (void)mtx;
36 return 0;
37}
38
39
40
42 bsem->value = taken ? 0: 1;
43}
44
46 while (bsem->value == 0)
47 {
48 // active wait
49 asm("NOP");
50 }
51 bsem->value = 0;
52}
53
int pprz_mtx_trylock(pprz_mutex_t *mtx)
Performs a nonblocking lock on the mutex.
int pprz_mtx_unlock(pprz_mutex_t *mtx)
void pprz_bsem_init(pprz_bsem_t *bsem, bool taken)
int pprz_mtx_init(pprz_mutex_t *mtx)
int pprz_mtx_lock(pprz_mutex_t *mtx)
void pprz_bsem_signal(pprz_bsem_t *bsem)
void pprz_bsem_wait(pprz_bsem_t *bsem)
uint16_t foo
Definition main_demo5.c:58
volatile int value
pprz_bsem_t bsem
Definition thd_test.c:34
pprz_mutex_t mtx
Definition thd_test.c:36