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

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [conts/] [posix/] [libposix/] [include/] [posix/] [sys/] [msg.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
/* Copyright (C) 1995,1996,1997,1999,2000,2003 Free Software Foundation, Inc.
2
   This file is part of the GNU C Library.
3
 
4
   The GNU C Library is free software; you can redistribute it and/or
5
   modify it under the terms of the GNU Lesser General Public
6
   License as published by the Free Software Foundation; either
7
   version 2.1 of the License, or (at your option) any later version.
8
 
9
   The GNU C Library is distributed in the hope that it will be useful,
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12
   Lesser General Public License for more details.
13
 
14
   You should have received a copy of the GNU Lesser General Public
15
   License along with the GNU C Library; if not, write to the Free
16
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17
   02111-1307 USA.  */
18
 
19
#ifndef _SYS_MSG_H
20
#define _SYS_MSG_H
21
 
22
#include <features.h>
23
 
24
/* Get common definition of System V style IPC.  */
25
#include <sys/ipc.h>
26
 
27
/* Get system dependent definition of `struct msqid_ds' and more.  */
28
#include <bits/msq.h>
29
 
30
/* Define types required by the standard.  */
31
#define __need_time_t
32
#include <time.h>
33
 
34
#ifndef __pid_t_defined
35
typedef __pid_t pid_t;
36
# define __pid_t_defined
37
#endif
38
 
39
#ifndef __ssize_t_defined
40
typedef __ssize_t ssize_t;
41
# define __ssize_t_defined
42
#endif
43
 
44
/* The following System V style IPC functions implement a message queue
45
   system.  The definition is found in XPG2.  */
46
 
47
#ifdef __USE_GNU
48
/* Template for struct to be used as argument for `msgsnd' and `msgrcv'.  */
49
struct msgbuf
50
  {
51
    long int mtype;             /* type of received/sent message */
52
    char mtext[1];              /* text of the message */
53
  };
54
#endif
55
 
56
 
57
__BEGIN_DECLS
58
 
59
/* Message queue control operation.  */
60
extern int msgctl (int __msqid, int __cmd, struct msqid_ds *__buf) __THROW;
61
 
62
/* Get messages queue.  */
63
extern int msgget (key_t __key, int __msgflg) __THROW;
64
 
65
/* Receive message from message queue.
66
 
67
   This function is a cancellation point and therefore not marked with
68
   __THROW.  */
69
extern int msgrcv (int __msqid, void *__msgp, size_t __msgsz,
70
                   long int __msgtyp, int __msgflg);
71
 
72
/* Send message to message queue.
73
 
74
   This function is a cancellation point and therefore not marked with
75
   __THROW.  */
76
extern int msgsnd (int __msqid, __const void *__msgp, size_t __msgsz,
77
                   int __msgflg);
78
 
79
__END_DECLS
80
 
81
#endif /* sys/msg.h */

powered by: WebSVN 2.1.0

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