Move watchdog functions from sched/ to sched/wdog

This commit is contained in:
Gregory Nutt 2014-08-08 14:21:48 -06:00
parent 4ff17b3904
commit 0f318e9249
49 changed files with 101 additions and 61 deletions

View File

@ -100,9 +100,6 @@ ifeq ($(CONFIG_SCHED_CPULOAD),y)
SCHED_SRCS += sched_cpuload.c
endif
WDOG_SRCS = wd_initialize.c wd_create.c wd_start.c wd_cancel.c wd_delete.c
WDOG_SRCS += wd_gettime.c
ifeq ($(CONFIG_SCHED_TICKLESS),y)
TIME_SRCS += sched_timerexpiration.c
else
@ -129,16 +126,17 @@ endif
IRQ_SRCS = irq_initialize.c irq_attach.c irq_dispatch.c irq_unexpectedisr.c
include group/Make.defs
include wdog/Make.defs
include semaphore/Make.defs
include signal/Make.defs
include pthread/Make.defs
include mqueue/Make.defs
include environ/Make.defs
CSRCS = $(MISC_SRCS) $(TSK_SRCS) $(SCHED_SRCS) $(WDOG_SRCS)
CSRCS = $(MISC_SRCS) $(TSK_SRCS) $(SCHED_SRCS)
CSRCS += $(TIME_SRCS) $(TIMER_SRCS) $(PGFILL_SRCS)
CSRCS += $(IRQ_SRCS) $(CLOCK_SRCS)
CSRCS += $(GRP_SRCS) $(SEM_SRCS) $(SIGNAL_SRCS) $(PTHREAD_SRCS) $(MQUEUE_SRCS) $(ENV_SRCS)
CSRCS += $(GRP_SRCS) $(WDOG_SRCS) $(SEM_SRCS) $(SIGNAL_SRCS) $(PTHREAD_SRCS) $(MQUEUE_SRCS) $(ENV_SRCS)
COBJS = $(CSRCS:.c=$(OBJEXT))

View File

