[Cbe-oss-dev] SPU ucontext and setcontext

Jimi Xenidis jimix at pobox.com
Sat Jul 16 00:49:06 EST 2011


On Jul 15, 2011, at 4:48 AM, Paul Keir wrote:

> Hello,
> 
> Is it possible to implement multi-threading on the SPU? I have
> SPU-GCC 4.1.1 and 4.6 installed, but it seems ucontext.h
> is absent from both. Has anyone built the ucontext library
> for use on the SPU; or achieved co-operative multi-threading
> by another route?
> 

Hmm.. Can't you use setjmp/longjump to do roughly the same thing, and you should not have the "signal issue".
That may be supported, though I'm not sure.

BTW: since you have the SPU Decrementer (see Cell Handbook) it wouldn't be too hard to actually do pre-emptive multi-threading (or "microthreading" as they call it) :)
-JX

> -Paul
> 
> The University of Glasgow, charity number SC004401
> _______________________________________________
> cbe-oss-dev mailing list
> cbe-oss-dev at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/cbe-oss-dev



More information about the cbe-oss-dev mailing list