[newlib-cygwin] RTEMS: _KERNEL tweak for <sys/cpuset.h>

Sebastian Huber sh@sourceware.org
Fri Jul 1 11:57:13 GMT 2022


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=27fd806cd7fad2f1af57acfb66db0bc41338562e

commit 27fd806cd7fad2f1af57acfb66db0bc41338562e
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date:   Fri Jul 1 07:25:32 2022 +0200

    RTEMS: _KERNEL tweak for <sys/cpuset.h>
    
    If _KERNEL is defined, then do not delcare CPU_ALLOC() and CPU_FREE() since
    __cpuset_alloc() and __cpuset_free() are not declared as well.

Diff:
---
 newlib/libc/sys/rtems/include/sys/cpuset.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/newlib/libc/sys/rtems/include/sys/cpuset.h b/newlib/libc/sys/rtems/include/sys/cpuset.h
index 09278242f..8b2918cbc 100644
--- a/newlib/libc/sys/rtems/include/sys/cpuset.h
+++ b/newlib/libc/sys/rtems/include/sys/cpuset.h
@@ -75,6 +75,7 @@ typedef cpuset_t cpu_set_t;
 
 __BEGIN_DECLS
 
+#ifndef _KERNEL
 static __inline cpu_set_t *CPU_ALLOC(int num_cpus)
 {
   return __cpuset_alloc(num_cpus);
@@ -84,6 +85,7 @@ static __inline void CPU_FREE(cpu_set_t *set)
 {
   __cpuset_free(set);
 }
+#endif
 
 static __inline void CPU_ZERO_S(size_t setsize, cpu_set_t *set)
 {


More information about the Newlib-cvs mailing list