Move POSIX message queue files from sched/ to sched/mqueue

This commit is contained in:
Gregory Nutt 2014-08-08 12:31:23 -06:00
parent b1f10adf5a
commit 08879ca34c
25 changed files with 103 additions and 63 deletions

View File

@ -35,6 +35,9 @@
-include $(TOPDIR)/Make.defs
VPATH =
DEPPATH = --dep-path .
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
@ -142,19 +145,6 @@ SIGNAL_SRCS += sig_removependingsignal.c sig_releasependingsignal.c sig_lowest.c
SIGNAL_SRCS += sig_mqnotempty.c sig_cleanup.c sig_dispatch.c sig_deliver.c
SIGNAL_SRCS += pause.c
MQUEUE_SRCS = mq_open.c mq_close.c mq_unlink.c mq_send.c mq_timedsend.c
MQUEUE_SRCS += mq_sndinternal.c mq_receive.c mq_timedreceive.c mq_rcvinternal.c
MQUEUE_SRCS += mq_initialize.c mq_descreate.c mq_findnamed.c mq_msgfree.c
MQUEUE_SRCS += mq_msgqfree.c mq_release.c mq_recover.c
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
MQUEUE_SRCS += mq_waitirq.c
endif
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
MQUEUE_SRCS += mq_notify.c
endif
PTHREAD_SRCS = pthread_create.c pthread_exit.c pthread_join.c pthread_detach.c
PTHREAD_SRCS += pthread_yield.c pthread_getschedparam.c pthread_setschedparam.c
PTHREAD_SRCS += pthread_mutexinit.c pthread_mutexdestroy.c
@ -193,9 +183,11 @@ endif
IRQ_SRCS = irq_initialize.c irq_attach.c irq_dispatch.c irq_unexpectedisr.c
include mqueue/Make.defs
CSRCS = $(MISC_SRCS) $(TSK_SRCS) $(GRP_SRCS) $(SCHED_SRCS) $(WDOG_SRCS)
CSRCS += $(TIME_SRCS) $(SEM_SRCS) $(TIMER_SRCS) $(PGFILL_SRCS)
CSRCS += $(IRQ_SRCS) $(CLOCK_SRCS)
CSRCS += $(IRQ_SRCS) $(CLOCK_SRCS) $(MQUEUE_SRCS)
ifneq ($(CONFIG_DISABLE_PTHREAD),y)
CSRCS += $(PTHREAD_SRCS)
@ -205,10 +197,6 @@ ifneq ($(CONFIG_DISABLE_SIGNALS),y)
CSRCS += $(SIGNAL_SRCS)
endif
ifneq ($(CONFIG_DISABLE_MQUEUE),y)
CSRCS += $(MQUEUE_SRCS)
endif
ifneq ($(CONFIG_DISABLE_ENVIRON),y)
CSRCS += $(ENV_SRCS)
endif
@ -233,7 +221,7 @@ $(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))
.depend: Makefile $(SRCS)
$(Q) $(MKDEP) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) touch $@
depend: .depend

View File

@ -51,7 +51,7 @@
#include "env_internal.h"
#include "sig_internal.h"
#include "pthread_internal.h"
#include "mq_internal.h"
#include "mqueue/mqueue.h"
#include "group_internal.h"
#ifdef HAVE_TASK_GROUP

52
sched/mqueue/Make.defs Normal file
View File

