[Cbe-oss-dev] [PATCH 6/6] spufs: remove run mutex

Arnd Bergmann arnd.bergmann at de.ibm.com
Wed Feb 13 16:03:42 EST 2008


On Wednesday 06 February 2008, Luke Browning wrote:
> @@ -114,7 +114,11 @@
>          * 32-Bit assignments are atomic on powerpc, and we don't care about
>          * memory ordering here because retrieving the controlling thread is
>          * per definition racy.
> +        *
> +        * Can't change controlling threads.
>          */
> +       if (ctx->tid && ctx->tid != current->pid)
> +               return -EPERM;
>         ctx->tid = current->pid;
>  
>         /*

AFAICS, this return value gets propagated to user space, in the place where
we would formerly block. This is an ABI change that should be thought through
carefully!

Moreover, your implementation seems to have a bug in that you now prevent
one context to be run inside of different threads, which is a feature that
people currently use.

Also, you would at least need to document the new interface in the spu_run
man page and check if there are any ABI relevant implications to the libspe
interface.

	Arnd <><



More information about the cbe-oss-dev mailing list