Re: [ECOS] flags question

2005-11-28 Thread Will Wagner
One explanation i can see is if some code is calling setbits from ISR context. This is illegal. Most of the time it would work, but there is a race condition. If the interrupt happens after the !(queue.empty()) and before the queue.dequeue() this behavour might happen. It would also require

Re: [ECOS] flags question

2005-11-28 Thread David Brennan
Will Wagner wrote: One explanation i can see is if some code is calling setbits from ISR context. This is illegal. Thanks for the suggestion. Is there any way of telling if the current context is an ISR rather than thread or DSR? The short answer is no. I submitted a (rejected) patch a

Re: [ECOS] flags question

2005-11-26 Thread Andrew Lunn
On Thu, Nov 24, 2005 at 03:35:45PM +, Will Wagner wrote: I have a question about the flags code in the kernel. I am using the bsd network stack and am running with asserts enabled. Very occasionally I hit the assert on line 180 of flag.cxx CYG_ASSERT( 0 == p-value_out, Thread already

[ECOS] flags question

2005-11-24 Thread Will Wagner
I have a question about the flags code in the kernel. I am using the bsd network stack and am running with asserts enabled. Very occasionally I hit the assert on line 180 of flag.cxx CYG_ASSERT( 0 == p-value_out, Thread already awoken? ); The only code that uses flags is the network alarm