summaryrefslogtreecommitdiff
path: root/components/libc/posix/ipc/Kconfig
blob: c295ad7143c3f5dd7d512c3f30717bb0fbc96832 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
menu "Interprocess Communication (IPC)"

config RT_USING_POSIX_PIPE
    bool "Enable pipe and FIFO"
    select RT_USING_POSIX_FS
    select RT_USING_POSIX_DEVIO
    select RT_USING_POSIX_POLL
    select RT_USING_RESOURCE_ID
    default n
    help
        Enable POSIX pipes and FIFOs for inter-process communication.
        
        Provides:
        - Anonymous pipes: pipe(pipefd)
        - Named pipes (FIFOs): mkfifo(path, mode)
        - Unidirectional byte streams
        - Blocking and non-blocking I/O
        
        Features:
        - Simple producer-consumer pattern
        - Works with select/poll for multiplexing
        - File descriptor based (can use read/write)
        
        Use cases:
        - Parent-child process communication
        - Shell command pipelines
        - Simple message passing
        - Event notification
        
        Buffer size: RT_USING_POSIX_PIPE_SIZE
        
        Enable for POSIX pipe/FIFO support.
        Essential for shell pipeline and process IPC.

config RT_USING_POSIX_PIPE_SIZE
    int "Set pipe buffer size"
    depends on RT_USING_POSIX_PIPE
    default 512
    help
        Size of pipe buffer in bytes.
        
        Default: 512 bytes
        
        Trade-offs:
        Larger buffer:
        + More data can be buffered
        + Better performance for burst writes
        - More memory per pipe
        
        Smaller buffer:
        + Less memory usage
        - More frequent blocking on writes
        
        Typical values: 512-4096 bytes
        Adjust based on typical message sizes and memory constraints.

# We have't implement of 'systemv ipc', so hide it firstly.
#
# config RT_USING_POSIX_IPC_SYSTEM_V
#     bool "Enable System V IPC"
#     default n
#     help
#         System V supplies an alternative form of interprocess communication consisting of thress
#         features: shared memory, message, and semaphores.

config RT_USING_POSIX_MESSAGE_QUEUE
    bool "Enable posix message queue <mqueue.h>"
    select RT_USING_POSIX_CLOCK
    select RT_USING_MESSAGEQUEUE_PRIORITY
    select RT_USING_DFS_MQUEUE
    default n
    help
        Enable POSIX message queues for IPC.
        
        Provides POSIX message queue APIs:
        - mq_open(): Open/create message queue
        - mq_send()/mq_receive(): Send/receive messages
        - mq_timedsend()/mq_timedreceive(): With timeout
        - mq_notify(): Async notification
        - mq_getattr()/mq_setattr(): Queue attributes
        
        Features:
        - Priority-based message delivery
        - Named queues (visible in /dev/mqueue)
        - Blocking and non-blocking modes
        - Timeout support
        - Asynchronous notification
        
        vs. Pipes:
        + Message boundaries preserved
        + Priority-based delivery
        + Can be used with select/poll
        - More overhead per message
        
        Use cases:
        - Process communication with priorities
        - Event notification systems
        - Service request queues
        - RT-Smart IPC
        
        Requires DFS with MQUEUE support.
        Enable for POSIX message queue IPC.

config RT_USING_POSIX_MESSAGE_SEMAPHORE
    bool "Enable posix semaphore <semaphore.h>"
    select RT_USING_POSIX_CLOCK
    default n
    help
        Enable POSIX named and unnamed semaphores.
        
        Provides semaphore APIs:
        - sem_init()/sem_destroy(): Unnamed semaphores
        - sem_open()/sem_close()/sem_unlink(): Named semaphores
        - sem_wait()/sem_trywait()/sem_timedwait(): Acquire
        - sem_post(): Release
        - sem_getvalue(): Get current value
        
        Types:
        - Unnamed (memory-based): For thread synchronization
        - Named (file-based): For process synchronization
        
        Features:
        - Counting semaphore (value > 1)
        - Binary semaphore (value = 0 or 1)
        - Timeout support
        - Non-blocking try operation
        
        Use cases:
        - Thread/process synchronization
        - Resource counting
        - Producer-consumer patterns
        - Mutual exclusion
        
        vs. Mutex:
        + Can be used for signaling (sem_post from any thread)
        + Counting capability
        - No ownership tracking
        
        Enable for POSIX semaphore support.
        Essential for POSIX synchronization.

comment "Socket is in the 'Network' category"

endmenu