diff options
author | Ulrich Drepper <drepper@redhat.com> | 2005-12-14 08:43:25 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2005-12-14 08:43:25 +0000 |
commit | b6ab06cef4670e02756bcdd4d2c33a49369a4346 (patch) | |
tree | b30743eb9728d890d1519f62b2d1f2b96f62547a /rt | |
parent | d1dc39a44e339f9c48baa3854fffb3d68c73c8fa (diff) | |
download | glibc-b6ab06cef4670e02756bcdd4d2c33a49369a4346.zip glibc-b6ab06cef4670e02756bcdd4d2c33a49369a4346.tar.gz glibc-b6ab06cef4670e02756bcdd4d2c33a49369a4346.tar.bz2 |
2005-12-13 Ulrich Drepper <drepper@redhat.com>
Diffstat (limited to 'rt')
-rw-r--r-- | rt/aio_cancel.c | 44 | ||||
-rw-r--r-- | rt/aio_fsync.c | 51 | ||||
-rw-r--r-- | rt/aio_misc.c | 29 | ||||
-rw-r--r-- | rt/aio_notify.c | 24 | ||||
-rw-r--r-- | rt/aio_read.c | 36 | ||||
-rw-r--r-- | rt/aio_read64.c | 2 | ||||
-rw-r--r-- | rt/aio_sigqueue.c | 36 | ||||
-rw-r--r-- | rt/aio_suspend.c | 46 | ||||
-rw-r--r-- | rt/aio_write.c | 36 | ||||
-rw-r--r-- | rt/aio_write64.c | 2 | ||||
-rw-r--r-- | rt/clock_getcpuclockid.c | 39 | ||||
-rw-r--r-- | rt/clock_getres.c | 30 | ||||
-rw-r--r-- | rt/clock_gettime.c | 31 | ||||
-rw-r--r-- | rt/clock_nanosleep.c | 39 | ||||
-rw-r--r-- | rt/clock_settime.c | 30 |
15 files changed, 475 insertions, 0 deletions
diff --git a/rt/aio_cancel.c b/rt/aio_cancel.c new file mode 100644 index 0000000..c24a2f7 --- /dev/null +++ b/rt/aio_cancel.c @@ -0,0 +1,44 @@ +/* Cancel requests associated with given file descriptor. Stub version. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + + +/* We use an UGLY hack to prevent gcc from finding us cheating. The + implementation of aio_cancel and aio_cancel64 are identical and so + we want to avoid code duplication by using aliases. But gcc sees + the different parameter lists and prints a warning. We define here + a function so that aio_cancel64 has no prototype. */ +#define aio_cancel64 XXX +#include <aio.h> +/* And undo the hack. */ +#undef aio_cancel64 + +#include <errno.h> + +int +aio_cancel (int fildes, struct aiocb *aiocbp) +{ + __set_errno (ENOSYS); + return -1; +} + +weak_alias (aio_cancel, aio_cancel64) + +stub_warning (aio_cancel) +stub_warning (aio_cancel64) +#include <stub-tag.h> diff --git a/rt/aio_fsync.c b/rt/aio_fsync.c new file mode 100644 index 0000000..bc23d75 --- /dev/null +++ b/rt/aio_fsync.c @@ -0,0 +1,51 @@ +/* Synchronize I/O in given file descriptor. Stub version. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + + +/* We use an UGLY hack to prevent gcc from finding us cheating. The + implementation of aio_fsync and aio_fsync64 are identical and so + we want to avoid code duplication by using aliases. But gcc sees + the different parameter lists and prints a warning. We define here + a function so that aio_fsync64 has no prototype. */ +#define aio_fsync64 XXX +#include <aio.h> +/* And undo the hack. */ +#undef aio_fsync64 + +#include <errno.h> +#include <fcntl.h> + +int +aio_fsync (int op, struct aiocb *aiocbp) +{ + if (op != O_SYNC && op != O_DSYNC) + { + __set_errno (EINVAL); + return -1; + } + + __set_errno (ENOSYS); + return -1; +} + +weak_alias (aio_fsync, aio_fsync64) + +stub_warning (aio_fsync) +stub_warning (aio_fsync64) +#include <stub-tag.h> diff --git a/rt/aio_misc.c b/rt/aio_misc.c new file mode 100644 index 0000000..c29b8d0 --- /dev/null +++ b/rt/aio_misc.c @@ -0,0 +1,29 @@ +/* Handle general operations. Stub version. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <aio.h> +#include <aio_misc.h> + +/* This file is for internal code needed by the aio_* implementation. */ + +void +__aio_init (const struct aioinit *init) +{ +} +weak_alias (__aio_init, aio_init) diff --git a/rt/aio_notify.c b/rt/aio_notify.c new file mode 100644 index 0000000..2c79ee6 --- /dev/null +++ b/rt/aio_notify.c @@ -0,0 +1,24 @@ +/* Notify initiator of AIO request. Stub version. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <aio.h> +#include <aio_misc.h> + +/* This file contains only internal functions used by + the particular aio_* implementation code. */ diff --git a/rt/aio_read.c b/rt/aio_read.c new file mode 100644 index 0000000..db1d19f --- /dev/null +++ b/rt/aio_read.c @@ -0,0 +1,36 @@ +/* Asynchronous read. Stub version. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <aio.h> +#include <errno.h> + +#ifdef BE_AIO64 +#define aiocb aiocb64 +#define aio_read aio_read64 +#endif + +int +aio_read (struct aiocb *aiocbp) +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (aio_read) +#include <stub-tag.h> diff --git a/rt/aio_read64.c b/rt/aio_read64.c new file mode 100644 index 0000000..c129235 --- /dev/null +++ b/rt/aio_read64.c @@ -0,0 +1,2 @@ +#define BE_AIO64 +#include "aio_read.c" diff --git a/rt/aio_sigqueue.c b/rt/aio_sigqueue.c new file mode 100644 index 0000000..e824c6b --- /dev/null +++ b/rt/aio_sigqueue.c @@ -0,0 +1,36 @@ +/* Copyright (C) 1997, 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <aio.h> +#include <errno.h> +#include <signal.h> + +#include "aio_misc.h" + +int +__aio_sigqueue (sig, val, caller_pid) + int sig; + const union sigval val; + pid_t caller_pid; +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (__aio_sigqueue) +#include <stub-tag.h> diff --git a/rt/aio_suspend.c b/rt/aio_suspend.c new file mode 100644 index 0000000..0530f00 --- /dev/null +++ b/rt/aio_suspend.c @@ -0,0 +1,46 @@ +/* Suspend until termination of a requests. Stub version. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + + +/* We use an UGLY hack to prevent gcc from finding us cheating. The + implementations of aio_suspend and aio_suspend64 are identical and so + we want to avoid code duplication by using aliases. But gcc sees + the different parameter lists and prints a warning. We define here + a function so that aio_suspend64 has no prototype. */ +#define aio_suspend64 XXX +#include <aio.h> +/* And undo the hack. */ +#undef aio_suspend64 + +#include <errno.h> +#include <sys/time.h> + + +int +aio_suspend (const struct aiocb *const list[], int nent, + const struct timespec *timeout) +{ + __set_errno (ENOSYS); + return -1; +} +weak_alias (aio_suspend, aio_suspend64) + +stub_warning (aio_suspend) +stub_warning (aio_suspend64) +#include <stub-tag.h> diff --git a/rt/aio_write.c b/rt/aio_write.c new file mode 100644 index 0000000..bc62fcb --- /dev/null +++ b/rt/aio_write.c @@ -0,0 +1,36 @@ +/* Asynchronous write. Stub version. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <aio.h> +#include <errno.h> + +#ifdef BE_AIO64 +#define aiocb aiocb64 +#define aio_write aio_write64 +#endif + +int +aio_write (struct aiocb *aiocbp) +{ + __set_errno (ENOSYS); + return -1; +} + +stub_warning (aio_write) +#include <stub-tag.h> diff --git a/rt/aio_write64.c b/rt/aio_write64.c new file mode 100644 index 0000000..bb1693e --- /dev/null +++ b/rt/aio_write64.c @@ -0,0 +1,2 @@ +#define BE_AIO64 +#include "aio_write.c" diff --git a/rt/clock_getcpuclockid.c b/rt/clock_getcpuclockid.c new file mode 100644 index 0000000..39c7e55 --- /dev/null +++ b/rt/clock_getcpuclockid.c @@ -0,0 +1,39 @@ +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <errno.h> +#include <time.h> +#include <unistd.h> + +int +clock_getcpuclockid (pid_t pid, clockid_t *clock_id) +{ + /* We don't allow any process ID but our own. */ + if (pid != 0 && pid != getpid ()) + return EPERM; + +#ifdef CLOCK_PROCESS_CPUTIME_ID + /* Store the number. */ + *clock_id = CLOCK_PROCESS_CPUTIME_ID; + + return 0; +#else + /* We don't have a timer for that. */ + return ENOENT; +#endif +} diff --git a/rt/clock_getres.c b/rt/clock_getres.c new file mode 100644 index 0000000..f5978da --- /dev/null +++ b/rt/clock_getres.c @@ -0,0 +1,30 @@ +/* Copyright (C) 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <errno.h> +#include <time.h> + +/* Get resolution of clock. */ +int +clock_getres (clockid_t clock_id, struct timespec *res) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (clock_getres) +#include <stub-tag.h> diff --git a/rt/clock_gettime.c b/rt/clock_gettime.c new file mode 100644 index 0000000..ff30612 --- /dev/null +++ b/rt/clock_gettime.c @@ -0,0 +1,31 @@ +/* Copyright (C) 1999, 2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <errno.h> +#include <time.h> + +/* Get current value of CLOCK and store it in TP. */ +int +clock_gettime (clockid_t clock_id, struct timespec *tp) +{ + __set_errno (ENOSYS); + return -1; +} +librt_hidden_def (clock_gettime) +stub_warning (clock_gettime) +#include <stub-tag.h> diff --git a/rt/clock_nanosleep.c b/rt/clock_nanosleep.c new file mode 100644 index 0000000..cff1c25 --- /dev/null +++ b/rt/clock_nanosleep.c @@ -0,0 +1,39 @@ +/* High-resolution sleep with the specified clock. Stub version. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <errno.h> +#include <sys/time.h> + + +int +clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req, + struct timespec *rem) +{ + if (__builtin_expect (req->tv_nsec, 0) < 0 + || __builtin_expect (req->tv_nsec, 0) >= 1000000000) + return EINVAL; + + if (flags != TIMER_ABSTIME && flags != 0) + return EINVAL; + + /* Not implemented. */ + return ENOSYS; +} +stub_warning (clock_nanosleep) +#include <stub-tag.h> diff --git a/rt/clock_settime.c b/rt/clock_settime.c new file mode 100644 index 0000000..9d6a92e --- /dev/null +++ b/rt/clock_settime.c @@ -0,0 +1,30 @@ +/* Copyright (C) 1999 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <errno.h> +#include <time.h> + +/* Set CLOCK to value TP. */ +int +clock_settime (clockid_t clock_id, const struct timespec *tp) +{ + __set_errno (ENOSYS); + return -1; +} +stub_warning (clock_settime) +#include <stub-tag.h> |