OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [isoinfra/] [current/] [include/] [mqueue.h] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
#ifndef CYGONCE_ISO_MQUEUE_H
2
#define CYGONCE_ISO_MQUEUE_H
3
/*========================================================================
4
//
5
//      mqueue.h
6
//
7
//      POSIX message queue functions
8
//
9
//========================================================================
10
// ####ECOSGPLCOPYRIGHTBEGIN####
11
// -------------------------------------------
12
// This file is part of eCos, the Embedded Configurable Operating System.
13
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
14
//
15
// eCos is free software; you can redistribute it and/or modify it under
16
// the terms of the GNU General Public License as published by the Free
17
// Software Foundation; either version 2 or (at your option) any later
18
// version.
19
//
20
// eCos is distributed in the hope that it will be useful, but WITHOUT
21
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
22
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
23
// for more details.
24
//
25
// You should have received a copy of the GNU General Public License
26
// along with eCos; if not, write to the Free Software Foundation, Inc.,
27
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
28
//
29
// As a special exception, if other files instantiate templates or use
30
// macros or inline functions from this file, or you compile this file
31
// and link it with other works to produce a work based on this file,
32
// this file does not by itself cause the resulting work to be covered by
33
// the GNU General Public License. However the source code for this file
34
// must still be made available in accordance with section (3) of the GNU
35
// General Public License v2.
36
//
37
// This exception does not invalidate any other reasons why a work based
38
// on this file might be covered by the GNU General Public License.
39
// -------------------------------------------
40
// ####ECOSGPLCOPYRIGHTEND####
41
//========================================================================
42
//#####DESCRIPTIONBEGIN####
43
//
44
// Author(s):     jlarmour
45
// Contributors:
46
// Date:          2000-05-05
47
// Purpose:       This file provides the macros, types and functions
48
//                for message queues required by POSIX 1003.1.
49
// Description:   The real contents of this file get set from the
50
//                configuration (set by the implementation)
51
// Usage:         #include <mqueue.h>
52
//
53
//####DESCRIPTIONEND####
54
//
55
//======================================================================
56
*/
57
 
58
/* CONFIGURATION */
59
 
60
#include <pkgconf/isoinfra.h>          /* Configuration header */
61
#include <pkgconf/kernel.h>            /* CYGFUN_KERNEL_THREADS_TIMER */
62
 
63
/* INCLUDES */
64
 
65
#ifdef _POSIX_MESSAGE_PASSING
66
# ifdef CYGBLD_ISO_MQUEUE_HEADER
67
#  include CYGBLD_ISO_MQUEUE_HEADER
68
# else
69
 
70
#include <sys/types.h>  /* size_t and ssize_t */
71
 
72
/* TYPES */
73
 
74
struct mq_attr {
75
    long mq_flags;    /* mqueue flags */
76
    long mq_maxmsg;   /* max number of messages */
77
    long mq_msgsize;  /* max message size */
78
    long mq_curmsgs;  /* number of messages currently queued */
79
};
80
 
81
typedef void *mqd_t;
82
 
83
#ifdef __cplusplus
84
extern "C" {
85
#endif
86
 
87
/* FUNCTIONS */
88
 
89
extern mqd_t
90
mq_open( const char * /* name */, int /* oflag */, ... );
91
 
92
extern int
93
mq_close( mqd_t /* mqdes */ );
94
 
95
extern int
96
mq_unlink( const char * /* name */ );
97
 
98
extern int
99
mq_send( mqd_t /* mqdes */, const char * /* msg_ptr */, size_t /* msg_len */,
100
         unsigned int /* msg_prio */ );
101
 
102
extern ssize_t
103
mq_receive( mqd_t /* mqdes */, char * /* msg_ptr */, size_t /* msg_len */,
104
            unsigned int * /* msg_prio */ );
105
 
106
#ifdef _POSIX_REALTIME_SIGNALS
107
 
108
struct sigevent;
109
 
110
extern int
111
mq_notify( mqd_t /* mqdes */, const struct sigevent * /* notification */ );
112
#endif
113
 
114
extern int
115
mq_setattr( mqd_t /* mqdes */, const struct mq_attr * /* mqstat */,
116
            struct mq_attr * /* omqstat */ );
117
 
118
extern int
119
mq_getattr( mqd_t /* mqdes */, struct mq_attr * /* mqstat */ );
120
 
121
# ifdef CYGFUN_KERNEL_THREADS_TIMER
122
/* POSIX 1003.1d Draft functions - FIXME: should be conditionalized */
123
 
124
struct timespec; /* forward declaration */
125
 
126
extern int
127
mq_timedsend( mqd_t /* mqdes */, const char * /* msg_ptr */,
128
              size_t /* msg_len */, unsigned int /* msg_prio */,
129
              const struct timespec * /* abs_timeout */ );
130
 
131
extern ssize_t
132
mq_timedreceive( mqd_t /* mqdes */, char * /* msg_ptr */,
133
                 size_t /* msg_len */, unsigned int * /* msg_prio */,
134
                 const struct timespec * /* abs_timeout */ );
135
# endif
136
 
137
#ifdef __cplusplus
138
}   /* extern "C" */
139
#endif
140
 
141
 
142
# endif  /* ifndef CYGBLD_ISO_MQUEUE_HEADER */
143
#endif   /* ifdef _POSIX_MESSAGE_PASSING */
144
 
145
 
146
#endif /* CYGONCE_ISO_MQUEUE_H multiple inclusion protection */
147
 
148
/* EOF mqueue.h */

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.