Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30809
b: refs/heads/master
c: b29739f
h: refs/heads/master
i:
  30807: 41de213
v: v3
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Jun 28, 2006
1 parent 54c9e5a commit c6cb336
Show file tree
Hide file tree
Showing 4 changed files with 182 additions and 32 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 77ba89c5cf28d5d98a3cae17f67a3e42b102cc25
refs/heads/master: b29739f902ee76a05493fb7d2303490fc75364f4
2 changes: 2 additions & 0 deletions trunk/include/linux/init_task.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ extern struct group_info init_groups;
.lock_depth = -1, \
.prio = MAX_PRIO-20, \
.static_prio = MAX_PRIO-20, \
.normal_prio = MAX_PRIO-20, \
.policy = SCHED_NORMAL, \
.cpus_allowed = CPU_MASK_ALL, \
.mm = NULL, \
Expand Down Expand Up @@ -122,6 +123,7 @@ extern struct group_info init_groups;
.journal_info = NULL, \
.cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \
.fs_excl = ATOMIC_INIT(0), \
.pi_lock = SPIN_LOCK_UNLOCKED, \
}


Expand Down
21 changes: 19 additions & 2 deletions trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,11 @@ struct signal_struct {

#define MAX_PRIO (MAX_RT_PRIO + 40)

#define rt_task(p) (unlikely((p)->prio < MAX_RT_PRIO))
#define rt_prio(prio) unlikely((prio) < MAX_RT_PRIO)
#define rt_task(p) rt_prio((p)->prio)
#define batch_task(p) (unlikely((p)->policy == SCHED_BATCH))
#define has_rt_policy(p) \
unlikely((p)->policy != SCHED_NORMAL && (p)->policy != SCHED_BATCH)

/*
* Some day this will be a full-fledged user tracking system..
Expand Down Expand Up @@ -725,7 +728,7 @@ struct task_struct {
#endif
#endif
int load_weight; /* for niceness load balancing purposes */
int prio, static_prio;
int prio, static_prio, normal_prio;
struct list_head run_list;
prio_array_t *array;

Expand Down Expand Up @@ -852,6 +855,9 @@ struct task_struct {
/* Protection of (de-)allocation: mm, files, fs, tty, keyrings */
spinlock_t alloc_lock;

/* Protection of the PI data structures: */
spinlock_t pi_lock;

#ifdef CONFIG_DEBUG_MUTEXES
/* mutex deadlock detection */
struct mutex_waiter *blocked_on;
Expand Down Expand Up @@ -1018,6 +1024,17 @@ static inline void idle_task_exit(void) {}
#endif

extern void sched_idle_next(void);

#ifdef CONFIG_RT_MUTEXES
extern int rt_mutex_getprio(task_t *p);
extern void rt_mutex_setprio(task_t *p, int prio);
#else
static inline int rt_mutex_getprio(task_t *p)
{
return p->normal_prio;
}
#endif

extern void set_user_nice(task_t *p, long nice);
extern int task_prio(const task_t *p);
extern int task_nice(const task_t *p);
Expand Down
Loading

0 comments on commit c6cb336

Please sign in to comment.