Passing union parms as const upsets ZDS-II compiler
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@547 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
544a21b80c
commit
0a32f4d20b
6 changed files with 78 additions and 81 deletions
|
@ -3280,7 +3280,7 @@ the unblocked signal is ignored.
|
|||
<b>Function Prototype:</b>
|
||||
<pre>
|
||||
#include <signal.h>
|
||||
int sigqueue (int tid, int signo, const union sigval value);
|
||||
int sigqueue (int tid, int signo, union sigval value);
|
||||
</pre>
|
||||
|
||||
<p>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
############################################################################
|
||||
# configs/z16f2800100zcog/Make.defs
|
||||
# configs/z16f2800100zcog/ostest/Make.defs
|
||||
#
|
||||
# Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
@ -122,7 +122,7 @@ EXEEXT = .hex
|
|||
|
||||
define COMPILE
|
||||
@echo "CC: $1"
|
||||
@$(CC) $(CFLAGS) $1
|
||||
@$(CC) $(CFLAGS) $1 1>/dev/null
|
||||
endef
|
||||
|
||||
define ASSEMBLE
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/********************************************************************************
|
||||
* signal.h
|
||||
* include/signal.h
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
|
@ -190,7 +190,7 @@ EXTERN int sigwaitinfo(const sigset_t *set, struct siginfo *value);
|
|||
EXTERN int sigtimedwait(const sigset_t *set, struct siginfo *value,
|
||||
const struct timespec *timeout);
|
||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
||||
EXTERN int sigqueue(int pid, int signo, const union sigval value);
|
||||
EXTERN int sigqueue(int pid, int signo, union sigval value);
|
||||
#else
|
||||
EXTERN int sigqueue(int pid, int signo, FAR void *sival_ptr);
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/************************************************************
|
||||
* sig_internal.h
|
||||
/****************************************************************************
|
||||
* sched/sig_internal.h
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -14,7 +14,7 @@
|
|||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
|
@ -31,26 +31,26 @@
|
|||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __SIG_INTERNAL_H
|
||||
#define __SIG_INTERNAL_H
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/compiler.h>
|
||||
#include <queue.h>
|
||||
#include <sched.h>
|
||||
#include <nuttx/kmalloc.h>
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* The following definition determines the number of signal
|
||||
* structures to allocate in a block
|
||||
/* The following definition determines the number of signal structures to
|
||||
* allocate in a block
|
||||
*/
|
||||
|
||||
#define NUM_SIGNAL_ACTIONS 16
|
||||
|
@ -59,9 +59,9 @@
|
|||
#define NUM_SIGNALS_PENDING 16
|
||||
#define NUM_INT_SIGNALS_PENDING 8
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Public Type Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
enum sigalloc_e
|
||||
{
|
||||
|
@ -113,47 +113,45 @@ struct sigq_s
|
|||
};
|
||||
typedef struct sigq_s sigq_t;
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* The g_sigfreeaction data structure is a list of available
|
||||
* signal action structures.
|
||||
/* The g_sigfreeaction data structure is a list of available signal action
|
||||
* structures.
|
||||
*/
|
||||
|
||||
extern sq_queue_t g_sigfreeaction;
|
||||
|
||||
/* The g_sigpendingaction data structure is a list of available
|
||||
* pending signal action structures.
|
||||
/* The g_sigpendingaction data structure is a list of available pending
|
||||
* signal action structures.
|
||||
*/
|
||||
|
||||
extern sq_queue_t g_sigpendingaction;
|
||||
|
||||
/* The g_sigpendingirqaction is a list of available
|
||||
* pending signal actions that are reserved for use by
|
||||
* interrupt handlers.
|
||||
/* The g_sigpendingirqaction is a list of available pending signal actions
|
||||
* that are reserved for use by interrupt handlers.
|
||||
*/
|
||||
|
||||
extern sq_queue_t g_sigpendingirqaction;
|
||||
|
||||
/* The g_sigpendingsignal data structure is a list of
|
||||
* available pending signal structures.
|
||||
/* The g_sigpendingsignal data structure is a list of available pending
|
||||
* signal structures.
|
||||
*/
|
||||
|
||||
extern sq_queue_t g_sigpendingsignal;
|
||||
|
||||
/* The g_sigpendingirqsignal data structure is a list
|
||||
* of available pending signal structures that are reserved
|
||||
* for use by interrupt handlers.
|
||||
/* The g_sigpendingirqsignal data structure is a list of available pending
|
||||
* signal structures that are reserved for use by interrupt handlers.
|
||||
*/
|
||||
|
||||
extern sq_queue_t g_sigpendingirqsignal;
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/* Internal signal-related interfaces ***********************/
|
||||
/* Internal signal-related interfaces ***************************************/
|
||||
|
||||
/* sig_intialize.c */
|
||||
|
||||
|
@ -176,8 +174,7 @@ extern void sig_deliver(FAR _TCB *stcb);
|
|||
extern FAR sigactq_t *sig_findaction(FAR _TCB *stcb, int signo);
|
||||
extern int sig_lowest(sigset_t *set);
|
||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
||||
extern int sig_mqnotempty(int tid, int signo,
|
||||
const union sigval value);
|
||||
extern int sig_mqnotempty(int tid, int signo, union sigval value);
|
||||
#else
|
||||
extern int sig_mqnotempty(int tid, int signo,
|
||||
void *sival_ptr);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/************************************************************
|
||||
* sig_mqnotempty.c
|
||||
/****************************************************************************
|
||||
* sched/sig_mqnotempty.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -14,7 +14,7 @@
|
|||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
|
@ -31,11 +31,11 @@
|
|||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/compiler.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -45,31 +45,31 @@
|
|||
#include "os_internal.h"
|
||||
#include "sig_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Functionss
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Function: sig_mqnotempty
|
||||
*
|
||||
* Description:
|
||||
|
@ -79,10 +79,10 @@
|
|||
* sigqueue(), except that it sets the si_code field in
|
||||
* the siginfo structure to SI_MESGQ rather than SI_QUEUE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
||||
int sig_mqnotempty (int pid, int signo, const union sigval value)
|
||||
int sig_mqnotempty (int pid, int signo, union sigval value)
|
||||
#else
|
||||
int sig_mqnotempty (int pid, int signo, void *sival_ptr)
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/************************************************************
|
||||
* sig_queue.c
|
||||
/****************************************************************************
|
||||
* sched/sig_queue.c
|
||||
*
|
||||
* Copyright (C) 2007 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -14,7 +14,7 @@
|
|||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name Gregory Nutt nor the names of its contributors may be
|
||||
* 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.
|
||||
*
|
||||
|
@ -31,11 +31,11 @@
|
|||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
|
@ -47,31 +47,31 @@
|
|||
#include "os_internal.h"
|
||||
#include "sig_internal.h"
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Type Declarations
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Global Variables
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Variables
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
/************************************************************
|
||||
/****************************************************************************
|
||||
* Function: sigqueue
|
||||
*
|
||||
* Description:
|
||||
|
@ -105,10 +105,10 @@
|
|||
*
|
||||
* Assumptions:
|
||||
*
|
||||
************************************************************/
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_CAN_PASS_STRUCTS
|
||||
int sigqueue (int pid, int signo, const union sigval value)
|
||||
int sigqueue (int pid, int signo, union sigval value)
|
||||
#else
|
||||
int sigqueue(int pid, int signo, void *sival_ptr)
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue