From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51987 invoked by alias); 13 Aug 2019 07:38:52 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 51944 invoked by uid 9078); 13 Aug 2019 07:38:51 -0000 Date: Tue, 13 Aug 2019 07:38:00 -0000 Message-ID: <20190813073851.51943.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] sched.h: Declare affinity functions only on targets supporting them X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/master X-Git-Oldrev: 3b4685bf97a0649be7b19bf8efab44ca191aa6f8 X-Git-Newrev: 8ef2461000797cf01d88eff11189b388709c0ac8 X-SW-Source: 2019-q3/txt/msg00020.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=8ef2461000797cf01d88eff11189b388709c0ac8 commit 8ef2461000797cf01d88eff11189b388709c0ac8 Author: Corinna Vinschen Date: Mon Aug 12 12:13:20 2019 +0200 sched.h: Declare affinity functions only on targets supporting them Diff: --- newlib/libc/include/sched.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/newlib/libc/include/sched.h b/newlib/libc/include/sched.h index 79b775e..31599aa 100644 --- a/newlib/libc/include/sched.h +++ b/newlib/libc/include/sched.h @@ -93,10 +93,16 @@ int sched_yield( void ); #if __GNU_VISIBLE int sched_getcpu(void); +/* The following functions should only be declared if the type + cpu_set_t is defined through indirect inclusion of sys/cpuset.h, + only available on some targets. */ +#ifdef _SYS_CPUSET_H_ int sched_getaffinity (pid_t, size_t, cpu_set_t *); int sched_get_thread_affinity (void *, size_t, cpu_set_t *); int sched_setaffinity (pid_t, size_t, const cpu_set_t *); int sched_set_thread_affinity (void *, size_t, const cpu_set_t *); +#endif /* _SYS_CPUSET_H_ */ + #endif #ifdef __cplusplus