[Mesa-dev] [PATCH 7/7] c11: Make TIME_UTC a conditional macro.
Jose Fonseca
jfonseca at vmware.com
Thu Jan 9 11:32:10 PST 2014
This series is pretty much what I proposed several months ago, rebased on top of master, with minor if any tweaks.
Still to do is remove the deprecated abstractions (which now are mere wrappers of the c11 ones).
That said, this series is already useful as is, not only because of the code de-duplication, but also because the Windows conditional var implemention in master is poll-based so performs quite badly, in particular llvmpipe with many threads. Which is fixed here.
IMHO the rest can be done as time permits...
Jose
----- Original Message -----
> From: José Fonseca <jfonseca at vmware.com>
>
> Some system headers already define it, so this prevents conflict.
> ---
> include/c11/threads.h | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/include/c11/threads.h b/include/c11/threads.h
> index 678774c..4a4079d 100644
> --- a/include/c11/threads.h
> +++ b/include/c11/threads.h
> @@ -10,6 +10,10 @@
>
> #include <time.h>
>
> +#ifndef TIME_UTC
> +#define TIME_UTC 1
> +#endif
> +
> #include "c99_compat.h" /* for `inline` */
>
> /*---------------------------- types ----------------------------*/
> @@ -39,8 +43,6 @@ enum {
> thrd_nomem // out of memory
> };
>
> -enum { TIME_UTC = 1 };
> -
> /*-------------------------- functions --------------------------*/
>
> #if defined(_WIN32) && !defined(__CYGWIN__)
> --
> 1.8.3.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
More information about the mesa-dev
mailing list