sleepy_penguin 1.4.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/.document CHANGED
@@ -7,4 +7,7 @@ lib
7
7
  ext/sleepy_penguin/init.c
8
8
  ext/sleepy_penguin/epoll.c
9
9
  ext/sleepy_penguin/eventfd.c
10
+ ext/sleepy_penguin/init.c
11
+ ext/sleepy_penguin/inotify.c
12
+ ext/sleepy_penguin/signalfd.c
10
13
  ext/sleepy_penguin/timerfd.c
data/.manifest CHANGED
@@ -18,13 +18,17 @@ ext/sleepy_penguin/eventfd.c
18
18
  ext/sleepy_penguin/extconf.rb
19
19
  ext/sleepy_penguin/init.c
20
20
  ext/sleepy_penguin/inotify.c
21
- ext/sleepy_penguin/nonblock.h
21
+ ext/sleepy_penguin/missing_epoll.h
22
+ ext/sleepy_penguin/missing_inotify.h
23
+ ext/sleepy_penguin/signalfd.c
22
24
  ext/sleepy_penguin/sleepy_penguin.h
23
25
  ext/sleepy_penguin/timerfd.c
26
+ ext/sleepy_penguin/util.c
24
27
  ext/sleepy_penguin/value2timespec.h
25
28
  lib/sleepy_penguin.rb
29
+ lib/sleepy_penguin/signalfd/sig_info.rb
30
+ lib/sleepy_penguin/sp.rb
26
31
  pkg.mk
27
- script/isolate_for_tests
28
32
  setup.rb
29
33
  sleepy_penguin.gemspec
30
34
  test/test_epoll.rb
@@ -32,4 +36,6 @@ test/test_epoll_gc.rb
32
36
  test/test_epoll_optimizations.rb
33
37
  test/test_eventfd.rb
34
38
  test/test_inotify.rb
39
+ test/test_signalfd.rb
40
+ test/test_signalfd_siginfo.rb
35
41
  test/test_timerfd.rb
data/ChangeLog CHANGED
@@ -1,5 +1,300 @@
1
1
  ChangeLog from http://bogomips.org/sleepy_penguin.git
2
2
 
3
+ commit cdebfac019b5e771f7babc5646a3c7961729eaca
4
+ Author: Eric Wong <normalperson@yhbt.net>
5
+ Date: Thu Mar 10 04:35:41 2011 +0000
6
+
7
+ sleepy_penguin 2.0.0
8
+
9
+ There are many internal cleanups, bugfixes, and incompatible
10
+ API changes. The API will probably be stable from now on.
11
+
12
+ All the flag passing is less verbose, in the past you had
13
+ to do:
14
+
15
+ tfd = TimerFD.new(TimerFD::CLOEXEC|TimerFD::NONBLOCK)
16
+
17
+ Now, you can just do (the old way still works):
18
+
19
+ tfd = TimerFD.new([:CLOEXEC, :NONBLOCK])
20
+
21
+ A SignalFD interface now exists, but is not recommended since
22
+ MRI signal handling seems to conflict with it.
23
+
24
+ Inotify#close no longer holds the GVL while closing the
25
+ descriptor since it is an expensive operation.
26
+
27
+ See git log v1.4.0..v2.0.0 for all the gory details.
28
+
29
+ commit d76fe634dfb3ed40b2ff02307963ac38d731d54e
30
+ Author: Eric Wong <normalperson@yhbt.net>
31
+ Date: Thu Mar 10 04:43:06 2011 +0000
32
+
33
+ signalfd.c: fix whitespace
34
+
35
+ commit 3721229d20880694f3c5a3a7a3fa401b19c5870b
36
+ Author: Eric Wong <normalperson@yhbt.net>
37
+ Date: Thu Mar 10 04:35:06 2011 +0000
38
+
39
+ inotify: release GVL during Inotify#close on 1.9
40
+
41
+ close(2) on inotify descriptors takes forever and a day.
42
+
43
+ commit 5905791c3373cf9cd1fce4da28acf9b16f721c3a
44
+ Author: Eric Wong <normalperson@yhbt.net>
45
+ Date: Thu Mar 10 03:28:48 2011 +0000
46
+
47
+ inotify: add Inotify#each method for yielding each event
48
+
49
+ This is useful for processing events in a synchronous fashion,
50
+ we think...
51
+
52
+ commit 7142fa6bd85fd5a256049f158b6c29399eee7c7c
53
+ Author: Eric Wong <normalperson@yhbt.net>
54
+ Date: Thu Mar 10 03:27:58 2011 +0000
55
+
56
+ inotify.c: fix local variable name for RDoc
57
+
58
+ "in" is a keyword in Ruby and unusable as a local variable
59
+
60
+ commit 02bba7d2200cb4225e50dba51d8bcc5cc6e6d677
61
+ Author: Eric Wong <normalperson@yhbt.net>
62
+ Date: Thu Mar 10 03:27:32 2011 +0000
63
+
64
+ README: misc updates
65
+
66
+ commit 7c3447f481067ac6d25b291e206e23a6b55d78d1
67
+ Author: Eric Wong <normalperson@yhbt.net>
68
+ Date: Thu Mar 10 02:40:26 2011 +0000
69
+
70
+ packaging updates, remove Isolate dependency
71
+
72
+ commit eb12922fdc860ce780617a3b8302cad7c6ff9666
73
+ Author: Eric Wong <normalperson@yhbt.net>
74
+ Date: Thu Mar 10 02:12:46 2011 +0000
75
+
76
+ signalfd: attempt to support POSIX real-time signals
77
+
78
+ I know of no other way to support them in Ruby
79
+
80
+ commit eab2b76b68b68e964a9b43b50fc8ea387f719f56
81
+ Author: Eric Wong <normalperson@yhbt.net>
82
+ Date: Thu Mar 10 02:12:46 2011 +0000
83
+
84
+ eventfd: remove "_nonblock" interfaces
85
+
86
+ Instead, allow a nonblock flag to be passed to
87
+ EventFD#incr and EventFD#value so it matches other
88
+ interfaces.
89
+
90
+ commit aa78296c346c31ca6ee0846fe7b8e6c9dd78d764
91
+ Author: Eric Wong <normalperson@yhbt.net>
92
+ Date: Thu Mar 10 02:12:46 2011 +0000
93
+
94
+ TimerFD#expirations takes a nonblock flag
95
+
96
+ Just like Inotify#take
97
+
98
+ commit ea00a29e69bcfbcaa82ac24adb9fdfefeb9cde4c
99
+ Author: Eric Wong <normalperson@yhbt.net>
100
+ Date: Thu Mar 10 02:12:46 2011 +0000
101
+
102
+ eventfd: test EventFD::MAX value
103
+
104
+ commit 3e75c60006b42b2c4eff8c95f11c4289e8229bb1
105
+ Author: Eric Wong <normalperson@yhbt.net>
106
+ Date: Thu Mar 10 02:12:46 2011 +0000
107
+
108
+ eventfd: test for :SEMAPHORE semantics
109
+
110
+ commit fd1509a7854d0da1227964a562a5f344bc0569b5
111
+ Author: Eric Wong <normalperson@yhbt.net>
112
+ Date: Thu Mar 10 02:12:46 2011 +0000
113
+
114
+ signalfd: flesh out SignalFD#take with non-blocking
115
+
116
+ Not that it works well...
117
+
118
+ commit 157a3ca60a1b2bdab0f26ec631dcdcdcc29dc260
119
+ Author: Eric Wong <normalperson@yhbt.net>
120
+ Date: Thu Mar 10 02:12:46 2011 +0000
121
+
122
+ Inotify#take releases GVL unconditionally
123
+
124
+ Avoids using select(2) if we want blocking functionality on
125
+ Ruby 1.9.
126
+
127
+ commit 6d7785370afe03827612572bad95c6fd81f0864b
128
+ Author: Eric Wong <normalperson@yhbt.net>
129
+ Date: Thu Mar 10 02:12:46 2011 +0000
130
+
131
+ split out missing bits for older glibc and kernels
132
+
133
+ They could be useful for other projects.
134
+
135
+ commit 6ffe88ef9ca671485e0e9a174dda99ffde7611ce
136
+ Author: Eric Wong <normalperson@yhbt.net>
137
+ Date: Thu Mar 10 02:12:46 2011 +0000
138
+
139
+ cleanup blocking region code for 1.8
140
+
141
+ Just reuse 1.9 methods
142
+
143
+ commit 7ae6845bdaf1e969d42c6ff84c847b4a3263dae4
144
+ Author: Eric Wong <normalperson@yhbt.net>
145
+ Date: Thu Mar 10 02:12:46 2011 +0000
146
+
147
+ test_epoll_gc: disable expensive test by default
148
+
149
+ Not needed for most cases.
150
+
151
+ commit 1fd99f288140556f2f02333a6e01002a77d1bfdb
152
+ Author: Eric Wong <normalperson@yhbt.net>
153
+ Date: Thu Mar 10 02:12:46 2011 +0000
154
+
155
+ cleanup unneeded #define shortcuts
156
+
157
+ Never used anywhere
158
+
159
+ commit d5af4d2738bc47f9ecc30b0900400833077f022b
160
+ Author: Eric Wong <normalperson@yhbt.net>
161
+ Date: Thu Mar 10 02:12:46 2011 +0000
162
+
163
+ move set_nonblock() into util.c
164
+
165
+ No need to repeat it and bloat ourselves.
166
+
167
+ commit 601e98fa2f89b99c7349b5c010850dd6f4efba0b
168
+ Author: Eric Wong <normalperson@yhbt.net>
169
+ Date: Thu Mar 10 02:12:46 2011 +0000
170
+
171
+ timerfd: hook up TimerFD#gettime
172
+
173
+ Oops, it was never wired up.
174
+
175
+ commit 89986c2df21b94fec21e516c0f51f3e3584f5b2e
176
+ Author: Eric Wong <normalperson@yhbt.net>
177
+ Date: Thu Mar 10 02:12:46 2011 +0000
178
+
179
+ test_inotify: do not check 1.9 IO constants
180
+
181
+ None of our business.
182
+
183
+ commit f04b6e5d6e5ad7a5144e4a01f113f24af32c8d25
184
+ Author: Eric Wong <normalperson@yhbt.net>
185
+ Date: Thu Mar 10 02:12:46 2011 +0000
186
+
187
+ doc: improve RDoc documentation
188
+
189
+ Might as well, since it forces me to understand these
190
+ interfaces, too :)
191
+
192
+ commit 01d0b34524668a52261bc026b22bc74401db71b6
193
+ Author: Eric Wong <e@yhbt.net>
194
+ Date: Thu Mar 10 02:12:46 2011 +0000
195
+
196
+ signalfd: test with sigqueue() with DL help
197
+
198
+ Still doesn't work under 1.8, oh well :<
199
+
200
+ commit 32bc376e494b5477b921b6d198b7aeda0c8efe12
201
+ Author: Eric Wong <e@yhbt.net>
202
+ Date: Thu Mar 10 02:12:46 2011 +0000
203
+
204
+ rework flags passing for ease-of-use
205
+
206
+ Arguments now take symbols and arrays of symbols just like the
207
+ SignalFD.new method. This fixes some use of signed vs unsigned
208
+ integer conversions as well.
209
+
210
+ commit 39d900abaebcb82aa2f2766b692ef558d44a9349
211
+ Author: Eric Wong <e@yhbt.net>
212
+ Date: Thu Mar 10 02:12:46 2011 +0000
213
+
214
+ remove SLEEPY_PENGUIN_VERSION constant
215
+
216
+ Bad idea to rely on constants
217
+
218
+ commit e29be690d10747c09aaf4839a4a5a4a0ed11729a
219
+ Author: Eric Wong <e@yhbt.net>
220
+ Date: Sun Mar 6 02:17:57 2011 +0000
221
+
222
+ add SignalFD#update! method
223
+
224
+ This modifies an existing SignalFD.
225
+
226
+ commit f14855b5b746c6bb6c6edb0dada2803ab60c5b94
227
+ Author: Eric Wong <e@yhbt.net>
228
+ Date: Sun Mar 6 00:10:50 2011 +0000
229
+
230
+ signalfd: gets => take
231
+
232
+ For consistency with the inotify interface
233
+
234
+ commit b62672504cfed54fcfa22229e348385c5520210b
235
+ Author: Eric Wong <e@yhbt.net>
236
+ Date: Sat Mar 5 23:45:13 2011 +0000
237
+
238
+ disable epoll optimizations test if Strace::me is missing
239
+
240
+ Better than failing.
241
+
242
+ commit 61c072424483b9c963823e860f627ac3c67d5375
243
+ Author: Eric Wong <normalperson@yhbt.net>
244
+ Date: Sun Mar 6 01:01:46 2011 +0000
245
+
246
+ remove TimerFD.create, it's redundant
247
+
248
+ Even though it matches timerfd_create(), TimerFD.new is
249
+ more consistent with the rest of the library.
250
+
251
+ commit 2706408dbeeb661eab82e0292cb004b68a13e8e1
252
+ Author: Eric Wong <normalperson@yhbt.net>
253
+ Date: Sun Mar 6 00:33:43 2011 +0000
254
+
255
+ inotify: some rdoc and comments
256
+
257
+ commit 6a205437e7070b8476b876536b6a77e6041f288e
258
+ Author: Eric Wong <normalperson@yhbt.net>
259
+ Date: Sat Mar 5 23:50:24 2011 +0000
260
+
261
+ inotify: use StringValueCStr for paths
262
+
263
+ This will fail on '\0' bytes since it's an illegal path
264
+ character.
265
+
266
+ commit e3798a8591f753706280b71c99ac8d0f2cfa393b
267
+ Author: Eric Wong <e@yhbt.net>
268
+ Date: Sat Mar 5 23:34:53 2011 +0000
269
+
270
+ add SignalFD interface
271
+
272
+ It's only working for Ruby 1.9 right now.
273
+
274
+ commit 9a19edb46e33f1385afefa13e1758b9263fa00d2
275
+ Author: Eric Wong <e@yhbt.net>
276
+ Date: Sat Mar 5 23:33:39 2011 +0000
277
+
278
+ add top-level SP shortcut constant
279
+
280
+ Taking a hint from EM :)
281
+
282
+ commit a1cd49832cf8273ad17f106a40c61a572f9e3bd5
283
+ Author: Eric Wong <e@yhbt.net>
284
+ Date: Sat Mar 5 23:20:01 2011 +0000
285
+
286
+ eventfd.c: fixes for Ruby 1.9
287
+
288
+ Oops :X
289
+
290
+ commit fd32ba797d5a3b2d404c46fd1ed89f20fc540dcc
291
+ Author: Eric Wong <normalperson@yhbt.net>
292
+ Date: Sun Feb 6 10:55:09 2011 +0000
293
+
294
+ pkg.mk: lib/ may not always exist
295
+
296
+ We could go C-only
297
+
3
298
  commit bba86c017d101c365c5a22b8e2b734ff7216ce56
4
299
  Author: Eric Wong <normalperson@yhbt.net>
5
300
  Date: Fri Feb 4 22:24:59 2011 +0000
data/GIT-VERSION-FILE CHANGED
@@ -1 +1 @@
1
- GIT_VERSION = 1.4.0
1
+ GIT_VERSION = 2.0.0
data/GIT-VERSION-GEN CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
 
3
3
  GVF=GIT-VERSION-FILE
4
- DEF_VER=v1.4.0.GIT
4
+ DEF_VER=v2.0.0.GIT
5
5
 
6
6
  LF='
7
7
  '
data/LATEST CHANGED
@@ -1,8 +1,22 @@
1
- === sleepy_penguin 1.4.0 - Linux I/O events for Ruby / 2011-02-04 22:27 UTC
1
+ === sleepy_penguin 2.0.0 / 2011-03-10 04:43 UTC
2
2
 
3
- * Epoll#wait: do not automatically retry on EINTR
4
- * preliminary Inotify support
5
- * Epoll.new no longer defaults to close-on-exec
3
+ There are many internal cleanups, bugfixes, and incompatible
4
+ API changes. The API will probably be stable from now on.
6
5
 
7
- TODO: FANotify + SignalFD
6
+ All the flag passing is less verbose, in the past you had
7
+ to do:
8
+
9
+ tfd = TimerFD.new(TimerFD::CLOEXEC|TimerFD::NONBLOCK)
10
+
11
+ Now, you can just do (the old way still works):
12
+
13
+ tfd = TimerFD.new([:CLOEXEC, :NONBLOCK])
14
+
15
+ A SignalFD interface now exists, but is not recommended since
16
+ MRI signal handling seems to conflict with it.
17
+
18
+ Inotify#close no longer holds the GVL while closing the
19
+ descriptor since it is an expensive operation.
20
+
21
+ See git log v1.4.0..v2.0.0 for all the gory details.
8
22
 
