public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/fw/libpthread-removal-easy] Add hidden prototypes for __sched_getparam, __sched_getscheduler
@ 2020-02-11  7:29 Florian Weimer
  0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2020-02-11  7:29 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bd774099c7c334747df6b2cc0044fc69f2241966

commit bd774099c7c334747df6b2cc0044fc69f2241966
Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon Feb 10 10:38:37 2020 +0100

    Add hidden prototypes for __sched_getparam, __sched_getscheduler
    
    This will enable them to be used in libc.so without PLTs.

Diff:
---
 include/sched.h    | 2 ++
 posix/sched_getp.c | 1 +
 posix/sched_gets.c | 1 +
 3 files changed, 4 insertions(+)

diff --git a/include/sched.h b/include/sched.h
index 4abc440..b0bf971 100644
--- a/include/sched.h
+++ b/include/sched.h
@@ -7,10 +7,12 @@ extern int __sched_setparam (__pid_t __pid,
 			     const struct sched_param *__param);
 libc_hidden_proto (__sched_setparam)
 extern int __sched_getparam (__pid_t __pid, struct sched_param *__param);
+libc_hidden_proto (__sched_getparam)
 extern int __sched_setscheduler (__pid_t __pid, int __policy,
 				 const struct sched_param *__param);
 libc_hidden_proto (__sched_setscheduler)
 extern int __sched_getscheduler (__pid_t __pid);
+libc_hidden_proto (__sched_getscheduler)
 extern int __sched_yield (void);
 libc_hidden_proto (__sched_yield)
 extern int __sched_get_priority_max (int __algorithm);
diff --git a/posix/sched_getp.c b/posix/sched_getp.c
index 32a5087..014ea0f 100644
--- a/posix/sched_getp.c
+++ b/posix/sched_getp.c
@@ -27,6 +27,7 @@ __sched_getparam (pid_t pid, struct sched_param *param)
   __set_errno (ENOSYS);
   return -1;
 }
+libc_hidden_def (__sched_getparam)
 stub_warning (sched_getparam)
 
 weak_alias (__sched_getparam, sched_getparam)
diff --git a/posix/sched_gets.c b/posix/sched_gets.c
index 356e2f2..07dd670 100644
--- a/posix/sched_gets.c
+++ b/posix/sched_gets.c
@@ -27,6 +27,7 @@ __sched_getscheduler (pid_t pid)
   __set_errno (ENOSYS);
   return -1;
 }
+libc_hidden_def (__sched_getscheduler)
 stub_warning (sched_getscheduler)
 
 weak_alias (__sched_getscheduler, sched_getscheduler)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-02-11  7:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-11  7:29 [glibc/fw/libpthread-removal-easy] Add hidden prototypes for __sched_getparam, __sched_getscheduler Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).