|
Packit Service |
82fcde |
/* Helper code for POSIX timer implementation on Hurd.
|
|
Packit Service |
82fcde |
Copyright (C) 2000-2018 Free Software Foundation, Inc.
|
|
Packit Service |
82fcde |
This file is part of the GNU C Library.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit Service |
82fcde |
modify it under the terms of the GNU Lesser General Public License as
|
|
Packit Service |
82fcde |
published by the Free Software Foundation; either version 2.1 of the
|
|
Packit Service |
82fcde |
License, or (at your option) any later version.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit Service |
82fcde |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
82fcde |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
82fcde |
Lesser General Public License for more details.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
82fcde |
License along with the GNU C Library; see the file COPYING.LIB. If
|
|
Packit Service |
82fcde |
not, see <http://www.gnu.org/licenses/>. */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#ifndef _TIMER_ROUTINES_H
|
|
Packit Service |
82fcde |
#define _TIMER_ROUTINES_H 1
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#include <bits/pthreadtypes.h>
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/* Compare two pthread_attr_t thread attributes for exact equality.
|
|
Packit Service |
82fcde |
Returns 1 if they are equal, otherwise zero if they are not equal
|
|
Packit Service |
82fcde |
or contain illegal values. This version is Hurd-specific for
|
|
Packit Service |
82fcde |
performance reason. One could use the access functions to get the
|
|
Packit Service |
82fcde |
values of all the fields of the attribute structure. */
|
|
Packit Service |
82fcde |
static inline int
|
|
Packit Service |
82fcde |
thread_attr_compare (const pthread_attr_t * left, const pthread_attr_t * right)
|
|
Packit Service |
82fcde |
{
|
|
Packit Service |
82fcde |
struct __pthread_attr *ileft = (struct __pthread_attr *) left;
|
|
Packit Service |
82fcde |
struct __pthread_attr *iright = (struct __pthread_attr *) right;
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
return ileft->__schedparam.sched_priority
|
|
Packit Service |
82fcde |
== iright->__schedparam.sched_priority
|
|
Packit Service |
82fcde |
&& ileft->__stackaddr == iright->__stackaddr
|
|
Packit Service |
82fcde |
&& ileft->__stacksize == iright->__stacksize
|
|
Packit Service |
82fcde |
&& ileft->__guardsize == iright->__guardsize
|
|
Packit Service |
82fcde |
&& ileft->__detachstate == iright->__detachstate
|
|
Packit Service |
82fcde |
&& ileft->__inheritsched == iright->__inheritsched
|
|
Packit Service |
82fcde |
&& ileft->__contentionscope == iright->__contentionscope
|
|
Packit Service |
82fcde |
&& ileft->__schedpolicy == iright->__schedpolicy;
|
|
Packit Service |
82fcde |
}
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#endif /* timer_routines.h */
|