Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/powerpc/include/atomic.h | ||
---|---|---|
856 ↗ | (On Diff #51651) | Other places I see the same #define . I'm currently doing a universe, so I will know. |
sys/mips/include/atomic.h | ||
---|---|---|
794 ↗ | (On Diff #51651) | No, usually not. Do you want me to clear those variants? |
sys/mips/include/atomic.h | ||
---|---|---|
794 ↗ | (On Diff #51651) | Yes, I think it is better not to do that, both due to the precedent and because the implementation is somewhat questionable. |
sys/powerpc/include/atomic.h | ||
856 ↗ | (On Diff #51651) | It would work if the real implementation function does explicit cast to uint32_t or uint32_t is typedef for long. If it is typedef to int, then this should break. |
Asm versions of the mips swap() primitives would be less ugly, but I think this can be taken care of by the mips people.
More minor build fixes. u_int is not always defined when including atomic.h. Use uint32_t instead.
sys/powerpc/include/atomic.h | ||
---|---|---|
856 ↗ | (On Diff #51801) | But you still use u_int there ? |
Yes, but those are macros, so they are not compiled when the header file is included.
I'm seeing something like this:
so9899:1999 -Werror /usr/img/freebsd/sys/dev/cfe/cfe_api.c In file included from /usr/img/freebsd/sys/sys/systm.h:44, from /usr/img/freebsd/sys/dev/cfe/cfe_api.h:67, from /usr/img/freebsd/sys/dev/cfe/cfe_api.c:54: ./machine/atomic.h: In function 'atomic_swap_long': ./machine/atomic.h:803: error: expected ')' before 'u_int' cc1: warnings being treated as errors ./machine/atomic.h:803: warning: type defaults to 'int' in declaration of 'type name' ./machine/atomic.h:803: error: 'u_int' undeclared (first use in this function) ./machine/atomic.h:803: error: (Each undeclared identifier is reported only once ./machine/atomic.h:803: error: for each function it appears in.) ./machine/atomic.h:803: error: expected expression before ')' token ./machine/atomic.h:803: warning: passing argument 1 of 'atomic_fcmpset_32' makes pointer from integer without a cast ./machine/atomic.h: In function 'atomic_swap_ptr': ./machine/atomic.h:815: error: expected ')' before 'u_int' ./machine/atomic.h:815: warning: type defaults to 'int' in declaration of 'type name' ./machine/atomic.h:815: error: 'u_int' undeclared (first use in this function) ./machine/atomic.h:815: error: expected expression before ')' token ./machine/atomic.h:815: warning: passing argument 1 of 'atomic_fcmpset_32' makes pointer from integer without a cast --- bcm_machdep.o ---
head/sys/mips/include/atomic.h | ||
---|---|---|
803 | This seems wrong: long is 64 bytes on MIPS64. |
head/sys/mips/include/atomic.h | ||
---|---|---|
803 | I'll fix. |
head/sys/mips/include/atomic.h | ||
---|---|---|
782 | This still isn't defined on 32-bit mips then, is it? |
head/sys/mips/include/atomic.h | ||
---|---|---|
782 | I guess someone with MIPS platform knowledge will need to fix this. |
head/sys/mips/include/atomic.h | ||
---|---|---|
782 | I can fix it... |