WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Mini-OS context switching

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Mini-OS context switching
From: Julian Stecklina <der_julian@xxxxxx>
Date: Sun, 07 Oct 2007 01:37:08 +0200
Delivery-date: Sat, 06 Oct 2007 16:38:28 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.5 (X11/20070730)
Hello,

I am currently trying to implement preemptive multithreading for Mini-OS and have the following problem:

If a context switch needs to occur outside of a timer interrupt, I fail to see how to implement it without race condition, because of the complex way to enable interrupts (clear memory word and perform a hypercall if upcalls are pending). The problem boils down to writing a function that takes the new register content as parameter, sets it and reenables interrupts. xen.h refers to a HYPERVISOR_stack_switch hypercall, which does not seem to be implemented or documented anywhere, though.

In contrast, context switching from an interrupt handler is easy, as it just involves changing the struct pt_regs.

Any help is greatly appreciated, as I am kind of clueless right now.

Regards,
Julian


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>