Document of c-modernization-kit (porter) 1.0.0

Loading...
Searching...
No Matches
Data Fields
PotrSendQueue Struct Reference

非同期送信キュー。 More...

`#include <potrSendQueue.h>`

Collaboration diagram for PotrSendQueue:

## Data Fields
PotrPayloadElem * | entries
| ペイロードエレメントバッファ (動的確保。depth 要素)。
uint8_t * | payload_pool
| ペイロードプール (動的確保。depth × max_payload バイト)。
size_t | depth
| キュー容量 (エントリ数)。
size_t | head
| 読み出し位置 (送信スレッドが使用)。
size_t | tail
| 書き込み位置 (potrSend 呼び出し元が使用)。
size_t | count
| キュー内エントリ数。
size_t | inflight
| sendto 実行中エントリ数。
PotrMutex | mutex
| 排他制御。
PotrCondVar | not_empty
| count > 0 になったことを通知する条件変数。
PotrCondVar | not_full
| count + inflight < depth になったことを通知する条件変数。
PotrCondVar | drained
| count == 0 && inflight == 0 を通知する条件変数。

## Detailed Description

非同期送信キュー。

リングバッファとミューテックス・条件変数により、 potrSend 呼び出し元スレッドと送信スレッドの間でスレッドセーフに ペイロードエレメント (メッセージのフラグメント) を受け渡します。

- count: キュー内エントリ数
- inflight: 送信スレッドが sendto 実行中のエントリ数
- count + inflight <= depth が常に保証される (ペイロードプールスロット衝突を防止)
- not_full 条件変数: count + inflight < depth になったことを通知 (push_wait が待機)
- drained 条件変数: count == 0 かつ inflight == 0 を通知 (ブロッキング送信が待機)

Definition at line 71 of file potrSendQueue.h.

## Field Documentation

## ◆ entries

PotrPayloadElem* PotrSendQueue::entries

ペイロードエレメントバッファ (動的確保。depth 要素)。

Definition at line 73 of file potrSendQueue.h.

Referenced by potr_send_queue_destroy(), potr_send_queue_init(), potr_send_queue_peek(), potr_send_queue_peek_timed(), potr_send_queue_pop(), potr_send_queue_push(), potr_send_queue_push_wait(), and potr_send_queue_try_pop().

## ◆ payload_pool

uint8_t* PotrSendQueue::payload_pool

ペイロードプール (動的確保。depth × max_payload バイト)。

Definition at line 74 of file potrSendQueue.h.

Referenced by potr_send_queue_destroy(), and potr_send_queue_init().

## ◆ depth

size_t PotrSendQueue::depth

キュー容量 (エントリ数)。

Definition at line 75 of file potrSendQueue.h.

Referenced by potr_send_queue_init(), potr_send_queue_pop(), potr_send_queue_push(), potr_send_queue_push_wait(), potr_send_queue_try_pop(), and reset_send_queue().

## ◆ head

size_t PotrSendQueue::head

読み出し位置 (送信スレッドが使用)。

Definition at line 76 of file potrSendQueue.h.

Referenced by potr_send_queue_peek(), potr_send_queue_peek_timed(), potr_send_queue_pop(), and potr_send_queue_try_pop().

## ◆ tail

size_t PotrSendQueue::tail

書き込み位置 (potrSend 呼び出し元が使用)。

Definition at line 77 of file potrSendQueue.h.

Referenced by potr_send_queue_push(), and potr_send_queue_push_wait().

## ◆ count

size_t PotrSendQueue::count

キュー内エントリ数。

Definition at line 78 of file potrSendQueue.h.

Referenced by potr_send_queue_complete(), potr_send_queue_peek(), potr_send_queue_peek_timed(), potr_send_queue_pop(), potr_send_queue_push(), potr_send_queue_push_wait(), potr_send_queue_try_pop(), and potr_send_queue_wait_drained().

## ◆ inflight

size_t PotrSendQueue::inflight

sendto 実行中エントリ数。

Definition at line 79 of file potrSendQueue.h.

Referenced by potr_send_queue_complete(), potr_send_queue_pop(), potr_send_queue_push(), potr_send_queue_push_wait(), potr_send_queue_try_pop(), and potr_send_queue_wait_drained().

## ◆ mutex

PotrMutex PotrSendQueue::mutex

排他制御。

Definition at line 80 of file potrSendQueue.h.

Referenced by potr_send_queue_complete(), potr_send_queue_destroy(), potr_send_queue_init(), potr_send_queue_peek(), potr_send_queue_peek_timed(), potr_send_queue_pop(), potr_send_queue_push(), potr_send_queue_push_wait(), potr_send_queue_shutdown(), potr_send_queue_try_pop(), and potr_send_queue_wait_drained().

## ◆ not_empty

PotrCondVar PotrSendQueue::not_empty

count > 0 になったことを通知する条件変数。

Definition at line 81 of file potrSendQueue.h.

Referenced by potr_send_queue_destroy(), potr_send_queue_init(), potr_send_queue_peek_timed(), potr_send_queue_pop(), potr_send_queue_push(), potr_send_queue_push_wait(), and potr_send_queue_shutdown().

## ◆ not_full

PotrCondVar PotrSendQueue::not_full

count + inflight < depth になったことを通知する条件変数。

Definition at line 82 of file potrSendQueue.h.

Referenced by potr_send_queue_complete(), potr_send_queue_destroy(), potr_send_queue_init(), potr_send_queue_push_wait(), and potr_send_queue_shutdown().

## ◆ drained

PotrCondVar PotrSendQueue::drained

count == 0 && inflight == 0 を通知する条件変数。

Definition at line 83 of file potrSendQueue.h.

Referenced by potr_send_queue_complete(), potr_send_queue_destroy(), potr_send_queue_init(), and potr_send_queue_wait_drained().

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

- porter/libsrc/porter/infra/potrSendQueue.h