1 /* Reentrant version of close 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 <<_close_r>>---Reentrant version of close
31 int _close_r(struct _reent *<[ptr]>, int <[fd]>);
34 This is a reentrant version of <<close>>. It
35 takes a pointer to the global data block, which holds
47 if ((ret
= _close (fd
)) == -1 && errno
!= 0)
48 _REENT_ERRNO(ptr
) = errno
;
52 #endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */