1 /* Reentrant version of getentropy system call. */
7 /* Some targets provides their own versions of these 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 <<_getentropy_r>>---Reentrant version of getentropy
31 int _getentropy_r(struct _reent *<[ptr]>,
32 void *<[buf]>, size_t <[buflen]>);
35 This is a reentrant version of <<getentropy>>. It
36 takes a pointer to the global data block, which holds
41 _getentropy_r (struct _reent
*ptr
,
48 if ((ret
= _getentropy (buf
, buflen
)) == -1 && errno
!= 0)
49 _REENT_ERRNO(ptr
) = errno
;
53 #endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */