What is the purpose of set_vector()?
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Nov 9 14:18:07 UTC 2018
On 09/11/2018 10:09, Sebastian Huber wrote:
> Hello,
>
> the set_vector() seems to be a pretty weird function. What is the
> purpose of it? It is not clear from the implementations. In particular
> set_vector(..., ..., 0) is only used in five spots:
>
> bsps/m68k/csb360/dev/timer.c: set_vector(timerisr, BSP_INTVEC_TMR2,
> 0);
> bsps/m68k/mcf5206elite/dev/timer.c: set_vector(timerisr,
> BSP_INTVEC_TIMER2, 0);
> bsps/m68k/mvme167/btimer/btimer.c: (void) set_vector( timerisr,
> TIMER_VECTOR, 0 );
> bsps/m68k/mvme147/btimer/btimer.c: (void) set_vector(timerisr,
> TIMER_1_VECTOR, 0); /* install ISR */
> bsps/m68k/mvme162/btimer/btimer.c: (void) set_vector( timerisr, VBR0
> * 0x10 + 0x8, 0 );
>
> I think in most cases there is a type mismatch of the handler for type
> 0 and not 0.
>
I get a couple of warnings after the proc_ptr removal:
bfin/bf537Stamp/../../../../../../bsps/shared/start/setvec.c:40:43:
warning: passing argument 2 of '_CPU_ISR_install_raw_handler' from
incompatible pointer type [-Wincompatible-pointer-types]
bfin/eZKit533/../../../../../../bsps/shared/start/setvec.c:40:43:
warning: passing argument 2 of '_CPU_ISR_install_raw_handler' from
incompatible pointer type [-Wincompatible-pointer-types]
bfin/TLL6527M/../../../../../../bsps/shared/start/setvec.c:40:43:
warning: passing argument 2 of '_CPU_ISR_install_raw_handler' from
incompatible pointer type [-Wincompatible-pointer-types]
lm32/lm32_evr/../../../../../../bsps/shared/start/setvec.c:40:43:
warning: passing argument 2 of '_CPU_ISR_install_raw_handler' from
incompatible pointer type [-Wincompatible-pointer-types]
m68k/av5282/../../../../../../bsps/shared/start/setvec.c:40:43: warning:
passing argument 2 of '_CPU_ISR_install_raw_handler' from incompatible
pointer type [-Wincompatible-pointer-types]
m68k/csb360/../../../../../../bsps/shared/start/setvec.c:40:43: warning:
passing argument 2 of '_CPU_ISR_install_raw_handler' from incompatible
pointer type [-Wincompatible-pointer-types]
m68k/gen68340/../../../../../../bsps/shared/start/setvec.c:40:43:
warning: passing argument 2 of '_CPU_ISR_install_raw_handler' from
incompatible pointer type [-Wincompatible-pointer-types]
m68k/gen68360/../../../../../../bsps/shared/start/setvec.c:40:43:
warning: passing argument 2 of '_CPU_ISR_install_raw_handler' from
incompatible pointer type [-Wincompatible-pointer-types]
m68k/genmcf548x/../../../../../../bsps/shared/start/setvec.c:40:43:
warning: passing argument 2 of '_CPU_ISR_install_raw_handler' from
incompatible pointer type [-Wincompatible-pointer-types]
sh/gensh1/../../../../../../bsps/sh/gensh1/btimer/btimer.c:123:56:
warning: passing argument 3 of '_CPU_ISR_install_raw_handler' from
incompatible pointer type [-Wincompatible-pointer-types]
sh/gensh2/../../../../../../bsps/sh/gensh2/btimer/btimer.c:119:56:
warning: passing argument 3 of '_CPU_ISR_install_raw_handler' from
incompatible pointer type [-Wincompatible-pointer-types]
sh/gensh4/../../../../../../bsps/sh/gensh4/btimer/btimer.c:145:59:
warning: passing argument 3 of '_CPU_ISR_install_raw_handler' from
incompatible pointer type [-Wincompatible-pointer-types]
sparc64/niagara/../../../../../../bsps/sparc64/shared/start/setvec.c:40:43:
warning: passing argument 2 of '_CPU_ISR_install_raw_handler' from
incompatible pointer type [-Wincompatible-pointer-types]
sparc64/usiii/../../../../../../bsps/sparc64/shared/start/setvec.c:40:43:
warning: passing argument 2 of '_CPU_ISR_install_raw_handler' from
incompatible pointer type [-Wincompatible-pointer-types]
sparc/erc32/../../../../../../bsps/sparc/erc32/start/setvec.c:46:43:
warning: passing argument 2 of '_CPU_ISR_install_raw_handler' from
incompatible pointer type [-Wincompatible-pointer-types]
sparc/leon2/../../../../../../bsps/sparc/leon2/start/setvec.c:52:43:
warning: passing argument 2 of '_CPU_ISR_install_raw_handler' from
incompatible pointer type [-Wincompatible-pointer-types]
sparc/leon3/../../../../../../bsps/sparc/leon3/start/setvec.c:51:43:
warning: passing argument 2 of '_CPU_ISR_install_raw_handler' from
incompatible pointer type [-Wincompatible-pointer-types]
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the devel
mailing list