krnl
|
#include <krnl.h>
Go to the source code of this file.
Data Structures | |
struct | shDataTp |
Macros | |
#define | STK 150 |
Functions | |
void | saveDataInCritRegion (int v) |
int | saveDataInCritRegionNoWait (int v) |
struct shDataTp | getDataInCritRegion (void) |
void | t1 () |
void | t2 () |
void | setup () |
void | loop () |
Variables | |
struct k_t * | p1 |
struct k_t * | p2 |
struct k_t * | s1 |
struct k_t * | semmutex |
struct shDataTp | sharedData = {0, 0} |
volatile int | noDataDelivered = 0 |
char | a1 [STK] |
char | a2 [STK] |
#define STK 150 |
Definition at line 100 of file k07mutexsem-adv.ino.
struct shDataTp getDataInCritRegion | ( | void | ) |
Definition at line 45 of file k07mutexsem-adv.ino.
References shDataTp::counter, k_eat_msec(), k_signal(), k_wait(), semmutex, and sharedData.
Referenced by t2().
void loop | ( | ) |
Definition at line 130 of file k07mutexsem-adv.ino.
void saveDataInCritRegion | ( | int | v | ) |
Definition at line 18 of file k07mutexsem-adv.ino.
References shDataTp::counter, k_signal(), k_wait(), semmutex, sharedData, and shDataTp::v.
int saveDataInCritRegionNoWait | ( | int | v | ) |
Definition at line 29 of file k07mutexsem-adv.ino.
References shDataTp::counter, k_signal(), k_wait(), semmutex, sharedData, shDataTp::v, and x.
Referenced by t1().
void setup | ( | ) |
Definition at line 103 of file k07mutexsem-adv.ino.
References a1, a2, k_crt_sem(), k_crt_task(), k_init(), k_start(), p1, p2, s1, semmutex, STK, t1(), and t2().
void t1 | ( | ) |
Definition at line 61 of file k07mutexsem-adv.ino.
References k_set_sem_timer(), k_wait(), noDataDelivered, s1, saveDataInCritRegionNoWait(), and shDataTp::v.
Referenced by setup().
void t2 | ( | ) |
Definition at line 80 of file k07mutexsem-adv.ino.
References getDataInCritRegion(), k_sleep(), noDataDelivered, and shDataTp::v.
Referenced by setup().
char a1[STK] |
Definition at line 101 of file k07mutexsem-adv.ino.
Referenced by setup().
char a2[STK] |
Definition at line 101 of file k07mutexsem-adv.ino.
Referenced by setup().
volatile int noDataDelivered = 0 |
Definition at line 15 of file k07mutexsem-adv.ino.
struct k_t* p1 |
Definition at line 5 of file k07mutexsem-adv.ino.
Referenced by setup().
struct k_t * p2 |
Definition at line 5 of file k07mutexsem-adv.ino.
Referenced by setup().
struct k_t * s1 |
Definition at line 5 of file k07mutexsem-adv.ino.
struct k_t * semmutex |
Definition at line 5 of file k07mutexsem-adv.ino.
Referenced by getDataInCritRegion(), saveDataInCritRegion(), saveDataInCritRegionNoWait(), and setup().
struct shDataTp sharedData = {0, 0} |
Definition at line 13 of file k07mutexsem-adv.ino.
Referenced by getDataInCritRegion(), saveDataInCritRegion(), and saveDataInCritRegionNoWait().