Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 331119 | Differences between
and this patch

Collapse All | Expand All

(-)glibc-2.11.2.orig/ports/sysdeps/unix/sysv/linux/hppa/sys/epoll.h (+144 lines)
Line 0 Link Here
1
/* Copyright (C) 2002-2006, 2007, 2008, 2009 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_EPOLL_H
20
#define	_SYS_EPOLL_H	1
21
22
#include <stdint.h>
23
#include <sys/types.h>
24
25
/* Get __sigset_t.  */
26
#include <bits/sigset.h>
27
28
#ifndef __sigset_t_defined
29
# define __sigset_t_defined
30
typedef __sigset_t sigset_t;
31
#endif
32
33
34
/* Flags to be passed to epoll_create1.  */
35
enum
36
  {
37
    EPOLL_CLOEXEC = 010000000,
38
#define EPOLL_CLOEXEC EPOLL_CLOEXEC
39
    EPOLL_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */
40
#define EPOLL_NONBLOCK EPOLL_NONBLOCK
41
  };
42
43
44
enum EPOLL_EVENTS
45
  {
46
    EPOLLIN = 0x001,
47
#define EPOLLIN EPOLLIN
48
    EPOLLPRI = 0x002,
49
#define EPOLLPRI EPOLLPRI
50
    EPOLLOUT = 0x004,
51
#define EPOLLOUT EPOLLOUT
52
    EPOLLRDNORM = 0x040,
53
#define EPOLLRDNORM EPOLLRDNORM
54
    EPOLLRDBAND = 0x080,
55
#define EPOLLRDBAND EPOLLRDBAND
56
    EPOLLWRNORM = 0x100,
57
#define EPOLLWRNORM EPOLLWRNORM
58
    EPOLLWRBAND = 0x200,
59
#define EPOLLWRBAND EPOLLWRBAND
60
    EPOLLMSG = 0x400,
61
#define EPOLLMSG EPOLLMSG
62
    EPOLLERR = 0x008,
63
#define EPOLLERR EPOLLERR
64
    EPOLLHUP = 0x010,
65
#define EPOLLHUP EPOLLHUP
66
    EPOLLRDHUP = 0x2000,
67
#define EPOLLRDHUP EPOLLRDHUP
68
    EPOLLONESHOT = (1 << 30),
69
#define EPOLLONESHOT EPOLLONESHOT
70
    EPOLLET = (1 << 31)
71
#define EPOLLET EPOLLET
72
  };
73
74
75
/* Valid opcodes ( "op" parameter ) to issue to epoll_ctl().  */
76
#define EPOLL_CTL_ADD 1	/* Add a file descriptor to the interface.  */
77
#define EPOLL_CTL_DEL 2	/* Remove a file descriptor from the interface.  */
78
#define EPOLL_CTL_MOD 3	/* Change file descriptor epoll_event structure.  */
79
80
81
typedef union epoll_data
82
{
83
  void *ptr;
84
  int fd;
85
  uint32_t u32;
86
  uint64_t u64;
87
} epoll_data_t;
88
89
struct epoll_event
90
{
91
  uint32_t events;	/* Epoll events */
92
  epoll_data_t data;	/* User data variable */
93
};
94
95
96
__BEGIN_DECLS
97
98
/* Creates an epoll instance.  Returns an fd for the new instance.
99
   The "size" parameter is a hint specifying the number of file
100
   descriptors to be associated with the new instance.  The fd
101
   returned by epoll_create() should be closed with close().  */
102
extern int epoll_create (int __size) __THROW;
103
104
/* Same as epoll_create but with an FLAGS parameter.  The unused SIZE
105
   parameter has been dropped.  */
106
extern int epoll_create1 (int __flags) __THROW;
107
108
109
/* Manipulate an epoll instance "epfd". Returns 0 in case of success,
110
   -1 in case of error ( the "errno" variable will contain the
111
   specific error code ) The "op" parameter is one of the EPOLL_CTL_*
112
   constants defined above. The "fd" parameter is the target of the
113
   operation. The "event" parameter describes which events the caller
114
   is interested in and any associated user data.  */
115
extern int epoll_ctl (int __epfd, int __op, int __fd,
116
		      struct epoll_event *__event) __THROW;
117
118
119
/* Wait for events on an epoll instance "epfd". Returns the number of
120
   triggered events returned in "events" buffer. Or -1 in case of
121
   error with the "errno" variable set to the specific error code. The
122
   "events" parameter is a buffer that will contain triggered
123
   events. The "maxevents" is the maximum number of events to be
124
   returned ( usually size of "events" ). The "timeout" parameter
125
   specifies the maximum wait time in milliseconds (-1 == infinite).
126
127
   This function is a cancellation point and therefore not marked with
128
   __THROW.  */
129
extern int epoll_wait (int __epfd, struct epoll_event *__events,
130
		       int __maxevents, int __timeout);
