krnl 1
Loading...
Searching...
No Matches
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 [110]
char a2 [110]

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 26 of file k07mutexsem.ino.

References getDataInCritRegion(), k_signal(), k_wait(), semmutex, and sharedData.

Referenced by t2().

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

◆ loop()

void loop ( void )

Definition at line 93 of file k07mutexsem.ino.

◆ saveDataInCritRegion()

void saveDataInCritRegion ( int v)

Definition at line 16 of file k07mutexsem.ino.

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

Referenced by t1().

Here is the call graph for this function:
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.

Here is the call graph for this function:

◆ t2()

void t2 ( void )

Definition at line 52 of file k07mutexsem.ino.

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

Here is the call graph for this function:

Variable Documentation

◆ a1

char a1[110]

Definition at line 66 of file k07mutexsem.ino.

◆ a2

char a2[110]

Definition at line 66 of file k07mutexsem.ino.

◆ p1

struct k_t* p1

Definition at line 6 of file k07mutexsem.ino.

◆ p2

struct k_t * p2

Definition at line 6 of file k07mutexsem.ino.

◆ s1

struct k_t * s1

Definition at line 6 of file k07mutexsem.ino.

◆ semmutex

struct k_t * semmutex

Definition at line 6 of file k07mutexsem.ino.

◆ sharedData

struct shDataTp sharedData = {0, 0}

Definition at line 14 of file k07mutexsem.ino.