MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / uiomove

Function uiomove

components/lwp/terminal/bsd_porting.h:307–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305
306#include <lwp_user_mm.h>
307rt_inline int uiomove(void *operand, int n, struct uio *uio)
308{
309 switch (uio->uio_rw)
310 {
311 case UIO_READ:
312 memcpy(uio->uio_iov->iov_base, operand, n);
313 break;
314 case UIO_WRITE:
315 memcpy(operand, uio->uio_iov->iov_base, n);
316 break;
317 default:
318 return -1;
319 }
320
321 uio->uio_iov->iov_base += n;
322 uio->uio_iov->iov_len--;
323 uio->uio_offset += n;
324 uio->uio_resid -= n;
325 return 0;
326}
327
328/* privileges checking: 0 if okay */
329rt_inline int priv_check(struct rt_thread *td, int priv)

Callers 6

ptsdev_readFunction · 0.85
ptsdev_writeFunction · 0.85
ttydisc_writeFunction · 0.85
ttydisc_getc_uioFunction · 0.85
ttyoutq_read_uioFunction · 0.85
ttyinq_read_uioFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected