2018-01-01 01:32:25 +01:00
|
|
|
/* Copyright (C) 2003-2018 Free Software Foundation, Inc.
|
2003-03-25 21:41:26 +01:00
|
|
|
This file is part of the GNU C Library.
|
|
|
|
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
|
|
|
|
|
|
|
|
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
|
2012-02-10 00:18:22 +01:00
|
|
|
License along with the GNU C Library; see the file COPYING.LIB. If
|
|
|
|
not, see <http://www.gnu.org/licenses/>. */
|
2003-03-25 21:41:26 +01:00
|
|
|
|
|
|
|
#include <errno.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <time.h>
|
|
|
|
#include <sysdep.h>
|
|
|
|
#include "kernel-posix-timers.h"
|
|
|
|
|
|
|
|
|
2012-08-16 16:03:43 +02:00
|
|
|
#ifdef timer_gettime_alias
|
|
|
|
# define timer_gettime timer_gettime_alias
|
|
|
|
#endif
|
2003-03-25 21:41:26 +01:00
|
|
|
|
|
|
|
|
|
|
|
int
|
2015-10-19 14:04:33 +02:00
|
|
|
timer_gettime (timer_t timerid, struct itimerspec *value)
|
2003-03-25 21:41:26 +01:00
|
|
|
{
|
2012-08-16 16:03:43 +02:00
|
|
|
#undef timer_gettime
|
|
|
|
struct timer *kt = (struct timer *) timerid;
|
2003-03-25 21:41:26 +01:00
|
|
|
|
2012-08-16 16:03:43 +02:00
|
|
|
/* Delete the kernel timer object. */
|
2015-08-21 18:57:15 +02:00
|
|
|
int res = INLINE_SYSCALL (timer_gettime, 2, kt->ktimerid, value);
|
|
|
|
|
|
|
|
return res;
|
2003-03-25 21:41:26 +01:00
|
|
|
}
|