Dear all

Now I try to add some functions and data structures in Fiasco.

I had added several data structures into "class Context" and implement some functions to manipulate these data structures.
My goal is to add multiple ready queues in Fiasco. So I add the corresponding enqueue function in ready_enqueue() to add the Context into my own ready queue.
(But I don't change the way to choose highest Context, I only add the queue and try the functionality of these queue.)

It seems to be valid for simple environment. But when I load L4Linux and I want to group all threads owned by L4Linux into my ready queue, it got some unpredictable page fault error.

-------------------------------------------------------------------------------
...
mice: PS/2 mouse device common for all mice
TCP cubic registered
NET: Registered protocol family 17
Freeing init memory: 128K
init started: BusyBox v1.13.2 (2009-05-13 02:16:43 CST)
starting pid 13, tty '/dev/console': '-/etc/init.d/rcS'
Fiasco BUG: pfa=c0440084 err=400017 pc=f001f14c
  --Fiasco BUG: Invalid TCB access (locked)------------------PC: f00080a8
[rcS] (10.00) jdb:
-------------------------------------------------------------------------------

The error is caused from the enqueue function which changes the data structures in class Context. But the error sometimes happened before l4x.idler0 thread creation, sometimes I can get into shell correctly and error happened when I use unix commands (which creates new thread for this unix commands). The error is unpredictable.

Because the other threads can work correctly, I guest that there are some issues in L4Linux to cause this error from the modification of class Context.

Can anyone give me any idea? Thanks very much!!

Best Regards,
Sean