diff --git a/arch/arm/src/tiva/tiva_gpioirq.c b/arch/arm/src/tiva/tiva_gpioirq.c index f7d6c0b1528..1a284a2f7a4 100644 --- a/arch/arm/src/tiva/tiva_gpioirq.c +++ b/arch/arm/src/tiva/tiva_gpioirq.c @@ -48,7 +48,7 @@ #include "up_arch.h" #include "os_internal.h" -#include "irq_internal.h" +#include "irq/irq.h" #include "tiva_gpio.h" diff --git a/arch/avr/src/at32uc3/at32uc3_gpioirq.c b/arch/avr/src/at32uc3/at32uc3_gpioirq.c index d0442babccc..38dc93132de 100644 --- a/arch/avr/src/at32uc3/at32uc3_gpioirq.c +++ b/arch/avr/src/at32uc3/at32uc3_gpioirq.c @@ -51,7 +51,7 @@ #include "up_arch.h" #include "os_internal.h" -#include "irq_internal.h" +#include "irq/irq.h" #include "at32uc3_internal.h" #include "at32uc3_gpio.h" diff --git a/sched/Makefile b/sched/Makefile index 9e862c3d683..cc2d1f3e8e7 100644 --- a/sched/Makefile +++ b/sched/Makefile @@ -123,8 +123,7 @@ ifeq ($(CONFIG_PAGING),y) PGFILL_SRCS = pg_miss.c pg_worker.c endif -IRQ_SRCS = irq_initialize.c irq_attach.c irq_dispatch.c irq_unexpectedisr.c - +include irq/Make.defs include group/Make.defs include wdog/Make.defs include semaphore/Make.defs @@ -134,9 +133,8 @@ include mqueue/Make.defs include environ/Make.defs CSRCS = $(MISC_SRCS) $(TSK_SRCS) $(SCHED_SRCS) -CSRCS += $(TIME_SRCS) $(TIMER_SRCS) $(PGFILL_SRCS) -CSRCS += $(IRQ_SRCS) $(CLOCK_SRCS) -CSRCS += $(GRP_SRCS) $(WDOG_SRCS) $(SEM_SRCS) $(SIGNAL_SRCS) $(PTHREAD_SRCS) $(MQUEUE_SRCS) $(ENV_SRCS) +CSRCS += $(TIME_SRCS) $(TIMER_SRCS) $(PGFILL_SRCS) $(CLOCK_SRCS) +CSRCS += $(IRQ_SRCS) $(GRP_SRCS) $(WDOG_SRCS) $(SEM_SRCS) $(SIGNAL_SRCS) $(PTHREAD_SRCS) $(MQUEUE_SRCS) $(ENV_SRCS) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/sched/irq/Make.defs b/sched/irq/Make.defs new file mode 100644 index 00000000000..717e336689e --- /dev/null +++ b/sched/irq/Make.defs @@ -0,0 +1,41 @@ +############################################################################ +# sched/irq/Make.defs +# +# Copyright (C) 2014 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +IRQ_SRCS = irq_initialize.c irq_attach.c irq_dispatch.c irq_unexpectedisr.c + +# Include irq build support + +DEPPATH += --dep-path irq +VPATH += :irq diff --git a/sched/irq_internal.h b/sched/irq/irq.h similarity index 93% rename from sched/irq_internal.h rename to sched/irq/irq.h index ab576c171c3..eee96b54d1a 100644 --- a/sched/irq_internal.h +++ b/sched/irq/irq.h @@ -1,7 +1,7 @@ /**************************************************************************** - * sched/irq_internal.h + * sched/irq/irq.h * - * Copyright (C) 2007, 2008, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2008, 2013-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __SCHED_IRQ_INTERNAL_H -#define __SCHED_IRQ_INTERNAL_H +#ifndef __SCHED_IRQ_IRQ_H +#define __SCHED_IRQ_IRQ_H /**************************************************************************** * Included Files @@ -80,5 +80,5 @@ int irq_unexpected_isr(int irq, FAR void *context); } #endif -#endif /* __SCHED_IRQ_INTERNAL_H */ +#endif /* __SCHED_IRQ_IRQ_H */ diff --git a/sched/irq_attach.c b/sched/irq/irq_attach.c similarity index 99% rename from sched/irq_attach.c rename to sched/irq/irq_attach.c index bf272f469cc..e7142e865a8 100644 --- a/sched/irq_attach.c +++ b/sched/irq/irq_attach.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/irq_attach.c + * sched/irq/irq_attach.c * * Copyright (C) 2007-2008, 2010, 2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -41,7 +41,7 @@ #include -#include "irq_internal.h" +#include "irq/irq.h" /**************************************************************************** * Definitions diff --git a/sched/irq_dispatch.c b/sched/irq/irq_dispatch.c similarity index 98% rename from sched/irq_dispatch.c rename to sched/irq/irq_dispatch.c index 1c39f59d135..b46a3590ba5 100644 --- a/sched/irq_dispatch.c +++ b/sched/irq/irq_dispatch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/irq_dispatch.c + * sched/irq/irq_dispatch.c * * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,7 +43,7 @@ #include #include -#include "irq_internal.h" +#include "irq/irq.h" /**************************************************************************** * Definitions diff --git a/sched/irq_initialize.c b/sched/irq/irq_initialize.c similarity index 98% rename from sched/irq_initialize.c rename to sched/irq/irq_initialize.c index 2053dcb833f..802f13b1a01 100644 --- a/sched/irq_initialize.c +++ b/sched/irq/irq_initialize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/irq_initialize.c + * sched/irq/irq_initialize.c * * Copyright (C) 2007-2008, 2010 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -41,7 +41,7 @@ #include #include -#include "irq_internal.h" +#include "irq/irq.h" /**************************************************************************** * Definitions diff --git a/sched/irq_unexpectedisr.c b/sched/irq/irq_unexpectedisr.c similarity index 98% rename from sched/irq_unexpectedisr.c rename to sched/irq/irq_unexpectedisr.c index e0291b0261e..6d3c6819305 100644 --- a/sched/irq_unexpectedisr.c +++ b/sched/irq/irq_unexpectedisr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * sched/irq_unexpectedisr.c + * sched/irq/irq_unexpectedisr.c * * Copyright (C) 2007-2009, 2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -44,7 +44,7 @@ #include #include "os_internal.h" -#include "irq_internal.h" +#include "irq/irq.h" /**************************************************************************** * Definitions diff --git a/sched/os_start.c b/sched/os_start.c index 4fa096327e3..dc610222b8e 100644 --- a/sched/os_start.c +++ b/sched/os_start.c @@ -63,7 +63,7 @@ #endif #include "clock_internal.h" #include "timer_internal.h" -#include "irq_internal.h" +#include "irq/irq.h" #ifdef HAVE_TASK_GROUP #include "group/group.h" #endif