@@ -135,7 +135,7 @@ static inline int cib_get(cib_t *__restrict cib)
135
135
* @return index of item
136
136
* @retval -1 if no item at @p offset exists in the buffer
137
137
*/
138
- static inline int cib_peek_at_unsafe (cib_t * __restrict cib , unsigned offset )
138
+ static inline int cib_peek_at_unsafe (const cib_t * __restrict cib , unsigned offset )
139
139
{
140
140
return (cib -> read_count + offset ) & cib -> mask ;
141
141
}
@@ -153,7 +153,7 @@ static inline int cib_peek_at_unsafe(cib_t *__restrict cib, unsigned offset)
153
153
* @return index of item
154
154
* @retval -1 if no item at @p offset exists in the buffer
155
155
*/
156
- static inline int cib_peek_at (cib_t * __restrict cib , unsigned offset )
156
+ static inline int cib_peek_at (const cib_t * __restrict cib , unsigned offset )
157
157
{
158
158
if (offset < cib_avail (cib )) {
159
159
return cib_peek_at_unsafe (cib , offset );
@@ -172,7 +172,7 @@ static inline int cib_peek_at(cib_t *__restrict cib, unsigned offset)
172
172
* @return index of next item
173
173
* @retval -1 if the buffer is empty
174
174
*/
175
- static inline int cib_peek_unsafe (cib_t * __restrict cib )
175
+ static inline int cib_peek_unsafe (const cib_t * __restrict cib )
176
176
{
177
177
return cib_peek_at_unsafe (cib , 0 );
178
178
}
@@ -185,7 +185,7 @@ static inline int cib_peek_unsafe(cib_t *__restrict cib)
185
185
* @return index of next item
186
186
* @retval -1 if the buffer is empty
187
187
*/
188
- static inline int cib_peek (cib_t * __restrict cib )
188
+ static inline int cib_peek (const cib_t * __restrict cib )
189
189
{
190
190
return cib_peek_at (cib , 0 );
191
191
}
0 commit comments