Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch/sparc

On Sat, 19 Oct 2013, matthew green wrote:
Module Name:    src
Committed By:   mrg
Date:           Sat Oct 19 19:40:23 UTC 2013

Modified Files:
        src/sys/arch/sparc/dev: if_ie_obio.c kd.c tctrl.c ts102.c
        src/sys/arch/sparc/include: pmap.h
        src/sys/arch/sparc/sparc: cpuvar.h memecc.c timer.c

Log Message:
- remove unused but set variables.
- use __USE() where necessary.
- remove useless 'volatile' markers

I am not sure that those volatile markers are useless.

For example:

#define raise_ipi(cpi,lvl)      do {                    \
-       volatile int x;                                 \
+       int x;                                          \
        (cpi)->intreg_4m->pi_set = PINTR_SINTRLEV(lvl);   \
-       x = (cpi)->intreg_4m->pi_pend;                    \
+       x = (cpi)->intreg_4m->pi_pend; __USE(x);  \
} while (0)

I think that the change from the use of volatile to the use of __USE() is a change from reliance on the C standard's guarantee that the memory location behind (cpi)->intreg_4m->pi_pend really will be accessed, to a reliance on what a particular compiler happens to do in this situation.

--apb (Alan Barrett)

Home | Main Index | Thread Index | Old Index