@ -0,0 +1,52 @@
############################################################################
# sched/mqueue/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.
#
############################################################################
ifneq ($(CONFIG_DISABLE_MQUEUE),y)
MQUEUE_SRCS = mq_open.c mq_close.c mq_unlink.c mq_send.c mq_timedsend.c
MQUEUE_SRCS += mq_sndinternal.c mq_receive.c mq_timedreceive.c mq_rcvinternal.c
MQUEUE_SRCS += mq_initialize.c mq_descreate.c mq_findnamed.c mq_msgfree.c
MQUEUE_SRCS += mq_msgqfree.c mq_release.c mq_recover.c
ifneq ($(CONFIG_DISABLE_SIGNALS),y)
MQUEUE_SRCS += mq_waitirq.c mq_notify.c
endif
# Include mq build support
DEPPATH += --dep-path mqueue
VPATH += :mqueue
endif

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/mq_close.c
* sched/mqueue/mq_close.c
*
* Copyright (C) 2007, 2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -44,7 +44,7 @@
#include <assert.h>
#include "os_internal.h"
#include "mq_internal.h"
#include "mqueue/mqueue.h"
/****************************************************************************
* Definitions

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/mq_descreate.c
* sched/mqueue/mq_descreate.c
*
* Copyright (C) 2007-2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -54,7 +54,7 @@
#include "os_internal.h"
#include "sig_internal.h"
#include "mq_internal.h"
#include "mqueue/mqueue.h"
/****************************************************************************
* Definitions

View File

@ -1,5 +1,5 @@
/************************************************************************
* sched/mq_findnamed.c
* sched/mqueue/mq_findnamed.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -41,7 +41,7 @@
#include <string.h>
#include "mq_internal.h"
#include "mqueue/mqueue.h"
/************************************************************************
* Definitions

View File

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

View File

@ -1,5 +1,5 @@
/************************************************************************
* sched/mq_msgfree.c
* sched/mqueue/mq_msgfree.c
*
* Copyright (C) 2007, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -42,7 +42,7 @@
#include <queue.h>
#include <nuttx/arch.h>
#include "os_internal.h"
#include "mq_internal.h"
#include "mqueue/mqueue.h"
/************************************************************************
* Definitions

View File

@ -1,5 +1,5 @@
/************************************************************************
* sched/mq_msgqfree.c
* sched/mqueue/mq_msgqfree.c
*
* Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -41,7 +41,7 @@
#include <debug.h>
#include <nuttx/kmalloc.h>
#include "mq_internal.h"
#include "mqueue/mqueue.h"
/************************************************************************
* Definitions

View File

@ -1,5 +1,5 @@
/************************************************************************
* sched/mq_notify.c
* sched/mqueue/mq_notify.c
*
* Copyright (C) 2007, 2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -45,7 +45,7 @@
#include <errno.h>
#include "os_internal.h"
#include "mq_internal.h"
#include "mqueue/mqueue.h"
/************************************************************************
* Definitions

View File

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

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/mq_rcvinternal.c
* sched/mqueue/mq_rcvinternal.c
*
* Copyright (C) 2007, 2008, 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -51,7 +51,7 @@
#include <nuttx/arch.h>
#include "os_internal.h"
#include "mq_internal.h"
#include "mqueue/mqueue.h"
/****************************************************************************
* Definitions

View File

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

View File

@ -1,5 +1,5 @@
/************************************************************************
* sched/mq_recover.c
* sched/mqueue/mq_recover.c
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -44,7 +44,7 @@
#include <nuttx/mqueue.h>
#include <nuttx/sched.h>
#include "mq_internal.h"
#include "mqueue/mqueue.h"
/************************************************************************
* Definitions

View File

@ -1,5 +1,5 @@
/************************************************************************
* sched/mq_release.c
* sched/mqueue/mq_release.c
*
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -41,7 +41,7 @@
#include <string.h>
#include "mq_internal.h"
#include "mqueue/mqueue.h"
/************************************************************************
* Definitions

View File

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

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/mq_send.c
* sched/mqueue/mq_send.c
*
* Copyright (C) 2007, 2009, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -55,7 +55,7 @@
#ifndef CONFIG_DISABLE_SIGNALS
# include "sig_internal.h"
#endif
#include "mq_internal.h"
#include "mqueue/mqueue.h"
/****************************************************************************
* Definitions

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/mq_timedreceive.c
* sched/mqueue/mq_timedreceive.c
*
* Copyright (C) 2007-2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -52,7 +52,7 @@
#include "os_internal.h"
#include "clock_internal.h"
#include "mq_internal.h"
#include "mqueue/mqueue.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -1,5 +1,5 @@
/****************************************************************************
* sched/mq_timedsend.c
* sched/mqueue/mq_timedsend.c
*
* Copyright (C) 2007-2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -51,7 +51,7 @@
#include "clock_internal.h"
#include "os_internal.h"
#include "mq_internal.h"
#include "mqueue/mqueue.h"
/****************************************************************************
* Pre-processor Definitions

View File

@ -44,7 +44,7 @@
#include <sched.h>
#include "os_internal.h"
#include "mq_internal.h"
#include "mqueue/mqueue.h"
/************************************************************************
* Pre-processor Definitions

View File

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

View File

@ -1,7 +1,7 @@
/****************************************************************************
* sched/mq_internal.h
* sched/mqueue/mqueue.h
*
* Copyright (C) 2007, 2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2009, 2011, 2013-2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -33,8 +33,8 @@
*
****************************************************************************/
#ifndef __SCHED_MQ_INTERNAL_H
#define __SCHED_MQ_INTERNAL_H
#ifndef __SCHED_MQUEUE_MQUEUE_H
#define __SCHED_MQUEUE_MQUEUE_H
/****************************************************************************
* Included Files
@ -187,5 +187,5 @@ void mq_recover(FAR struct tcb_s *tcb);
#endif
#endif /* CONFIG_MQ_MAXMSGSIZE > 0 */
#endif /* __SCHED_MQ_INTERNAL_H */
#endif /* __SCHED_MQUEUE_MQUEUE_H */

View File

@ -56,7 +56,7 @@
#include "wd_internal.h"
#include "sem_internal.h"
#ifndef CONFIG_DISABLE_MQUEUE
# include "mq_internal.h"
# include "mqueue/mqueue.h"
#endif
#ifndef CONFIG_DISABLE_PTHREAD
# include "pthread_internal.h"

View File

@ -52,7 +52,7 @@
#include "group_internal.h"
#include "sem_internal.h"
#include "sig_internal.h"
#include "mq_internal.h"
#include "mqueue/mqueue.h"
/****************************************************************************
* Definitions

View File

@ -45,7 +45,7 @@
#include <nuttx/sched.h>
#include "os_internal.h"
#include "mq_internal.h"
#include "mqueue/mqueue.h"
/****************************************************************************
* Definitions