Motr  M0
sim_chan Struct Reference

#include <sim.h>

Collaboration diagram for sim_chan:
Collaboration graph

Data Fields

struct m0_tl ch_threads
 
struct cnt ch_cnt_sleep
 

Detailed Description

Synchronization channel.

A channel is conceptually similar to a POSIX condition variable, except that it is simpler due to single-threaded nature of simulation.

A thread can sleep (wait) on a channel by calling sim_chan_wait(). Threads waiting on a channel are woken up one by one by calls to sim_chan_signal() or all together by a call to sim_chan_broadcast().

Definition at line 237 of file sim.h.

Field Documentation

◆ ch_cnt_sleep

struct cnt ch_cnt_sleep

statistical counter measuring for how long threads are sleeping on this channel

Definition at line 243 of file sim.h.

◆ ch_threads

struct m0_tl ch_threads

list of threads waiting on a channel

Definition at line 239 of file sim.h.


The documentation for this struct was generated from the following file: