kernel/data_structures/spsc_pbuf.html · kernel/data_structures/spsc_pbuf.rst 공식 원문 ↗

Zephyr 3.7.0 · Kernel · Data Structures

SPSC Packet Buffer

하나의 생산 context와 하나의 소비 context 사이에서 가변 크기 packet을 FIFO 순서로 전달합니다.

Official pathkernel/data_structures/spsc_pbuf.html
Source filekernel/data_structures/spsc_pbuf.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

작은 메모리 사용량과 성능에 초점을 둔 circular packet buffer이며 write와 read가 데이터를 복사합니다.

Order

FIFO

Packets

Variable size

Contexts

1 producer · 1 consumer

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 E3FBCABA1FD60172958B3CB957D032FFBA6CAB5DB00E6589A5A969B4D4CF67DF
.. _spsc_pbuf:

Single Producer Single Consumer Packet Buffer
=============================================

A :dfn:`Single Producer Single Consumer Packet Buffer (SPSC_PBUF)` is a circular
buffer, whose contents are stored in first-in-first-out order. Variable size
packets are stored in the buffer. Packet buffer works under assumption that there
is a single context that produces packets and a single context that consumes the
data.

Implementation is focused on performance and memory footprint.

Packets are added to the buffer using :c:func:`spsc_pbuf_write` which copies a
data into the buffer. If the buffer is full error is returned.

Packets are copied out of the buffer using :c:func:`spsc_pbuf_read`.

Part 3

한국어 전문 번역

SPSC_PBUF(Single Producer Single Consumer Packet Buffer)는 가변 크기 packet을 FIFO(first-in-first-out) 순서로 저장하는 circular buffer입니다. Packet을 생산하는 context 하나와 데이터를 소비하는 context 하나만 있다는 전제에서 동작합니다.

구현은 성능과 작은 메모리 사용량에 초점을 둡니다.

spsc_pbuf_write()는 데이터를 buffer에 복사해 packet을 추가합니다. Buffer가 가득 차 있으면 오류를 반환합니다.

spsc_pbuf_read()는 buffer에서 packet을 복사해 꺼냅니다.

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.