krnl 1
Loading...
Searching...
No Matches
k014semmutex.ino File Reference
#include <krnl.h>
Include dependency graph for k014semmutex.ino:

Go to the source code of this file.

Data Structures

struct  shDataTp

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}

Function Documentation

◆ getDataInCritRegion()

struct shDataTp getDataInCritRegion ( void )

Definition at line 23 of file k014semmutex.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 86 of file k014semmutex.ino.

◆ saveDataInCritRegion()

void saveDataInCritRegion ( int v)

Definition at line 15 of file k014semmutex.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 61 of file k014semmutex.ino.

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

Here is the call graph for this function:

◆ t1()

void t1 ( void )

Definition at line 34 of file k014semmutex.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 47 of file k014semmutex.ino.

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

Here is the call graph for this function:

Variable Documentation

◆ p1

struct k_t* p1

Definition at line 5 of file k014semmutex.ino.

◆ p2

struct k_t * p2

Definition at line 5 of file k014semmutex.ino.

◆ s1

struct k_t * s1

Definition at line 5 of file k014semmutex.ino.

◆ semmutex

struct k_t * semmutex

Definition at line 5 of file k014semmutex.ino.

◆ sharedData

struct shDataTp sharedData ={0,0}

Definition at line 13 of file k014semmutex.ino.