Hi!

----

Forwarding (as interesting-thing-to-know) ... mainly for Glenn+Phong
to take a look at for future thread support work...

----

Bye,
Roland

---------- Forwarded message ----------
From: Jose Fonseca <[email protected]>
Date: Fri, Mar 15, 2013 at 12:10 AM
Subject: [Mesa-dev] RFC: C11 threads.h
To: mesa-dev <[email protected]>


Mesa source tree currently has 4 abstraction of threading primitives
(in gallium, glapi, mapi, and egl components).

I'd like to unify all them, and since now the C11 standard introduced
a threads.h header, I'd like to use that as model.

So for I've imported a C11 threads.h implementation from
https://gist.github.com/yohhoy/2223710 , and reimplemented all

  http://cgit.freedesktop.org/~jrfonseca/mesa/log/?h=c11-threads

If there are no objections, the next step would be to eliminate all
threading abstractions and just use C11 threads.h primitives.

The only snafu is the wide spread use of static mutex initializers.
It's not supported by C11 threads -- I believe one needs to do the
initialization via once_init paradigm instead. But for now I just side
stepped the problem by defining a non standard initializer. I'll
revisit this later.

A nice side-benefit of this is that the pre-vista Win32 conditional
var implement should be much better than what we have now, which
should speed up multithreaded llvmpipe on windows substantially.

The same principle could be applied to atomic operations.

Jose
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


-- 
  __ .  . __
 (o.\ \/ /.o) [email protected]
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)
_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to