|
Packit |
6c4009 |
/* Determine calling thread's scheduling parameters. Stub version.
|
|
Packit |
6c4009 |
Copyright (C) 2014-2018 Free Software Foundation, Inc.
|
|
Packit |
6c4009 |
This file is part of the GNU C Library.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit |
6c4009 |
modify it under the terms of the GNU Library General Public License as
|
|
Packit |
6c4009 |
published by the Free Software Foundation; either version 2 of the
|
|
Packit |
6c4009 |
License, or (at your option) any later version.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit |
6c4009 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
6c4009 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
6c4009 |
Library General Public License for more details.
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
You should have received a copy of the GNU Library General Public
|
|
Packit |
6c4009 |
License along with the GNU C Library; see the file COPYING.LIB. If
|
|
Packit |
6c4009 |
not, see <http://www.gnu.org/licenses/>. */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
#include <assert.h>
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* This should fill in PD->schedpolicy if PD->flags does not contain
|
|
Packit |
6c4009 |
ATTR_FLAG_POLICY_SET, and set it; and PD->schedparam if PD->flags does
|
|
Packit |
6c4009 |
not contain ATTR_FLAG_SCHED_SET, and set it. It won't be called at all
|
|
Packit |
6c4009 |
if both bits are already set. */
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
static void
|
|
Packit |
6c4009 |
collect_default_sched (struct pthread *pd)
|
|
Packit |
6c4009 |
{
|
|
Packit |
6c4009 |
assert ((pd->flags & (ATTR_FLAG_SCHED_SET | ATTR_FLAG_POLICY_SET)) != 0);
|
|
Packit |
6c4009 |
|
|
Packit |
6c4009 |
/* The generic/stub version is a no-op rather than just using the
|
|
Packit |
6c4009 |
__sched_getscheduler and __sched_getparam functions so that there
|
|
Packit |
6c4009 |
won't be stub warnings for those functions just because pthread_create
|
|
Packit |
6c4009 |
was called without actually calling those. */
|
|
Packit |
6c4009 |
}
|