mqueue.h revision 1.1
11.1Srmind/* $NetBSD: mqueue.h,v 1.1 2007/09/07 18:56:05 rmind Exp $ */ 21.1Srmind 31.1Srmind/* 41.1Srmind * Copyright (c) 2007, Mindaugas Rasiukevicius <rmind at NetBSD org> 51.1Srmind * 61.1Srmind * Redistribution and use in source and binary forms, with or without 71.1Srmind * modification, are permitted provided that the following conditions 81.1Srmind * are met: 91.1Srmind * 1. Redistributions of source code must retain the above copyright 101.1Srmind * notice, this list of conditions and the following disclaimer. 111.1Srmind * 2. Redistributions in binary form must reproduce the above copyright 121.1Srmind * notice, this list of conditions and the following disclaimer in the 131.1Srmind * documentation and/or other materials provided with the distribution. 141.1Srmind * 151.1Srmind * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 161.1Srmind * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 171.1Srmind * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 181.1Srmind * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 191.1Srmind * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 201.1Srmind * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 211.1Srmind * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 221.1Srmind * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 231.1Srmind * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 241.1Srmind * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 251.1Srmind * POSSIBILITY OF SUCH DAMAGE. 261.1Srmind */ 271.1Srmind 281.1Srmind#ifndef _MQUEUE_H_ 291.1Srmind#define _MQUEUE_H_ 301.1Srmind 311.1Srmind#include <fcntl.h> 321.1Srmind#include <signal.h> 331.1Srmind#include <time.h> 341.1Srmind 351.1Srmind#include <sys/cdefs.h> 361.1Srmind#include <sys/types.h> 371.1Srmind 381.1Srmind#include <sys/mqueue.h> 391.1Srmind 401.1Srmind__BEGIN_DECLS 411.1Srmindint mq_close(mqd_t); 421.1Srmindint mq_getattr(mqd_t, struct mq_attr *); 431.1Srmindint mq_notify(mqd_t, const struct sigevent *); 441.1Srmindmqd_t mq_open(const char *, int, ...); 451.1Srmindssize_t mq_receive(mqd_t, char *, size_t, unsigned *); 461.1Srmindint mq_send(mqd_t, const char *, size_t, unsigned); 471.1Srmindint mq_setattr(mqd_t, const struct mq_attr * __restrict, 481.1Srmind struct mq_attr * __restrict); 491.1Srmindssize_t mq_timedreceive(mqd_t, char * __restrict, size_t, 501.1Srmind unsigned * __restrict, 511.1Srmind const struct timespec * __restrict); 521.1Srmindint mq_timedsend(mqd_t, const char *, size_t, unsigned, 531.1Srmind const struct timespec *); 541.1Srmindint mq_unlink(const char *); 551.1Srmind__END_DECLS 561.1Srmind 571.1Srmind#endif /* _MQUEUE_H_ */ 58