data/LICENSE CHANGED
@@ -5,8 +5,8 @@ You can redistribute it and/or modify it under the terms of the GNU
5
5
  Lesser General Public License (LGPL) as published by the Free Software
6
6
  Foundation, version {2.1}[http://www.gnu.org/licenses/lgpl-2.1.txt] or
7
7
  or {3}[http://www.gnu.org/licenses/lgpl-3.0.txt] (see link:COPYING).
8
- The project leader (Eric Wong) reserves the right to relicense raindrops
9
- under future versions of the LGPL.
8
+ The project leader (Eric Wong) reserves the right to relicense
9
+ sleepy_penguin under future versions of the LGPL.
10
10
 
11
11
  sleepy_penguin is distributed in the hope that it will be useful, but
12
12
  WITHOUT ANY WARRANTY; without even the implied warranty of
data/NEWS CHANGED
@@ -1,3 +1,25 @@
1
+ === sleepy_penguin 2.0.0 / 2011-03-10 04:43 UTC
2
+
3
+ There are many internal cleanups, bugfixes, and incompatible
4
+ API changes. The API will probably be stable from now on.
5
+
6
+ All the flag passing is less verbose, in the past you had
7
+ to do:
8
+
9
+ tfd = TimerFD.new(TimerFD::CLOEXEC|TimerFD::NONBLOCK)
10
+
11
+ Now, you can just do (the old way still works):
12
+
13
+ tfd = TimerFD.new([:CLOEXEC, :NONBLOCK])
14
+
15
+ A SignalFD interface now exists, but is not recommended since
16
+ MRI signal handling seems to conflict with it.
17
+
18
+ Inotify#close no longer holds the GVL while closing the
19
+ descriptor since it is an expensive operation.
20
+
21
+ See git log v1.4.0..v2.0.0 for all the gory details.
22
+
1
23
  === sleepy_penguin 1.4.0 - Linux I/O events for Ruby / 2011-02-04 22:27 UTC
2
24
 
3
25
  * Epoll#wait: do not automatically retry on EINTR
data/README CHANGED
@@ -2,21 +2,21 @@
2
2
 
3
3
  sleepy_penguin provides access to newer, Linux-only system calls to wait
4
4
  on events from traditionally non-I/O sources. Bindings to the eventfd,
5
- timerfd, and epoll interfaces are provided.
5
+ timerfd, inotify, signalfd and epoll interfaces are provided.
6
6
 
7
7
  == Features
8
8
 
9
9
  * Thread-safe blocking operations under both Ruby 1.8 and 1.9.
10
10
 
11
- * Mostly working under Rubinius
12
-
13
11
  * IO-like objects are backwards-compatible with IO.select.
14
12
 
15
- * Epoll interface is fork-safe
13
+ * Epoll interface is fork-safe and GC-safe
16
14
 
17
15
  * Unlike portable event frameworks, the Linux-only Epoll interface
18
16
  allows using edge-triggered I/O for possibly improved performance
19
17
 
18
+ * Fully-documented and user-friendly API
19
+
20
20
  == Install
21
21
 
22
22
  If you're using a packaged Ruby distribution, make sure you have a C
data/TODO CHANGED
@@ -1,3 +1 @@
1
1
  * FANotify interface
2
-
3
- * SignalFD interface