Re: LWLock optimization for multicore Power machines - Mailing list pgsql-hackers

From Tom Lane
Subject Re: LWLock optimization for multicore Power machines
Date
Msg-id 32229.1490473953@sss.pgh.pa.us
Whole thread Raw
In response to Re: LWLock optimization for multicore Power machines  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
List pgsql-hackers
Alexander Korotkov <a.korotkov@postgrespro.ru> writes:
> I moved PPC implementation of pg_atomic_fetch_mask_add_u32() into
> port/atomics/arch-ppc.h.  I also had to declare pg_atomic_uint32 there to
> satisfy usage of this type as argument
> of pg_atomic_fetch_mask_add_u32_impl().

Hm, you did something wrong there, because now I get a bunch of failures:

ccache gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute-Wformat-security -fno-strict-aliasing -fwrapv -g -O2 -I../../../../src/include    -c -o
brin.obrin.c 
In file included from ../../../../src/include/port/atomics.h:123,                from
../../../../src/include/utils/dsa.h:17,               from ../../../../src/include/nodes/tidbitmap.h:26,
from../../../../src/include/access/genam.h:19,                from ../../../../src/include/nodes/execnodes.h:17,
       from ../../../../src/include/access/brin.h:14,                from brin.c:18: 
../../../../src/include/port/atomics/generic.h:154:3: error: #error "No pg_atomic_test_and_set provided"
../../../../src/include/port/atomics.h: In function 'pg_atomic_init_flag':
../../../../src/include/port/atomics.h:178: warning: implicit declaration of function 'pg_atomic_init_flag_impl'
../../../../src/include/port/atomics.h: In function 'pg_atomic_test_set_flag':
../../../../src/include/port/atomics.h:193: warning: implicit declaration of function 'pg_atomic_test_set_flag_impl'
../../../../src/include/port/atomics.h: In function 'pg_atomic_unlocked_test_flag':
../../../../src/include/port/atomics.h:208: warning: implicit declaration of function
'pg_atomic_unlocked_test_flag_impl'
... and so on.

I'm not entirely sure what the intended structure of these header files
is.  Maybe Andres can comment.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: standardized backwards incompatibility tag for commits
Next
From: Andres Freund
Date:
Subject: Valgrind failures caused by multivariate stats patch