1 /* Reentrant versions of write system call. */
7 /* Some targets provides their own versions of this functions. Those
8 targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */
11 #ifndef REENTRANT_SYSCALLS_PROVIDED
12 #define REENTRANT_SYSCALLS_PROVIDED
16 #ifndef REENTRANT_SYSCALLS_PROVIDED
18 /* We use the errno variable used by the system dependent layer. */
24 <<_write_r>>---Reentrant version of write
31 _ssize_t _write_r(struct _reent *<[ptr]>,
32 int <[fd]>, const void *<[buf]>, size_t <[cnt]>);
35 This is a reentrant version of <<write>>. It
36 takes a pointer to the global data block, which holds
41 _write_r (struct _reent
*ptr
,
49 if ((ret
= (_ssize_t
)_write (fd
, buf
, cnt
)) == -1 && errno
!= 0)
50 _REENT_ERRNO(ptr
) = errno
;
54 #endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */