Print this page
3484 enhance and document tail follow support
Reviewed by: Joshua M. Clulow <jmc@joyent.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/port.h
+++ new/usr/src/uts/common/sys/port.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
↓ open down ↓ |
16 lines elided |
↑ open up ↑ |
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 26
27 +/*
28 + * Copyright (c) 2013, Joyent, Inc. All rights reserved.
29 + */
30 +
27 31 #ifndef _SYS_PORT_H
28 32 #define _SYS_PORT_H
29 33
30 -#pragma ident "%Z%%M% %I% %E% SMI"
31 -
32 34 #ifdef __cplusplus
33 35 extern "C" {
34 36 #endif
35 37
36 38 #include <sys/types.h>
37 39
38 40 /* port sources */
39 41 #define PORT_SOURCE_AIO 1
40 42 #define PORT_SOURCE_TIMER 2
41 43 #define PORT_SOURCE_USER 3
42 44 #define PORT_SOURCE_FD 4
43 45 #define PORT_SOURCE_ALERT 5
44 46 #define PORT_SOURCE_MQ 6
45 47 #define PORT_SOURCE_FILE 7
46 48
47 49 typedef struct port_event {
48 50 int portev_events; /* event data is source specific */
49 51 ushort_t portev_source; /* event source */
50 52 ushort_t portev_pad; /* port internal use */
51 53 uintptr_t portev_object; /* source specific object */
52 54 void *portev_user; /* user cookie */
53 55 } port_event_t;
54 56
55 57 typedef struct port_notify {
56 58 int portnfy_port; /* bind request(s) to port */
57 59 void *portnfy_user; /* user defined */
58 60 } port_notify_t;
59 61
60 62
61 63 typedef struct file_obj {
62 64 timestruc_t fo_atime; /* Access time from stat(2) */
63 65 timestruc_t fo_mtime; /* Modification time from stat(2) */
64 66 timestruc_t fo_ctime; /* Change time from stat(2) */
65 67 uintptr_t fo_pad[3]; /* For future expansion */
66 68 char *fo_name; /* Null terminated file name */
67 69 } file_obj_t;
68 70
69 71 #if defined(_SYSCALL32)
70 72
71 73 typedef struct file_obj32 {
72 74 timestruc32_t fo_atime; /* Access time got from stat(2) */
73 75 timestruc32_t fo_mtime; /* Modification time from stat(2) */
74 76 timestruc32_t fo_ctime; /* Change time from stat(2) */
75 77 caddr32_t fo_pad[3]; /* For future expansion */
76 78 caddr32_t fo_name; /* Null terminated file name */
77 79 } file_obj32_t;
78 80
79 81 typedef struct port_event32 {
80 82 int portev_events; /* events detected */
81 83 ushort_t portev_source; /* user, timer, aio, etc */
82 84 ushort_t portev_pad; /* reserved */
83 85 caddr32_t portev_object; /* fd, timerid, ... */
84 86 caddr32_t portev_user; /* user cookie */
85 87 } port_event32_t;
86 88
87 89 typedef struct port_notify32 {
88 90 int portnfy_port; /* bind request(s) to port */
89 91 caddr32_t portnfy_user; /* user defined */
90 92 } port_notify32_t;
91 93
92 94 #endif /* _SYSCALL32 */
93 95
94 96 /* port_alert() flags */
95 97 #define PORT_ALERT_SET 0x01
96 98 #define PORT_ALERT_UPDATE 0x02
97 99 #define PORT_ALERT_INVALID (PORT_ALERT_SET | PORT_ALERT_UPDATE)
98 100
↓ open down ↓ |
57 lines elided |
↑ open up ↑ |
99 101 /*
100 102 * PORT_SOURCE_FILE - events
101 103 */
102 104
103 105 /*
104 106 * User watchable file events
105 107 */
106 108 #define FILE_ACCESS 0x00000001
107 109 #define FILE_MODIFIED 0x00000002
108 110 #define FILE_ATTRIB 0x00000004
111 +#define FILE_TRUNC 0x00100000
109 112 #define FILE_NOFOLLOW 0x10000000
110 113
111 114 /*
112 115 * exception file events
113 116 */
114 117
115 118 /*
116 119 * The watched file..
117 120 */
118 121 #define FILE_DELETE 0x00000010
119 122 #define FILE_RENAME_TO 0x00000020
120 123 #define FILE_RENAME_FROM 0x00000040
121 124 /*
122 125 * The filesystem on which the watched file resides got
123 126 * unmounted.
124 127 */
125 128 #define UNMOUNTED 0x20000000
126 129 /*
127 130 * Some other file/filesystem got mounted over the
128 131 * watched file/directory.
129 132 */
130 133 #define MOUNTEDOVER 0x40000000
131 134
132 135 /*
133 136 * Helper type
134 137 */
135 138 #define FILE_EXCEPTION (UNMOUNTED|FILE_DELETE|FILE_RENAME_TO \
136 139 |FILE_RENAME_FROM|MOUNTEDOVER)
137 140
138 141 #ifdef __cplusplus
139 142 }
140 143 #endif
141 144
142 145 #endif /* _SYS_PORT_H */
↓ open down ↓ |
24 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX