Re: [PATCH 3/4] UML - Implement get_wchan

2007-10-30 Thread Jeff Dike
On Tue, Oct 30, 2007 at 10:40:46AM -0700, Joe Perches wrote: > Perhaps instead of unsigned long? > > bool skipped_ip; //delayed initialization Ooh, I forgot we had bool. I'll fix that in a later patch. Jeff -- Work email - jdike at linux dot intel dot com - To

Re: [PATCH 3/4] UML - Implement get_wchan

2007-10-30 Thread Joe Perches
On Tue, 2007-10-30 at 13:28 -0400, Jeff Dike wrote: > +unsigned long get_wchan(struct task_struct *p) > +{ > + unsigned long stack_page, sp, ip, count = 0; Perhaps instead of unsigned long? bool skipped_ip;//delayed initialization > + > + if ((p == NULL) || (p == current) ||

[PATCH 3/4] UML - Implement get_wchan

2007-10-30 Thread Jeff Dike
Implement get_wchan - the algorithm is similar to x86. It starts with the stack pointer of the process in question and looks above that for addresses that are kernel text. The second one which isn't in the scheduler is the one that's returned. The first one is ignored because that will be UML's

[PATCH 3/4] UML - Implement get_wchan

2007-10-30 Thread Jeff Dike
Implement get_wchan - the algorithm is similar to x86. It starts with the stack pointer of the process in question and looks above that for addresses that are kernel text. The second one which isn't in the scheduler is the one that's returned. The first one is ignored because that will be UML's

Re: [PATCH 3/4] UML - Implement get_wchan

2007-10-30 Thread Joe Perches
On Tue, 2007-10-30 at 13:28 -0400, Jeff Dike wrote: +unsigned long get_wchan(struct task_struct *p) +{ + unsigned long stack_page, sp, ip, count = 0; Perhaps instead of unsigned long? bool skipped_ip;//delayed initialization + + if ((p == NULL) || (p == current) || (p-state

Re: [PATCH 3/4] UML - Implement get_wchan

2007-10-30 Thread Jeff Dike
On Tue, Oct 30, 2007 at 10:40:46AM -0700, Joe Perches wrote: Perhaps instead of unsigned long? bool skipped_ip; //delayed initialization Ooh, I forgot we had bool. I'll fix that in a later patch. Jeff -- Work email - jdike at linux dot intel dot com - To