@ -1,5 +1,5 @@
/************************************************************************
* sched.mq_unlink.c
* sched/mqueue/mq_unlink.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -53,7 +53,7 @@
#include "os_internal.h"
#include "signal/signal.h"
#include "wd_internal.h"
#include "wdog/wdog.h"
#include "semaphore/semaphore.h"
#ifndef CONFIG_DISABLE_MQUEUE
# include "mqueue/mqueue.h"

View File

@ -1,5 +1,5 @@
/********************************************************************************
* sched/pthread_barriedestroy.c
* sched/pthread/pthread_barriedestroy.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/********************************************************************************
* sched/pthread_barrieinit.c
* sched/pthread/pthread_barrieinit.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/********************************************************************************
* sched/pthread_barrierwait.c
* sched/pthread/pthread_barrierwait.c
*
* Copyright (C) 2007, 2009, 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/**************************************************************************
* sched/pthread_cancel.c
* sched/pthread/pthread_cancel.c
*
* Copyright (C) 2007, 2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/************************************************************************
* sched/pthread_completejoin.c
* sched/pthread/pthread_completejoin.c
*
* Copyright (C) 2007, 2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/pthread_condbroadcast.c
* sched/pthread/pthread_condbroadcast.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/pthread_conddestroy.c
* sched/pthread/pthread_conddestroy.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/pthread_condinit.c
* sched/pthread/pthread_condinit.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/pthread_condsignal.c
* sched/pthread/pthread_condsignal.c
*
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/pthread_condtimedwait.c
* sched/pthread/pthread_condtimedwait.c
*
* Copyright (C) 2007-2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/pthread_condwait.c
* sched/pthread/pthread_condwait.c
*
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/pthread_create.c
* sched/pthread/pthread_create.c
*
* Copyright (C) 2007-2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/************************************************************************
* sched/pthread_detach.c
* sched/pthread/pthread_detach.c
*
* Copyright (C) 2007, 2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/************************************************************************
* sched/pthread_exit.c
* sched/pthread/pthread_exit.c
*
* Copyright (C) 2007, 2009, 2011-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/************************************************************************
* sched/pthread_getspecific.c
* sched/pthread/pthread_getspecific.c
*
* Copyright (C) 2007, 2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/pthread_initialize.c
* sched/pthread/pthread_initialize.c
*
* Copyright (C) 2007-2010, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/pthread_keycreate.c
* sched/pthread/pthread_keycreate.c
*
* Copyright (C) 2007-2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/************************************************************************
* sched/pthread_keydelete.c
* sched/pthread/pthread_keydelete.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/************************************************************************
* sched/pthread_kill.c
* sched/pthread/pthread_kill.c
*
* Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/pthread_mutexdestroy.c
* sched/pthread/pthread_mutexdestroy.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/pthread_mutexinit.c
* sched/pthread/pthread_mutexinit.c
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/pthread_mutexlock.c
* sched/pthread/pthread_mutexlock.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/pthread_mutextrylock.c
* sched/pthread/pthread_mutextrylock.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/pthread_mutexunlock.c
* sched/pthread/pthread_mutexunlock.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/********************************************************************************
* sched/pthread_once.c
* sched/pthread/pthread_once.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/************************************************************************
* sched/pthread_release.c
* sched/pthread/pthread_release.c
*
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/******************************************************************************************
* pthread_setcancelstate.c
* sched/pthread/pthread_setcancelstate.c
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* pthread_setschedparam.c
* sched/pthread/pthread_setschedparam.c
*
* Copyright (C) 2007, 2008, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* pthread_schedsetprio.c
* sched/pthread/pthread_setschedprio.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/pthread_setspecific.c
* sched/pthread/pthread_setspecific.c
*
* Copyright (C) 2007-2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/************************************************************************
* sched/pthread_sigmask.c
* sched/pthread/pthread_sigmask.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/************************************************************************
* sched/pthread_yield.c
* sched/pthread/pthread_yield.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -47,7 +47,7 @@
#endif
#include "os_internal.h"
#include "wd_internal.h"
#include "wdog/wdog.h"
#include "clock_internal.h"
/************************************************************************

View File

@ -50,7 +50,7 @@
#endif
#include "os_internal.h"
#include "wd_internal.h"
#include "wdog/wdog.h"
#include "clock_internal.h"
#ifdef CONFIG_SCHED_TICKLESS

View File

@ -1,5 +1,5 @@
/****************************************************************************
* lib/semaphore/sem_destroy.c
* sched/semaphore/sem_destroy.c
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/************************************************************************
* sem_findnamed.c
* sched/semaphore/sem_findnamed.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* schec/sem_initialize.c
* sched/semaphore/sem_initialize.c
*
* Copyright (C) 2007, 2009, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/pause.c
* sched/signal/sig_pause.c
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

42
sched/wdog/Make.defs Normal file
View File

@ -0,0 +1,42 @@
############################################################################
# sched/wdog/Make.defs
#
# Copyright (C) 2014 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# 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.
#
############################################################################
WDOG_SRCS = wd_initialize.c wd_create.c wd_start.c wd_cancel.c wd_delete.c
WDOG_SRCS += wd_gettime.c
# Include wdog build support
DEPPATH += --dep-path wdog
VPATH += :wdog

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/wd_cancel.c
* sched/wdog/wd_cancel.c
*
* Copyright (C) 2007-2009, 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -45,7 +45,7 @@
#include <nuttx/arch.h>
#include "os_internal.h"
#include "wd_internal.h"
#include "wdog/wdog.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/wd_create.c
* sched/wdog/wd_create.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -45,7 +45,7 @@
#include <nuttx/arch.h>
#include "wd_internal.h"
#include "wdog/wdog.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/wd_delete.c
* sched/wdog/wd_delete.c
*
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -45,7 +45,7 @@
#include <nuttx/arch.h>
#include "wd_internal.h"
#include "wdog/wdog.h"
/****************************************************************************
* Definitions

View File

@ -1,5 +1,5 @@
/********************************************************************************
* sched/wd_gettime.c
* sched/wdog/wd_gettime.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -42,7 +42,7 @@
#include <wdog.h>
#include "os_internal.h"
#include "wd_internal.h"
#include "wdog/wdog.h"
/********************************************************************************
* Definitions

View File

@ -1,5 +1,5 @@
/************************************************************************
* sched/wd_initialize.c
* sched/wdog/wd_initialize.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -43,7 +43,7 @@
#include <nuttx/kmalloc.h>
#include "os_internal.h"
#include "wd_internal.h"
#include "wdog/wdog.h"
/************************************************************************
* Definitions

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/wd_start.c
* sched/wdog/wd_start.c
*
* Copyright (C) 2007-2009, 2012, 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -51,7 +51,7 @@
#include <nuttx/arch.h>
#include "os_internal.h"
#include "wd_internal.h"
#include "wdog/wdog.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -1,5 +1,5 @@
/************************************************************************
* sched/d_internal.h
* sched/wdog/wdog.h
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -33,8 +33,8 @@
*
************************************************************************/
#ifndef __SCHED_WD_INTERNAL_H
#define __SCHED_WD_INTERNAL_H
#ifndef __SCHED_WDOG_WDOG_H
#define __SCHED_WDOG_WDOG_H
/************************************************************************
* Included Files
@ -166,4 +166,4 @@ void wd_timer(void);
}
#endif
#endif /* __SCHED_WD_INTERNAL_H */
#endif /* __SCHED_WDOG_WDOG_H */