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.
This commit is contained in:
Sebastian Huber 2022-07-01 07:25:32 +02:00
parent 54930ae7d7
commit 27fd806cd7
1 changed files with 2 additions and 0 deletions

View File

@ -75,6 +75,7 @@ typedef cpuset_t cpu_set_t;
__BEGIN_DECLS __BEGIN_DECLS
#ifndef _KERNEL
static __inline cpu_set_t *CPU_ALLOC(int num_cpus) static __inline cpu_set_t *CPU_ALLOC(int num_cpus)
{ {
return __cpuset_alloc(num_cpus); return __cpuset_alloc(num_cpus);
@ -84,6 +85,7 @@ static __inline void CPU_FREE(cpu_set_t *set)
{ {
__cpuset_free(set); __cpuset_free(set);
} }
#endif
static __inline void CPU_ZERO_S(size_t setsize, cpu_set_t *set) static __inline void CPU_ZERO_S(size_t setsize, cpu_set_t *set)
{ {