mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 05:05:07 +08:00
psxtests: add POSIX API signature compliance tests for mqueue.h file (GCI 2018)
This commit is contained in:
committed by
Joel Sherrill
parent
a9198078a9
commit
93ccf479e2
@@ -1093,7 +1093,17 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \
|
||||
psxhdrs/dirent/rewinddir.c \
|
||||
psxhdrs/dirent/scandir.c \
|
||||
psxhdrs/dirent/seekdir.c \
|
||||
psxhdrs/dirent/telldir.c
|
||||
psxhdrs/dirent/telldir.c \
|
||||
psxhdrs/mqueue/mq_open.c \
|
||||
psxhdrs/mqueue/mq_close.c \
|
||||
psxhdrs/mqueue/mq_getattr.c \
|
||||
psxhdrs/mqueue/mq_setattr.c \
|
||||
psxhdrs/mqueue/mq_notify.c \
|
||||
psxhdrs/mqueue/mq_receive.c \
|
||||
psxhdrs/mqueue/mq_send.c \
|
||||
psxhdrs/mqueue/mq_timedreceive.c \
|
||||
psxhdrs/mqueue/mq_timedsend.c \
|
||||
psxhdrs/mqueue/mq_unlink.c
|
||||
endif
|
||||
|
||||
rtems_tests_PROGRAMS = $(psx_tests)
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief mq_close() API Conformance Test
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 2018.
|
||||
* Himanshu Sekhar Nayak
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software
|
||||
* for any purpose with or without fee is hereby granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <mqueue.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
#define MQ_MAXMSG 1
|
||||
#define MQ_MSGSIZE sizeof(int)
|
||||
|
||||
int test( void )
|
||||
{
|
||||
mqd_t mqdes;
|
||||
struct mq_attr mqstat;
|
||||
const char *q_name;
|
||||
int result;
|
||||
|
||||
mqstat.mq_maxmsg = MQ_MAXMSG;
|
||||
mqstat.mq_msgsize = MQ_MSGSIZE;
|
||||
q_name = "queue";
|
||||
|
||||
mqdes = mq_open( q_name, O_CREAT | O_RDWR, 0x777, &mqstat );
|
||||
result = mq_close( mqdes );
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief mq_getattr() API Conformance Test
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 2018.
|
||||
* Himanshu Sekhar Nayak
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software
|
||||
* for any purpose with or without fee is hereby granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <mqueue.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
#define MQ_MAXMSG 1
|
||||
#define MQ_MSGSIZE sizeof(int)
|
||||
|
||||
int test( void )
|
||||
{
|
||||
mqd_t mqdes;
|
||||
struct mq_attr mqstat;
|
||||
const char *q_name;
|
||||
int result;
|
||||
|
||||
mqstat.mq_maxmsg = MQ_MAXMSG;
|
||||
mqstat.mq_msgsize = MQ_MSGSIZE;
|
||||
q_name = "queue";
|
||||
|
||||
mqdes = mq_open( q_name, O_CREAT | O_RDWR, 0x777, &mqstat );
|
||||
result = mq_getattr( mqdes, &mqstat );
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief mq_notify() API Conformance Test
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 2018.
|
||||
* Himanshu Sekhar Nayak
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software
|
||||
* for any purpose with or without fee is hereby granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <mqueue.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
#define MQ_MAXMSG 1
|
||||
#define MQ_MSGSIZE sizeof(int)
|
||||
|
||||
int test( void )
|
||||
{
|
||||
mqd_t mqdes;
|
||||
struct mq_attr mqstat;
|
||||
struct sigevent sevp;
|
||||
const char *q_name;
|
||||
int result;
|
||||
|
||||
mqstat.mq_maxmsg = MQ_MAXMSG;
|
||||
mqstat.mq_msgsize = MQ_MSGSIZE;
|
||||
sevp.sigev_notify = SIGEV_SIGNAL;
|
||||
sevp.sigev_signo = SIGUSR1;
|
||||
q_name = "queue";
|
||||
|
||||
mqdes = mq_open( q_name, O_CREAT | O_RDWR, 0x777, &mqstat );
|
||||
result = mq_notify( mqdes, &sevp );
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief mq_open() API Conformance Test
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 2018.
|
||||
* Himanshu Sekhar Nayak
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software
|
||||
* for any purpose with or without fee is hereby granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <mqueue.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
#define MQ_MAXMSG 1
|
||||
#define MQ_MSGSIZE sizeof(int)
|
||||
|
||||
int result = 1;
|
||||
|
||||
int test( void )
|
||||
{
|
||||
mqd_t mqdes;
|
||||
struct mq_attr mqstat;
|
||||
const char *q_name;
|
||||
result = 0;
|
||||
|
||||
mqstat.mq_maxmsg = MQ_MAXMSG;
|
||||
mqstat.mq_msgsize = MQ_MSGSIZE;
|
||||
q_name = "queue";
|
||||
|
||||
mqdes = mq_open( q_name, O_CREAT | O_RDWR, 0x777, &mqstat );
|
||||
(void) mqdes;
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief mq_receive() API Conformance Test
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 2018.
|
||||
* Himanshu Sekhar Nayak
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software
|
||||
* for any purpose with or without fee is hereby granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <mqueue.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
#define MQ_MAXMSG 1
|
||||
#define MQ_MSGSIZE sizeof(int)
|
||||
|
||||
int test( void )
|
||||
{
|
||||
mqd_t mqdes;
|
||||
struct mq_attr mqstat;
|
||||
const char *q_name;
|
||||
int message[MQ_MAXMSG];
|
||||
unsigned int msg_prio;
|
||||
int result;
|
||||
|
||||
mqstat.mq_maxmsg = MQ_MAXMSG;
|
||||
mqstat.mq_msgsize = MQ_MSGSIZE;
|
||||
msg_prio = 1;
|
||||
q_name = "queue";
|
||||
|
||||
mqdes = mq_open( q_name, O_CREAT | O_RDWR, 0x777, &mqstat );
|
||||
result = mq_receive( mqdes, (char *)message, MQ_MSGSIZE, &msg_prio );
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief mq_send() API Conformance Test
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 2018.
|
||||
* Himanshu Sekhar Nayak
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software
|
||||
* for any purpose with or without fee is hereby granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <mqueue.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
#define MQ_MAXMSG 1
|
||||
#define MQ_MSGSIZE sizeof(int)
|
||||
|
||||
int test( void )
|
||||
{
|
||||
mqd_t mqdes;
|
||||
struct mq_attr mqstat;
|
||||
const char *q_name;
|
||||
int msg_ptr;
|
||||
unsigned int msg_prio;
|
||||
int result;
|
||||
|
||||
mqstat.mq_maxmsg = MQ_MAXMSG;
|
||||
mqstat.mq_msgsize = MQ_MSGSIZE;
|
||||
msg_prio = 1;
|
||||
msg_ptr = 9;
|
||||
q_name = "queue";
|
||||
|
||||
mqdes = mq_open( q_name, O_CREAT | O_RDWR, 0x777, &mqstat );
|
||||
result = mq_send( mqdes, (const char *)&msg_ptr, MQ_MSGSIZE, msg_prio );
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief mq_setattr() API Conformance Test
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 2018.
|
||||
* Himanshu Sekhar Nayak
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software
|
||||
* for any purpose with or without fee is hereby granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <mqueue.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
#define MQ_MAXMSG 1
|
||||
#define MQ_MSGSIZE sizeof(int)
|
||||
|
||||
int test( void )
|
||||
{
|
||||
mqd_t mqdes;
|
||||
struct mq_attr mqstat;
|
||||
struct mq_attr *omqstat = NULL;
|
||||
const char *q_name;
|
||||
int result;
|
||||
|
||||
mqstat.mq_maxmsg = MQ_MAXMSG;
|
||||
mqstat.mq_msgsize = MQ_MSGSIZE;
|
||||
q_name = "queue";
|
||||
|
||||
mqdes = mq_open( q_name, O_CREAT | O_RDWR, 0x777, &mqstat );
|
||||
result = mq_setattr( mqdes, &mqstat, omqstat );
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief mq_timedreceive() API Conformance Test
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 2018.
|
||||
* Himanshu Sekhar Nayak
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software
|
||||
* for any purpose with or without fee is hereby granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <time.h>
|
||||
#include <mqueue.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
#define MQ_MAXMSG 1
|
||||
#define MQ_MSGSIZE sizeof(int)
|
||||
|
||||
int test( void )
|
||||
{
|
||||
mqd_t mqdes;
|
||||
struct mq_attr mqstat;
|
||||
const char *q_name;
|
||||
int message[MQ_MAXMSG];
|
||||
struct timespec abs_timeout;
|
||||
unsigned int msg_prio;
|
||||
int result;
|
||||
|
||||
mqstat.mq_maxmsg = MQ_MAXMSG;
|
||||
mqstat.mq_msgsize = MQ_MSGSIZE;
|
||||
abs_timeout.tv_sec = 0;
|
||||
abs_timeout.tv_nsec = 0;
|
||||
msg_prio = 1;
|
||||
q_name = "queue";
|
||||
|
||||
mqdes = mq_open( q_name, O_CREAT | O_RDWR, 0x777, &mqstat );
|
||||
result = mq_timedreceive(
|
||||
mqdes, (char *)message, MQ_MSGSIZE, &msg_prio, &abs_timeout );
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief mq_timedsend() API Conformance Test
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 2018.
|
||||
* Himanshu Sekhar Nayak
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software
|
||||
* for any purpose with or without fee is hereby granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <time.h>
|
||||
#include <mqueue.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
#define MQ_MAXMSG 1
|
||||
#define MQ_MSGSIZE sizeof(int)
|
||||
|
||||
int test( void )
|
||||
{
|
||||
mqd_t mqdes;
|
||||
struct mq_attr mqstat;
|
||||
const char *q_name;
|
||||
struct timespec abs_timeout;
|
||||
unsigned int msg_prio;
|
||||
int msg_ptr;
|
||||
int result;
|
||||
|
||||
mqstat.mq_maxmsg = MQ_MAXMSG;
|
||||
mqstat.mq_msgsize = MQ_MSGSIZE;
|
||||
abs_timeout.tv_sec = 0;
|
||||
abs_timeout.tv_nsec = 1;
|
||||
msg_ptr = 5;
|
||||
msg_prio = 1;
|
||||
q_name = "queue";
|
||||
|
||||
mqdes = mq_open( q_name, O_CREAT | O_RDWR, 0x777, &mqstat );
|
||||
result = mq_timedsend(
|
||||
mqdes, (const char *)&msg_ptr, MQ_MSGSIZE, msg_prio, &abs_timeout);
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief mq_unlink() API Conformance Test
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 2018.
|
||||
* Himanshu Sekhar Nayak
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software
|
||||
* for any purpose with or without fee is hereby granted.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
|
||||
* BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
|
||||
* OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
||||
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <mqueue.h>
|
||||
|
||||
int test( void );
|
||||
|
||||
int test( void )
|
||||
{
|
||||
const char *q_name;
|
||||
int result;
|
||||
|
||||
q_name = "queue";
|
||||
result = mq_unlink( q_name );
|
||||
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user