Index: uspace/lib/c/arch/ia32/src/fibril.S
===================================================================
--- uspace/lib/c/arch/ia32/src/fibril.S	(revision a35b458e9db1ca95e679799dc7c1b12c83359ca3)
+++ uspace/lib/c/arch/ia32/src/fibril.S	(revision a35a3d819d4e2e4e35964eea617087b5c6431b02)
@@ -35,7 +35,7 @@
 #
 # Save CPU context to the context_t variable
-# pointed by the 1st argument. Returns 1 in EAX.
+# pointed by the 1st argument. Returns 0 in EAX.
 #
-FUNCTION_BEGIN(context_save)
+FUNCTION_BEGIN(__setjmp)
 	movl 0(%esp), %eax  # the caller's return %eip
 	movl 4(%esp), %edx  # address of the context variable to save context to
@@ -53,16 +53,16 @@
 	movl %eax, CONTEXT_OFFSET_TLS(%edx)	# tls -> ctx->tls
 
-	xorl %eax, %eax		# context_save returns 1
-	incl %eax
+	xorl %eax, %eax		# __setjmp returns 0
 	ret
-FUNCTION_END(context_save)
+FUNCTION_END(__setjmp)
 
 ## Restore saved CPU context
 #
 # Restore CPU context from context_t variable
-# pointed by the 1st argument. Returns 0 in EAX.
+# pointed by the 1st argument. Returns second argument in EAX.
 #
-FUNCTION_BEGIN(context_restore)
+FUNCTION_BEGIN(__longjmp)
 	movl 4(%esp), %eax  # address of the context variable to restore context from
+	movl 8(%esp), %ecx  # return value
 
 	# restore registers from the context structure
@@ -80,6 +80,6 @@
 	movl %edx, %gs:0
 
-	xorl %eax, %eax		# context_restore returns 0
+	movl %ecx, %eax
 	ret
-FUNCTION_END(context_restore)
+FUNCTION_END(__longjmp)
 
