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
thd_test.c File Reference
#include "modules/sensors/thd_test.h"
#include "modules/core/threads.h"
#include "led.h"
#include "modules/datalink/telemetry.h"
#include <stdio.h>
+ Include dependency graph for thd_test.c:

Go to the source code of this file.

Functions

static void test_thd (void *)
 
void thd_test_syracuse_restart (float s)
 
void thd_test_init (void)
 
void thd_test_periodic (void)
 

Variables

float thd_test_start_value
 
pprz_bsem_t bsem
 
pprz_mutex_t mtx
 
static int syracuse = 14
 
static bool joined = true
 
pprz_thread_t thd_handle
 

Detailed Description

Author
fab fab@g.nosp@m.ithu.nosp@m.b.com A module to test threads functionnalities, like threads, mutexes, semaphores and so on.

Definition in file thd_test.c.

Function Documentation

◆ test_thd()

static void test_thd ( void arg)
static

Definition at line 109 of file thd_test.c.

References bsem, foo, mtx, pprz_bsem_wait(), pprz_mtx_lock(), pprz_mtx_unlock(), pprz_thread_exit(), and syracuse.

Referenced by thd_test_init(), and thd_test_syracuse_restart().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ thd_test_init()

void thd_test_init ( void  )

Definition at line 69 of file thd_test.c.

References bsem, foo, joined, mtx, pprz_bsem_init(), pprz_mtx_init(), PPRZ_NORMAL_PRIO, pprz_thread_create(), test_thd(), and thd_handle.

+ Here is the call graph for this function:

◆ thd_test_periodic()

void thd_test_periodic ( void  )

Definition at line 79 of file thd_test.c.

References bsem, DefaultChannel, DefaultDevice, foo, joined, msg, mtx, pprz_bsem_signal(), pprz_mtx_trylock(), pprz_mtx_unlock(), pprz_thread_tryjoin(), syracuse, and thd_handle.

+ Here is the call graph for this function:

◆ thd_test_syracuse_restart()

void thd_test_syracuse_restart ( float  s)

Definition at line 48 of file thd_test.c.

References DefaultChannel, DefaultDevice, foo, joined, mtx, pprz_mtx_trylock(), pprz_mtx_unlock(), PPRZ_NORMAL_PRIO, pprz_thread_create(), s, syracuse, test_thd(), thd_handle, and thd_test_start_value.

+ Here is the call graph for this function:

Variable Documentation

◆ bsem

◆ joined

bool joined = true
static

Definition at line 42 of file thd_test.c.

Referenced by thd_test_init(), thd_test_periodic(), and thd_test_syracuse_restart().

◆ mtx

◆ syracuse

int syracuse = 14
static

Definition at line 37 of file thd_test.c.

Referenced by test_thd(), thd_test_periodic(), and thd_test_syracuse_restart().

◆ thd_handle

pprz_thread_t thd_handle

Definition at line 46 of file thd_test.c.

Referenced by thd_test_init(), thd_test_periodic(), and thd_test_syracuse_restart().

◆ thd_test_start_value

float thd_test_start_value

Definition at line 32 of file thd_test.c.

Referenced by thd_test_syracuse_restart().