131
132
133
/* Same as epoll_wait, but the thread's signal mask is temporarily
134
   and atomically replaced with the one provided as parameter.
135
136
   This function is a cancellation point and therefore not marked with
137
   __THROW.  */
138
extern int epoll_pwait (int __epfd, struct epoll_event *__events,
139
			int __maxevents, int __timeout,
140
			__const __sigset_t *__ss);
141
142
__END_DECLS
143
144
#endif /* sys/epoll.h */
(-)glibc-2.11.2.orig/ports/sysdeps/unix/sysv/linux/hppa/sys/eventfd.h (+54 lines)
Line 0 Link Here
1
/* Copyright (C) 2007, 2008, 2009 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_EVENTFD_H
20
#define	_SYS_EVENTFD_H	1
21
22
#include <stdint.h>
23
24
25
/* Type for event counter.  */
26
typedef uint64_t eventfd_t;
27
28
/* Flags for signalfd.  */
29
enum
30
  {
31
    EFD_SEMAPHORE = 1,
32
#define EFD_SEMAPHORE EFD_SEMAPHORE
33
    EFD_CLOEXEC = 010000000,
34
#define EFD_CLOEXEC EFD_CLOEXEC
35
    EFD_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */
36
#define EFD_NONBLOCK EFD_NONBLOCK
37
  };
38
39
40
__BEGIN_DECLS
41
42
/* Return file descriptor for generic event channel.  Set initial
43
   value to COUNT.  */
44
extern int eventfd (int __count, int __flags) __THROW;
45
46
/* Read event counter and possibly wait for events.  */
47
extern int eventfd_read (int __fd, eventfd_t *__value);
48
49
/* Increment event counter.  */
50
extern int eventfd_write (int __fd, eventfd_t __value);
51
52
__END_DECLS
53
54
#endif /* sys/eventfd.h */
(-)glibc-2.11.2.orig/ports/sysdeps/unix/sysv/linux/hppa/sys/inotify.h (+105 lines)
Line 0 Link Here
1
/* Copyright (C) 2005, 2006, 2008, 2009 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_INOTIFY_H
20
#define	_SYS_INOTIFY_H	1
21
22
#include <stdint.h>
23
24
25
/* Flags for the parameter of inotify_init1.  */
26
enum
27
  {
28
    IN_CLOEXEC = 010000000,
29
#define IN_CLOEXEC IN_CLOEXEC
30
    IN_NONBLOCK = 000200004 /* HPUX has separate NDELAY & NONBLOCK */
31
#define IN_NONBLOCK IN_NONBLOCK
32
  };
33
34
35
/* Structure describing an inotify event.  */
36
struct inotify_event
37
{
38
  int wd;		/* Watch descriptor.  */
39
  uint32_t mask;	/* Watch mask.  */
40
  uint32_t cookie;	/* Cookie to synchronize two events.  */
41
  uint32_t len;		/* Length (including NULs) of name.  */
42
  char name __flexarr;	/* Name.  */
43
};
44
45
46
/* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH.  */
47
#define IN_ACCESS	 0x00000001	/* File was accessed.  */
48
#define IN_MODIFY	 0x00000002	/* File was modified.  */
49
#define IN_ATTRIB	 0x00000004	/* Metadata changed.  */
50
#define IN_CLOSE_WRITE	 0x00000008	/* Writtable file was closed.  */
51
#define IN_CLOSE_NOWRITE 0x00000010	/* Unwrittable file closed.  */
52
#define IN_CLOSE	 (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close.  */
53
#define IN_OPEN		 0x00000020	/* File was opened.  */
54
#define IN_MOVED_FROM	 0x00000040	/* File was moved from X.  */
55
#define IN_MOVED_TO      0x00000080	/* File was moved to Y.  */
56
#define IN_MOVE		 (IN_MOVED_FROM | IN_MOVED_TO) /* Moves.  */
57
#define IN_CREATE	 0x00000100	/* Subfile was created.  */
58
#define IN_DELETE	 0x00000200	/* Subfile was deleted.  */
59
#define IN_DELETE_SELF	 0x00000400	/* Self was deleted.  */
60
#define IN_MOVE_SELF	 0x00000800	/* Self was moved.  */
61
62
/* Events sent by the kernel.  */
63
#define IN_UNMOUNT	 0x00002000	/* Backing fs was unmounted.  */
64
#define IN_Q_OVERFLOW	 0x00004000	/* Event queued overflowed.  */
65
#define IN_IGNORED	 0x00008000	/* File was ignored.  */
66
67
/* Helper events.  */
68
#define IN_CLOSE	 (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE)	/* Close.  */
69
#define IN_MOVE		 (IN_MOVED_FROM | IN_MOVED_TO)		/* Moves.  */
70
71
/* Special flags.  */
72
#define IN_ONLYDIR	 0x01000000	/* Only watch the path if it is a
73
					   directory.  */
