Lines Matching refs:offset
200 static int to_msg(char *msg, unsigned offset, unsigned limit,
203 offset = align_to<LEN>(offset);
204 if (L4_UNLIKELY(!check_size<LEN>(offset, limit)))
206 *reinterpret_cast<LEN *>(msg + offset) = a.length;
207 offset = align_to<A>(offset + sizeof(LEN));
208 if (L4_UNLIKELY(!check_size<A>(offset, limit, a.length)))
211 elem_type *data = reinterpret_cast<elem_type*>(msg + offset);
218 return offset + a.length * sizeof(A);
238 static int to_svr(char *msg, unsigned offset, unsigned limit,
241 offset = align_to<LEN>(offset);
242 if (L4_UNLIKELY(!check_size<LEN>(offset, limit)))
244 a.length = *reinterpret_cast<LEN *>(msg + offset);
245 offset = align_to<A>(offset + sizeof(LEN));
246 if (L4_UNLIKELY(!check_size<A>(offset, limit, a.length)))
248 a.data = reinterpret_cast<A*>(msg + offset);
249 return offset + a.length * sizeof(A);
262 static int from_msg(char *msg, unsigned offset, unsigned limit, long,
265 offset = align_to<LEN>(offset);
266 if (L4_UNLIKELY(!check_size<LEN>(offset, limit)))
269 LEN l = *reinterpret_cast<LEN *>(msg + offset);
271 offset = align_to<A>(offset + sizeof(LEN));
272 if (L4_UNLIKELY(!check_size<A>(offset, limit, l)))
275 A *data = reinterpret_cast<A*>(msg + offset);
285 return offset + l * sizeof(A);
296 static int from_msg(char *msg, unsigned offset, unsigned limit, long,
299 offset = align_to<LEN>(offset);
300 if (L4_UNLIKELY(!check_size<LEN>(offset, limit)))
303 LEN l = *reinterpret_cast<LEN *>(msg + offset);
305 offset = align_to<A>(offset + sizeof(LEN));
306 if (L4_UNLIKELY(!check_size<A>(offset, limit, l)))
309 a.data = reinterpret_cast<A*>(msg + offset);
311 return offset + l * sizeof(A);
323 static int to_svr(char *msg, unsigned offset, unsigned limit,
326 offset = align_to<LEN>(offset);
327 if (L4_UNLIKELY(!check_size<LEN>(offset, limit)))
330 offset = align_to<A>(offset + sizeof(LEN));
331 a.data = reinterpret_cast<elem_type *>(msg + offset);
332 a.length = (limit-offset) / sizeof(A);
333 return offset;
337 static int from_svr(char *msg, unsigned offset, unsigned limit, long,
340 offset = align_to<LEN>(offset);
341 if (L4_UNLIKELY(!check_size<LEN>(offset, limit)))
344 *reinterpret_cast<LEN *>(msg + offset) = a.length;
346 offset = align_to<A>(offset + sizeof(LEN));
347 if (L4_UNLIKELY(!check_size<A>(offset, limit, a.length)))
350 return offset + a.length * sizeof(A);