--- a/Continuation.st Wed Dec 06 15:12:10 2006 +0100
+++ b/Continuation.st Wed Dec 06 15:32:17 2006 +0100
@@ -1,6 +1,6 @@
"
COPYRIGHT (c) 2004 by eXept Software AG
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -26,7 +26,7 @@
copyright
"
COPYRIGHT (c) 2004 by eXept Software AG
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -44,19 +44,19 @@
[Instance variables:]
- id <SmallInteger> a unique continuation-id;
- Used to identify a corresponding
- data-structure in the VM.
+ id <SmallInteger> a unique continuation-id;
+ Used to identify a corresponding
+ data-structure in the VM.
- process <Process> the process which created this continuation.
+ process <Process> the process which created this continuation.
[Class variables:]
[see also:]
- Process Context Block
+ Process Context Block
[author:]
- Claus Gittinger
+ Claus Gittinger
"
!
@@ -69,19 +69,19 @@
current
|cont id|
- cont := super new.
+ cont := self basicNew.
%{
int __cId;
extern int __continuationCreate();
__cId = __continuationCreate(cont);
- if (__cId) {
- id = __mkSmallInteger(__cId);
+ if (__cId > 0) {
+ id = __mkSmallInteger(__cId);
}
%}.
id isNil ifTrue:[
- self error:'could not create continuation' mayProceed:true.
- ^ nil.
+ self error:'could not create continuation' mayProceed:true.
+ ^ nil.
].
cont setId:id process:(Processor activeProcess).
^ cont
@@ -126,7 +126,7 @@
(cID := id) notNil ifTrue:[
%{
- __continuationResume(__intVal(cID));
+ __continuationResume(__intVal(cID));
%}
].
self halt.
@@ -157,9 +157,9 @@
|cId|
(cId := id) notNil ifTrue:[
- id := nil.
+ id := nil.
%{
- __continuationDestroy(__intVal(cId));
+ __continuationDestroy(__intVal(cId));
%}
].
!
@@ -186,5 +186,5 @@
!Continuation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Continuation.st,v 1.12 2006-11-29 09:16:30 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Continuation.st,v 1.13 2006-12-06 14:32:17 cg Exp $'
! !