dit projekt
Data Structures | Macros | Functions | Variables
k07mutexsem.ino File Reference
#include <krnl.h>
Include dependency graph for k07mutexsem.ino:

Go to the source code of this file.

Data Structures

struct  shDataTp
 

Macros

#define STK   110
 

Functions

void saveDataInCritRegion (int v)
 
struct shDataTp getDataInCritRegion (void)
 
void t1 ()
 
void t2 ()
 
void setup ()
 
void loop ()
 

Variables

struct k_tp1
 
struct k_tp2
 
struct k_ts1
 
struct k_tsemmutex
 
struct shDataTp sharedData = {0, 0}
 
char a1 [STK]
 
char a2 [STK]
 

Macro Definition Documentation

◆ STK

#define STK   110

Definition at line 65 of file k07mutexsem.ino.

Function Documentation

◆ getDataInCritRegion()

struct shDataTp getDataInCritRegion ( void  )

Definition at line 16 of file k07mutexsem.ino.

References shDataTp::counter, k_signal(), k_wait(), semmutex, sharedData, and shDataTp::v.

Referenced by t2().

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

◆ loop()

void loop ( )

Definition at line 93 of file k07mutexsem.ino.

◆ saveDataInCritRegion()

void saveDataInCritRegion ( int  v)

Definition at line 16 of file k07mutexsem.ino.

Referenced by t1().

Here is the caller graph for this function:

◆ setup()

void setup ( )

Definition at line 68 of file k07mutexsem.ino.

References a1, a2, k_crt_sem(), k_crt_task(), k_init(), k_start(), p1, p2, s1, semmutex, STK, t1(), and t2().

Here is the call graph for this function:

◆ t1()

void t1 ( void  )

Definition at line 39 of file k07mutexsem.ino.

References k_set_sem_timer(), k_wait(), s1, saveDataInCritRegion(), and shDataTp::v.

Referenced by setup().

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

◆ t2()

void t2 ( )

Definition at line 52 of file k07mutexsem.ino.

References getDataInCritRegion(), k_sleep(), and shDataTp::v.

Referenced by setup().

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

Variable Documentation

◆ a1

char a1[STK]

Definition at line 66 of file k07mutexsem.ino.

Referenced by setup().

◆ a2

char a2[STK]

Definition at line 66 of file k07mutexsem.ino.

Referenced by setup().

◆ p1

struct k_t* p1

Definition at line 6 of file k07mutexsem.ino.

Referenced by setup().

◆ p2

struct k_t * p2

Definition at line 6 of file k07mutexsem.ino.

Referenced by setup().

◆ s1

struct k_t * s1

Definition at line 6 of file k07mutexsem.ino.

Referenced by setup(), and t1().

◆ semmutex

struct k_t * semmutex

Definition at line 6 of file k07mutexsem.ino.

Referenced by getDataInCritRegion(), and setup().

◆ sharedData

struct shDataTp sharedData = {0, 0}

Definition at line 6 of file k07mutexsem.ino.

Referenced by getDataInCritRegion().