Skip to content

Commit

Permalink
Fix generic bits/sched.h for #define __need_schedparam uses.
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Thibault authored and Roland McGrath committed Sep 2, 2010
1 parent fdc0c10 commit ece2984
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
2010-09-01 Samuel Thibault <samuel.thibault@ens-lyon.org>

This aligns bits/sched.h onto sysdeps/unix/sysv/linux/bits/sched.h:
Define __sched_param instead of SCHED_* and sched_param when
<bits/sched.h> is included with __need_schedparam defined.
* bits/sched.h [__need_schedparam]
(SCHED_OTHER, SCHED_FIFO, SCHED_RR, sched_param): Do not define.
[!__defined_schedparam && (__need_schedparam || _SCHED_H)]
(__defined_schedparam): Define to 1.
(__sched_param): New structure, identical to sched_param.
(__need_schedparam): Undefine.

2010-08-31 Mike Frysinger <vapier@gentoo.org>

* sysdeps/unix/sysv/linux/sparc/sys/epoll.h (epoll_create2): Delete.
Expand Down
15 changes: 15 additions & 0 deletions bits/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */

#ifndef __need_schedparam

#ifndef _SCHED_H
# error "Never include <bits/sched.h> directly; use <sched.h> instead."
#endif
Expand All @@ -34,6 +36,19 @@ struct sched_param
int __sched_priority;
};

#endif /* need schedparam */

#if !defined __defined_schedparam \
&& (defined __need_schedparam || defined _SCHED_H)
# define __defined_schedparam 1
/* Data structure to describe a process' schedulability. */
struct __sched_param
{
int __sched_priority;
};
# undef __need_schedparam
#endif


#if defined _SCHED_H && !defined __cpu_set_t_defined
# define __cpu_set_t_defined
Expand Down

0 comments on commit ece2984

Please sign in to comment.