Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 53df410

Browse files
committed
core.sys.posix.aio: Add USE_GNU extensions for Glibc AIO.
1 parent ba350f4 commit 53df410

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

src/core/sys/posix/aio.d

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,28 @@ else
219219
int lio_listio(int mode, const(aiocb*)* aiocb_list, int nitems, sigevent* sevp);
220220
}
221221

222-
/* functions outside/extending posix requirement */
223-
version (FreeBSD)
222+
/* Functions outside/extending POSIX requirement. */
223+
version (CRuntime_Glibc)
224+
{
225+
static if (__USE_GNU)
226+
{
227+
/* To customize the implementation one can use the following struct. */
228+
struct aioinit
229+
{
230+
int aio_threads;
231+
int aio_num;
232+
int aio_locks;
233+
int aio_usedba;
234+
int aio_debug;
235+
int aio_numusers;
236+
int aio_idle_time;
237+
int aio_reserved;
238+
}
239+
240+
void aio_init(const(aioinit)* init);
241+
}
242+
}
243+
else version (FreeBSD)
224244
{
225245
int aio_waitcomplete(aiocb** aiocb_list, const(timespec)* timeout);
226246
int aio_mlock(aiocb* aiocbp);

0 commit comments

Comments
 (0)