Index: libcfa/src/concurrency/CtxSwitch-i386.S
===================================================================
--- libcfa/src/concurrency/CtxSwitch-i386.S	(revision e67a82d79e32a55496140aa883716d9123ccc7f7)
+++ libcfa/src/concurrency/CtxSwitch-i386.S	(revision 636d115b7b50892534cae9061eb31c837d3678a8)
@@ -10,39 +10,26 @@
 // Created On       : Tue Dec 6 12:27:26 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Jul 21 22:29:25 2017
-// Update Count     : 1
-//
-// This  library is free  software; you  can redistribute  it and/or  modify it
-// under the terms of the GNU Lesser General Public License as published by the
-// Free Software  Foundation; either  version 2.1 of  the License, or  (at your
-// option) any later version.
-//
-// This library is distributed in the  hope that it will be useful, but WITHOUT
-// ANY  WARRANTY;  without even  the  implied  warranty  of MERCHANTABILITY  or
-// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
-// for more details.
-//
-// You should  have received a  copy of the  GNU Lesser General  Public License
-// along  with this library.
+// Last Modified On : Sun Aug 16 08:46:22 2020
+// Update Count     : 4
 //
 
-// This context switch routine depends on the fact that the stack of a new
-// thread has been set up to look like the thread has saved its context in
-// the normal manner.
-//
-// void CtxSwitch( machine_context *from, machine_context *to );
+// The context switch routine requires the initial the stack of a thread to
+// look like the thread has saved its context in the normal manner.
 
-// Offsets in the context structure. This needs to be synchronized with the
-// high level code a little better.
+// Offsets must synchronized with the __stack_context_t in invoke.h.
 
 #define PTR_BYTE	4
 #define SP_OFFSET	( 0 * PTR_BYTE )
 #define FP_OFFSET	( 1 * PTR_BYTE )
-#define PC_OFFSET	( 2 * PTR_BYTE )
 
+// Context switch between coroutines/tasks.
+//   void __cfactx_switch( struct __stack_context_t * from, struct __stack_context_t * to ) ;
+// Arguments "from" in register 4(%esp), "to" in register 20(%esp)
+
+	.file "CtxSwitch-i386.S"
 	.text
 	.align 2
-	.globl __cfactx_switch
-	.type  __cfactx_switch, @function
+	.global __cfactx_switch
+	.type __cfactx_switch, @function
 __cfactx_switch:
 
@@ -83,5 +70,5 @@
 
 	ret
-	.size  __cfactx_switch, .-__cfactx_switch
+	.size __cfactx_switch, .-__cfactx_switch
 
 // Local Variables: //
Index: libcfa/src/concurrency/CtxSwitch-x86_64.S
===================================================================
--- libcfa/src/concurrency/CtxSwitch-x86_64.S	(revision e67a82d79e32a55496140aa883716d9123ccc7f7)
+++ libcfa/src/concurrency/CtxSwitch-x86_64.S	(revision 636d115b7b50892534cae9061eb31c837d3678a8)
@@ -7,32 +7,15 @@
 // CtxSwitch-x86_64.S --
 //
-// Author           : Thierry Delisle
-// Created On       : Mon Nov 28 12:27:26 2016
+// Author           : Peter A. Buhr
+// Created On       : Mon Aug 10 08:10:26 2020
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Jul 21 22:28:11 2017
-// Update Count     : 1
-//
-// This  library is free  software; you  can redistribute  it and/or  modify it
-// under the terms of the GNU Lesser General Public License as published by the
-// Free Software  Foundation; either  version 2.1 of  the License, or  (at your
-// option) any later version.
-//
-// This library is distributed in the  hope that it will be useful, but WITHOUT
-// ANY  WARRANTY;  without even  the  implied  warranty  of MERCHANTABILITY  or
-// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
-// for more details.
-//
-// You should  have received a  copy of the  GNU Lesser General  Public License
-// along  with this library.
+// Last Modified On : Thu Aug 20 18:09:32 2020
+// Update Count     : 9
 //
 
-// This context switch routine depends on the fact that the stack of a new
-// thread has been set up to look like the thread has saved its context in
-// the normal manner.
-//
-// void CtxSwitch( machine_context *from, machine_context *to );
+// The context switch routine requires the initial the stack of a thread to
+// look like the thread has saved its context in the normal manner.
 
-// Offsets in the context structure. This needs to be synchronized with the
-// high level code a little better.
+// Offsets must synchronized with the __stack_context_t in invoke.h.
 
 #define PTR_BYTE	8
@@ -40,10 +23,13 @@
 #define FP_OFFSET	( 1 * PTR_BYTE )
 
-//-----------------------------------------------------------------------------
-// Regular context switch routine which enables switching from one context to anouther
+// Context switch between coroutines/tasks.
+//   void __cfactx_switch( struct __stack_context_t * from, struct __stack_context_t * to ) ;
+// Arguments "from" in register rdi, "to" in register rsi.
+
+	.file "CtxSwitch-x86_64.S"
 	.text
 	.align 2
-	.globl __cfactx_switch
-	.type  __cfactx_switch, @function
+	.global __cfactx_switch
+	.type __cfactx_switch, @function
 __cfactx_switch:
 
@@ -77,17 +63,18 @@
 
 	ret
-	.size  __cfactx_switch, .-__cfactx_switch
+	.size __cfactx_switch, .-__cfactx_switch
 
-//-----------------------------------------------------------------------------
-// Stub used to create new stacks which are ready to be context switched to
+// Stub to create new stacks which can be context switched to
+//   void __cfactx_invoke_stub( void );
+
 	.text
 	.align 2
-	.globl __cfactx_invoke_stub
-	.type	 __cfactx_invoke_stub, @function
+	.global __cfactx_invoke_stub
+	.type __cfactx_invoke_stub, @function
 __cfactx_invoke_stub:
-	movq %rbx, %rdi
+	movq %rbx, %rdi						// move main and this to first two arguments
 	movq %r12, %rsi
-	jmp *%r13
-	.size  __cfactx_invoke_stub, .-__cfactx_invoke_stub
+	jmp *%r13							// jmp to invoke
+	.size __cfactx_invoke_stub, .-__cfactx_invoke_stub
 
 // Local Variables: //
