source: rtems/cpukit/libcsupport/src/writev.c @ e22af78

4.115
Last change on this file since e22af78 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 842 bytes
Line 
1/*
2 *  writev() - POSIX 1003.1 - Write a Vector
3 *
4 *  OpenGroup URL:
5 *
6 *  http://www.opengroup.org/onlinepubs/009695399/functions/writev.html
7 *
8 *  COPYRIGHT (c) 1989-2011.
9 *  On-Line Applications Research Corporation (OAR).
10 *
11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
13 *  http://www.rtems.org/license/LICENSE.
14 */
15
16#if HAVE_CONFIG_H
17#include "config.h"
18#endif
19
20#include <sys/uio.h>
21
22#include <rtems/libio_.h>
23
24ssize_t writev(
25  int                 fd,
26  const struct iovec *iov,
27  int                 iovcnt
28)
29{
30  ssize_t        total;
31  rtems_libio_t *iop;
32
33  total = rtems_libio_iovec_eval( fd, iov, iovcnt, LIBIO_FLAGS_WRITE, &iop );
34
35  if ( total > 0 ) {
36    total = ( *iop->pathinfo.handlers->writev_h )( iop, iov, iovcnt, total );
37  }
38
39  return total;
40}
Note: See TracBrowser for help on using the repository browser.