Re: System init and OS eventq ensure

2016-12-12 Thread marko kiiskila
> On Dec 11, 2016, at 11:21 AM, Sterling Hughes wrote: > > Hi, > >> >>> On Dec 11, 2016, at 10:55 AM, Christopher Collins >>> wrote: >>> >>> On Sun, Dec 11, 2016 at 10:11:44AM -0800, will sanfilippo wrote: Personally, I keep wanting to try and

Re: System init and OS eventq ensure

2016-12-11 Thread Sterling Hughes
Hi, On Dec 11, 2016, at 10:55 AM, Christopher Collins wrote: On Sun, Dec 11, 2016 at 10:11:44AM -0800, will sanfilippo wrote: Personally, I keep wanting to try and have the OS start up right away. I wonder if this could solve the problem that Sterling raised (no

Re: System init and OS eventq ensure

2016-12-11 Thread will sanfilippo
I guess, for no really great reason, I thought it would be weird to malloc, say, 1024 bytes, then free, say, 960 bytes. No weirder than what I was suggesting. :-) I guess there a number of things we could do here: malloc a temporary stack and free that whole thing and either do another malloc

Re: System init and OS eventq ensure

2016-12-11 Thread Christopher Collins
On Sun, Dec 11, 2016 at 10:11:44AM -0800, will sanfilippo wrote: > Personally, I keep wanting to try and have the OS start up right away. I wonder if this could solve the problem that Sterling raised (no default event queue during sysinit). The control flow in main() might look like this: 1.

Re: System init and OS eventq ensure

2016-12-11 Thread will sanfilippo
Personally, I keep wanting to try and have the OS start up right away. There are definitely “issues” with this: a) We do not want to waste idle task stack. b) When tasks are started they would start running right away. This might cause issues where a task does something to a piece of memory that

Re: System init and OS eventq ensure

2016-12-10 Thread Christopher Collins
Darn, you're right. I'm writing these emails from my phone, and I didn't look at the code closely enough. For other packages, the start event only gets executed the first time the event queue gets used (as you said). I guess it has worked out in practice because the application uses the package

Re: System init and OS eventq ensure

2016-12-10 Thread Sterling Hughes
How do you assign an event queue if you are relying on the default event queue being there? Can you point me to an example of where this is done? Sterling > On Dec 10, 2016, at 12:08 PM, Christopher Collins wrote: > > The way other packages handle this is they

Re: System init and OS eventq ensure

2016-12-10 Thread Christopher Collins
The way other packages handle this is they enqueue the startup event when their event queue is assigned. This happens automatically when you call os_eventq_designate(); the last parameter is the event to enqueue immediately. Chris On Sat, Dec 10, 2016 at 11:30:27AM -0800, Sterling Hughes wrote: