Re: SoC: help with LISTs and killing procs

2006-08-11 Thread Divacky Roman
You could make em_find() take an argument to specify if it should acquire a WLOCK instead of an RLOCK. Really, unless you have measured a lot of contention on this lock, you should just make it a mtx, and only go back and make it a rwlock if it really needs it. Also, you currently can't do

SoC: help with LISTs and killing procs

2006-08-10 Thread Divacky Roman
hi I am doing this: (pseudocode) LIST_FOREACH_SAFE(em, td_em-shared-threads, threads, tmp_em) { kill(em, SIGKILL); } kill(SIGKILL) calls exit() which calls my exit_hook() my exit_hook() does LIST_REMOVE(em, threads). the problem is that this is not synchronous so I am getting a panic

Re: SoC: help with LISTs and killing procs

2006-08-10 Thread Brooks Davis
On Thu, Aug 10, 2006 at 05:16:17PM +0200, Divacky Roman wrote: hi I am doing this: (pseudocode) LIST_FOREACH_SAFE(em, td_em-shared-threads, threads, tmp_em) { kill(em, SIGKILL); } kill(SIGKILL) calls exit() which calls my exit_hook() my exit_hook() does LIST_REMOVE(em,

Re: SoC: help with LISTs and killing procs

2006-08-10 Thread Divacky Roman
On Thu, Aug 10, 2006 at 10:23:59AM -0500, Brooks Davis wrote: On Thu, Aug 10, 2006 at 05:16:17PM +0200, Divacky Roman wrote: hi I am doing this: (pseudocode) LIST_FOREACH_SAFE(em, td_em-shared-threads, threads, tmp_em) { kill(em, SIGKILL); } kill(SIGKILL) calls

Re: SoC: help with LISTs and killing procs

2006-08-10 Thread Brooks Davis
On Thu, Aug 10, 2006 at 05:35:43PM +0200, Divacky Roman wrote: On Thu, Aug 10, 2006 at 10:23:59AM -0500, Brooks Davis wrote: On Thu, Aug 10, 2006 at 05:16:17PM +0200, Divacky Roman wrote: hi I am doing this: (pseudocode) LIST_FOREACH_SAFE(em, td_em-shared-threads, threads,

Re: SoC: help with LISTs and killing procs

2006-08-10 Thread Divacky Roman
On Thu, Aug 10, 2006 at 10:43:05AM -0500, Brooks Davis wrote: On Thu, Aug 10, 2006 at 05:35:43PM +0200, Divacky Roman wrote: On Thu, Aug 10, 2006 at 10:23:59AM -0500, Brooks Davis wrote: On Thu, Aug 10, 2006 at 05:16:17PM +0200, Divacky Roman wrote: hi I am doing this:

Re: SoC: help with LISTs and killing procs

2006-08-10 Thread Brooks Davis
On Thu, Aug 10, 2006 at 06:17:05PM +0200, Divacky Roman wrote: On Thu, Aug 10, 2006 at 10:43:05AM -0500, Brooks Davis wrote: On Thu, Aug 10, 2006 at 05:35:43PM +0200, Divacky Roman wrote: On Thu, Aug 10, 2006 at 10:23:59AM -0500, Brooks Davis wrote: On Thu, Aug 10, 2006 at 05:16:17PM

Re: SoC: help with LISTs and killing procs

2006-08-10 Thread John Baldwin
On Thursday 10 August 2006 12:17, Divacky Roman wrote: On Thu, Aug 10, 2006 at 10:43:05AM -0500, Brooks Davis wrote: On Thu, Aug 10, 2006 at 05:35:43PM +0200, Divacky Roman wrote: On Thu, Aug 10, 2006 at 10:23:59AM -0500, Brooks Davis wrote: On Thu, Aug 10, 2006 at 05:16:17PM +0200,