74
#define IN_DONT_FOLLOW	 0x02000000	/* Do not follow a sym link.  */
75
#define IN_MASK_ADD	 0x20000000	/* Add to the mask of an already
76
					   existing watch.  */
77
#define IN_ISDIR	 0x40000000	/* Event occurred against dir.  */
78
#define IN_ONESHOT	 0x80000000	/* Only send event once.  */
79
80
/* All events which a program can wait on.  */
81
#define IN_ALL_EVENTS	 (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE  \
82
			  | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM	      \
83
			  | IN_MOVED_TO | IN_CREATE | IN_DELETE		      \
84
			  | IN_DELETE_SELF | IN_MOVE_SELF)
85
86
87
__BEGIN_DECLS
88
89
/* Create and initialize inotify instance.  */
90
extern int inotify_init (void) __THROW;
91
92
/* Create and initialize inotify instance.  */
93
extern int inotify_init1 (int __flags) __THROW;
94
95
/* Add watch of object NAME to inotify instance FD.  Notify about
96
   events specified by MASK.  */
97
extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask)
98
  __THROW;
99
100
/* Remove the watch specified by WD from the inotify instance FD.  */
101
extern int inotify_rm_watch (int __fd, int __wd) __THROW;
102
103
__END_DECLS
104
105
#endif /* sys/inotify.h */
(-)glibc-2.11.2.orig/ports/sysdeps/unix/sysv/linux/hppa/sys/signalfd.h (+66 lines)
Line 0 Link Here
1
/* Copyright (C) 2007, 2008 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_SIGNALFD_H
20
#define	_SYS_SIGNALFD_H	1
21
22
#define __need_sigset_t
23
#include <signal.h>
24
#include <stdint.h>
25
26
27
struct signalfd_siginfo
28
{
29
  uint32_t ssi_signo;
30
  int32_t ssi_errno;
31
  int32_t ssi_code;
32
  uint32_t ssi_pid;
33
  uint32_t ssi_uid;
34
  int32_t ssi_fd;
35
  uint32_t ssi_tid;
36
  uint32_t ssi_band;
37
  uint32_t ssi_overrun;
38
  uint32_t ssi_trapno;
39
  int32_t ssi_status;
40
  int32_t ssi_int;
41
  uint64_t ssi_ptr;
42
  uint64_t ssi_utime;
43
  uint64_t ssi_stime;
44
  uint64_t ssi_addr;
45
  uint8_t __pad[48];
46
};
47
48
/* Flags for signalfd.  */
49
enum
50
  {
51
    SFD_CLOEXEC = 010000000,
52
#define SFD_CLOEXEC SFD_CLOEXEC
53
    SFD_NONBLOCK = 00200004 /* HPUX has separate NDELAY & NONBLOCK */
54
#define SFD_NONBLOCK SFD_NONBLOCK
55
  };
56
57
__BEGIN_DECLS
58
59
/* Request notification for delivery of signals in MASK to be
60
   performed using descriptor FD.*/
61
extern int signalfd (int __fd, const sigset_t *__mask, int __flags)
62
  __THROW __nonnull ((2));
63
64
__END_DECLS
65
66
#endif /* sys/signalfd.h */
(-)glibc-2.11.2.orig/ports/sysdeps/unix/sysv/linux/hppa/sys/timerfd.h (+60 lines)
Line 0 Link Here
1
/* Copyright (C) 2008 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_TIMERFD_H
20
#define	_SYS_TIMERFD_H	1
21
22
#include <time.h>
23
24
25
/* Bits to be set in the FLAGS parameter of `timerfd_create'.  */
26
enum
27
  {
28
    TFD_CLOEXEC = 010000000,
29
#define TFD_CLOEXEC TFD_CLOEXEC
30
    TFD_NONBLOCK = 000200004 /* HPUX has separate NDELAY & NONBLOCK */
31
#define TFD_NONBLOCK TFD_NONBLOCK
32
  };
33
34
35
/* Bits to be set in the FLAGS parameter of `timerfd_settime'.  */
36
enum
37
  {
38
    TFD_TIMER_ABSTIME = 1 << 0
39
#define TFD_TIMER_ABSTIME TFD_TIMER_ABSTIME
40
  };
41
42
43
__BEGIN_DECLS
44
45
/* Return file descriptor for new interval timer source.  */
46
extern int timerfd_create (clockid_t __clock_id, int __flags) __THROW;
47
48
/* Set next expiration time of interval timer source UFD to UTMR.  If
49
   FLAGS has the TFD_TIMER_ABSTIME flag set the timeout value is
50
   absolute.  Optionally return the old expiration time in OTMR.  */
51
extern int timerfd_settime (int __ufd, int __flags,
52
			    __const struct itimerspec *__utmr,
53
			    struct itimerspec *__otmr) __THROW;
54
55
/* Return the next expiration time of UFD.  */
56
extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW;
57
58
__END_DECLS
59
60
#endif /* sys/timerfd.h */

Return to bug 331119