Il 04/01/2014 14:54, Holger Hans Peter Freyther ha scritto:
> On Sat, Jan 04, 2014 at 08:54:46AM +0100, Holger Hans Peter Freyther wrote:
> 
>>    oop1 = STACKTOP ();
>>    suspend_process (oop1);
>> +  if (oop1 == switch_to_process)
>> +       printf("Suspended is switched to process.\n");
>>    PRIM_SUCCEEDED;
>>  }
> 
> diff --git a/libgst/interp.c b/libgst/interp.c
> index 0a01361..ab67daf 100644
> --- a/libgst/interp.c
> +++ b/libgst/interp.c
> @@ -1794,7 +1794,8 @@ resume_process (OOP processOOP,
>      {
>        /* We're resuming a process with a *equal or higher* priority, so sleep
>           the current one and activate the new one */
> -      sleep_process (activeOOP);
> +      if (active->myList != _gst_nil_oop)
> +        sleep_process (activeOOP);
>        activate_process (processOOP);
>      }
>    else
> 
> 
> this is my work-around. I have no idea if that is the right place and/if
> it is correct. The idea is that an already process will not be made runnable.
> 
> The real question is probably how this code can be suspended and still be
> considered as the next process.

Yes, this looks like the right fix!

Paolo


_______________________________________________
help-smalltalk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to