schedule(): schedule a sleeping processes if it has pending signals
This commit is contained in:
@ -79,8 +79,6 @@
|
||||
#define dkprintf(...) do { if (0) kprintf(__VA_ARGS__); } while (0)
|
||||
#endif
|
||||
|
||||
extern struct sigpending *hassigpending(struct thread *thread);
|
||||
|
||||
int futex_cmpxchg_enabled;
|
||||
|
||||
/**
|
||||
|
||||
@ -677,5 +677,6 @@ void chain_process(struct process *);
|
||||
void chain_thread(struct thread *);
|
||||
void proc_init();
|
||||
void set_timer();
|
||||
struct sig_pending *hassigpending(struct thread *thread);
|
||||
|
||||
#endif
|
||||
|
||||
@ -2593,9 +2593,10 @@ redo:
|
||||
if (v->flags & CPU_FLAG_NEED_MIGRATE) {
|
||||
next = &cpu_local_var(idle);
|
||||
} else {
|
||||
/* Pick a new running process */
|
||||
/* Pick a new running process or one that has a pending signal */
|
||||
list_for_each_entry_safe(thread, tmp, &(v->runq), sched_list) {
|
||||
if (thread->status == PS_RUNNING) {
|
||||
if (thread->status == PS_RUNNING ||
|
||||
(thread->status == PS_INTERRUPTIBLE && hassigpending(thread))) {
|
||||
next = thread;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -105,7 +105,6 @@ static void calculate_time_from_tsc(struct timespec *ts);
|
||||
void check_signal(unsigned long, void *, int);
|
||||
void do_signal(long rc, void *regs, struct thread *thread, struct sig_pending *pending, int num);
|
||||
extern unsigned long do_kill(struct thread *thread, int pid, int tid, int sig, struct siginfo *info, int ptracecont);
|
||||
extern struct sigpending *hassigpending(struct thread *thread);
|
||||
extern long alloc_debugreg(struct thread *thread);
|
||||
extern int num_processors;
|
||||
extern unsigned long ihk_mc_get_ns_per_tsc(void);
|
||||
|
||||
Reference in New Issue
Block a user