[libdispatch-dev] porting status
Mark Heily
mark at heily.com
Sun Apr 10 20:42:33 PDT 2011
Here's some news on the effor to porting libdispatch to other platforms:
* libkqueue has been submitted for inclusion in Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=684446
* libpthread_workqueue has been uploaded to the Debian archive:
http://ftp-master.debian.org/new/libpthread-workqueue_0.4.1-1.html
* All of the libdispatch unit tests are working on Linux using the latest
SVN sources of libkqueue and libpthread_workqueue. Here's the output:
==================================================
[TEST] Dispatch (Public) API
[PID] 23983
==================================================
Actual: 0x602540
Expected: 0x602540
[PASS] dispatch_get_main_queue
PASS: dispatch_api
==================================================
[TEST] Dispatch C99
[PID] 24003
==================================================
Actual: 0x602540
Expected: 0x602540
[PASS] dispatch_get_main_queue
PASS: dispatch_c99
==================================================
[TEST] Dispatch Cascade
[PID] 24023
==================================================
maxcount = 2993
*
*
*
*
*
*
*
*
*
* *
* *
* *
* *
** *
** * *
** * * *
** * * **
** ****** * *
** ****** * ** * * * *
PASS: dispatch_cascade
==================================================
[TEST] Dispatch Debug
[PID] 24045
==================================================
PASS: dispatch_debug
==================================================
[TEST] Dispatch Starfish
[PID] 24066
==================================================
lap: 10
count: 1000
delta: 753127910 ns
math: 376.187767 ns / lap
Actual: 376
Expected: <1000
[PASS] Latency
lap: 9
count: 1000
delta: 237370287 ns
math: 118.566577 ns / lap
Actual: 118
Expected: <1000
[PASS] Latency
lap: 8
count: 1000
delta: 204984482 ns
math: 102.389851 ns / lap
Actual: 102
Expected: <1000
[PASS] Latency
lap: 7
count: 1000
delta: 388445296 ns
math: 194.028619 ns / lap
Actual: 194
Expected: <1000
[PASS] Latency
lap: 6
count: 1000
delta: 361531258 ns
math: 180.585044 ns / lap
Actual: 180
Expected: <1000
[PASS] Latency
lap: 5
count: 1000
delta: 187446526 ns
math: 93.629633 ns / lap
Actual: 93
Expected: <1000
[PASS] Latency
lap: 4
count: 1000
delta: 155628229 ns
math: 77.736378 ns / lap
Actual: 77
Expected: <1000
[PASS] Latency
lap: 3
count: 1000
delta: 241324652 ns
math: 120.541784 ns / lap
Actual: 120
Expected: <1000
[PASS] Latency
lap: 2
count: 1000
delta: 179030487 ns
math: 89.425818 ns / lap
Actual: 89
Expected: <1000
[PASS] Latency
lap: 1
count: 1000
delta: 147013706 ns
math: 73.433420 ns / lap
Actual: 73
Expected: <1000
[PASS] Latency
PASS: dispatch_starfish
==================================================
[TEST] Dispatch Priority
[PID] 24140
==================================================
LOW: 77
*************************************************
DEFAULT: 0
HIGH: 115
************************************************************************
Actual: 192
Expected: 192
[PASS] blocks completed
Actual: 77
Expected: <115
[PASS] high priority precedence
PASS: dispatch_priority
==================================================
[TEST] Dispatch Priority (Set Target Queue)
[PID] 24175
==================================================
Actual: 0x2242420
Expected: 0x2242420
[PASS] q[i]
Actual: 0x22426f0
Expected: 0x22426f0
[PASS] q[i]
Actual: 0x22427f0
Expected: 0x22427f0
[PASS] q[i]
LOW: 45
*****************************
DEFAULT: 72
*********************************************
HIGH: 75
***********************************************
Actual: 192
Expected: 192
[PASS] blocks completed
Actual: 45
Expected: <75
[PASS] high priority precedence
PASS: dispatch_priority2
==================================================
[TEST] Dispatch Source Read
[PID] 24205
==================================================
Actual: 0x602e90
Expected: 0x602e90
[PASS] dispatch_get_main_queue
Actual: 0x134f420
Expected: 0x134f420
[PASS] DISPATCH_SOURCE_TYPE_READ
bytes available: 931708
bytes read: 512000
bytes available: 419708
bytes read: 419708
Actual: 0
Expected: 0
[PASS] EOF
Actual: 931708
Expected: 931708
[PASS] Bytes read
Actual: 0
Expected: 0
[PASS] close
PASS: dispatch_read
==================================================
[TEST] Dispatch Queue Finalizer
[PID] 24227
==================================================
Actual: 0xa8d420
Expected: 0xa8d420
[PASS] dispatch_queue_new
Actual: 0x311694489c071ab7
Expected: 0x311694489c071ab7
[PASS] finalizer ran
PASS: queue_finalizer
==================================================
[TEST] Dispatch After
[PID] 24247
==================================================
Actual: 0
Expected: <503549891
[PASS] can't finish faster than 5.5s
Actual: 0
Expected: <496451540
[PASS] must finish faster than 6.5s
Actual: 0
Expected: <500150111
[PASS] can't finish faster than 1.5s
Actual: 0
Expected: <499850531
[PASS] must finish faster than 2.5s
Actual: 0
Expected: <21119
[PASS] can't finish faster than 0s
Actual: 0
Expected: <499979465
[PASS] must finish faster than .5s
PASS: dispatch_after
==================================================
[TEST] Dispatch Apply
[PID] 24269
==================================================
Actual: 0x2af379697750
Expected: 0x2af379697750
[PASS] dispatch_get_concurrent_queue
Actual: 32
Expected: 32
[PASS] count
PASS: dispatch_apply
==================================================
[TEST] Timer drift test
[PID] 24289
==================================================
Actual: 0x7c7420
Expected: 0x7c7420
[PASS] DISPATCH_SOURCE_TYPE_TIMER
1: jitter 0.000000, drift 0.000000
2: jitter -0.000054, drift -0.000054
3: jitter 0.000025, drift 0.000079
4: jitter 0.000026, drift 0.000001
5: jitter 0.000023, drift -0.000003
6: jitter 0.000021, drift -0.000002
7: jitter 0.000023, drift 0.000002
8: jitter 0.000024, drift 0.000001
9: jitter 0.000025, drift 0.000001
10: jitter 0.000025, drift 0.000000
11: jitter 0.000026, drift 0.000001
12: jitter 0.000024, drift -0.000002
13: jitter 0.000023, drift -0.000001
14: jitter 0.000025, drift 0.000002
15: jitter 0.000024, drift -0.000001
16: jitter 0.000024, drift 0.000000
17: jitter 0.000024, drift -0.000000
18: jitter 0.000039, drift 0.000015
19: jitter 0.000034, drift -0.000005
20: jitter 0.000032, drift -0.000002
21: jitter 0.000035, drift 0.000003
22: jitter 0.000028, drift -0.000007
23: jitter 0.000034, drift 0.000006
24: jitter 0.000037, drift 0.000003
25: jitter 0.000033, drift -0.000004
26: jitter 0.000033, drift -0.000000
27: jitter 0.000031, drift -0.000002
28: jitter 0.000035, drift 0.000004
29: jitter 0.000036, drift 0.000001
30: jitter 0.000034, drift -0.000002
31: jitter 0.000036, drift 0.000002
32: jitter -0.000006, drift -0.000042
33: jitter 0.000033, drift 0.000039
34: jitter 0.000036, drift 0.000003
35: jitter 0.000033, drift -0.000003
36: jitter 0.000034, drift 0.000001
37: jitter -0.000200, drift -0.000234
38: jitter 0.000035, drift 0.000235
39: jitter 0.000035, drift 0.000000
40: jitter 0.000036, drift 0.000001
41: jitter 0.000034, drift -0.000002
42: jitter 0.000039, drift 0.000005
43: jitter 0.000038, drift -0.000001
44: jitter 0.000035, drift -0.000003
45: jitter 0.000092, drift 0.000057
46: jitter 0.000031, drift -0.000061
47: jitter -0.000002, drift -0.000033
48: jitter 0.000033, drift 0.000035
49: jitter 0.000036, drift 0.000003
50: jitter 0.000036, drift 0.000000
51: jitter -0.001187, drift -0.001223
52: jitter 0.000042, drift 0.001229
53: jitter 0.000027, drift -0.000015
54: jitter 0.000023, drift -0.000004
55: jitter 0.000031, drift 0.000008
56: jitter 0.000018, drift -0.000013
57: jitter -0.001240, drift -0.001258
58: jitter 0.000032, drift 0.001272
59: jitter 0.000034, drift 0.000002
60: jitter 0.000036, drift 0.000002
61: jitter 0.000034, drift -0.000002
62: jitter 0.000034, drift -0.000000
63: jitter 0.000049, drift 0.000015
64: jitter 0.000035, drift -0.000014
65: jitter -0.001232, drift -0.001267
66: jitter 0.000030, drift 0.001262
67: jitter 0.000035, drift 0.000005
68: jitter 0.000033, drift -0.000002
69: jitter 0.000035, drift 0.000002
70: jitter 0.000034, drift -0.000001
71: jitter 0.000035, drift 0.000001
72: jitter 0.000033, drift -0.000002
73: jitter 0.000029, drift -0.000004
74: jitter 0.000036, drift 0.000007
75: jitter 0.000033, drift -0.000003
76: jitter 0.000039, drift 0.000006
77: jitter 0.000026, drift -0.000013
78: jitter 0.000026, drift 0.000000
79: jitter 0.000027, drift 0.000001
80: jitter 0.000026, drift -0.000001
81: jitter 0.000027, drift 0.000001
82: jitter 0.000026, drift -0.000001
83: jitter 0.000025, drift -0.000001
84: jitter 0.000026, drift 0.000001
85: jitter 0.000029, drift 0.000003
86: jitter 0.000021, drift -0.000008
87: jitter 0.000024, drift 0.000003
88: jitter 0.000026, drift 0.000002
89: jitter 0.000027, drift 0.000001
90: jitter 0.000026, drift -0.000001
91: jitter 0.000027, drift 0.000001
92: jitter 0.000027, drift 0.000000
93: jitter 0.000026, drift -0.000001
94: jitter 0.000026, drift 0.000000
95: jitter 0.000025, drift -0.000001
96: jitter 0.000025, drift 0.000000
97: jitter 0.000025, drift -0.000000
98: jitter 0.000025, drift 0.000000
99: jitter 0.000028, drift 0.000003
100: jitter 0.000026, drift -0.000002
101: jitter 0.000027, drift 0.000001
102: jitter 0.000027, drift 0.000000
103: jitter 0.000023, drift -0.000004
104: jitter 0.000026, drift 0.000003
105: jitter 0.000025, drift -0.000001
106: jitter 0.000024, drift -0.000001
107: jitter 0.000025, drift 0.000001
108: jitter 0.000025, drift 0.000000
109: jitter 0.000026, drift 0.000001
110: jitter 0.000025, drift -0.000001
111: jitter 0.000026, drift 0.000001
112: jitter 0.000024, drift -0.000002
113: jitter 0.000025, drift 0.000001
114: jitter 0.000024, drift -0.000001
115: jitter 0.000025, drift 0.000001
116: jitter 0.000024, drift -0.000001
117: jitter 0.000024, drift -0.000000
118: jitter 0.000025, drift 0.000001
119: jitter 0.000037, drift 0.000012
120: jitter 0.000025, drift -0.000012
121: jitter 0.000026, drift 0.000001
122: jitter 0.000026, drift 0.000000
123: jitter 0.000025, drift -0.000001
124: jitter 0.000026, drift 0.000001
125: jitter 0.000026, drift 0.000000
126: jitter 0.000023, drift -0.000003
127: jitter 0.000023, drift 0.000000
128: jitter 0.000025, drift 0.000002
129: jitter 0.000027, drift 0.000002
130: jitter 0.000027, drift 0.000000
131: jitter 0.000026, drift -0.000001
132: jitter 0.000026, drift 0.000000
133: jitter 0.000024, drift -0.000002
134: jitter 0.000045, drift 0.000021
135: jitter 0.000025, drift -0.000020
136: jitter 0.000024, drift -0.000001
137: jitter 0.000024, drift -0.000000
138: jitter 0.000024, drift 0.000000
139: jitter 0.000026, drift 0.000002
140: jitter 0.000025, drift -0.000001
141: jitter 0.000027, drift 0.000002
142: jitter 0.000029, drift 0.000002
143: jitter 0.000027, drift -0.000002
144: jitter 0.000026, drift -0.000001
145: jitter 0.000026, drift 0.000000
146: jitter 0.000021, drift -0.000005
147: jitter 0.000024, drift 0.000003
148: jitter 0.000023, drift -0.000001
149: jitter 0.000025, drift 0.000002
150: jitter 0.000025, drift 0.000000
151: jitter 0.000025, drift 0.000000
152: jitter 0.000025, drift -0.000000
153: jitter 0.000025, drift 0.000000
154: jitter 0.000025, drift 0.000000
155: jitter 0.000026, drift 0.000001
156: jitter 0.000024, drift -0.000002
157: jitter 0.000023, drift -0.000001
158: jitter 0.000024, drift 0.000001
159: jitter 0.000024, drift -0.000000
160: jitter 0.000025, drift 0.000001
161: jitter 0.000026, drift 0.000001
162: jitter 0.000026, drift 0.000000
163: jitter 0.000023, drift -0.000003
164: jitter 0.000027, drift 0.000004
165: jitter 0.000026, drift -0.000001
166: jitter 0.000023, drift -0.000003
167: jitter 0.000025, drift 0.000002
168: jitter 0.000026, drift 0.000001
169: jitter 0.000027, drift 0.000001
170: jitter 0.000026, drift -0.000001
171: jitter 0.000026, drift 0.000000
172: jitter 0.000026, drift 0.000000
173: jitter 0.000039, drift 0.000013
174: jitter 0.000027, drift -0.000012
175: jitter 0.000026, drift -0.000001
176: jitter 0.000024, drift -0.000002
177: jitter 0.000026, drift 0.000002
178: jitter 0.000026, drift 0.000000
179: jitter 0.000027, drift 0.000001
180: jitter 0.000026, drift -0.000001
181: jitter 0.000026, drift 0.000000
182: jitter 0.000030, drift 0.000004
183: jitter 0.000026, drift -0.000004
184: jitter 0.000026, drift 0.000000
185: jitter 0.000027, drift 0.000001
186: jitter 0.000021, drift -0.000006
187: jitter 0.000022, drift 0.000001
188: jitter 0.000025, drift 0.000003
189: jitter 0.000025, drift 0.000000
190: jitter 0.000027, drift 0.000002
191: jitter 0.000027, drift -0.000000
192: jitter 0.000026, drift -0.000001
193: jitter 0.000025, drift -0.000001
194: jitter 0.000025, drift 0.000000
195: jitter 0.000027, drift 0.000002
196: jitter 0.000024, drift -0.000003
197: jitter 0.000024, drift -0.000000
198: jitter 0.000025, drift 0.000001
199: jitter 0.000025, drift 0.000000
200: jitter 0.000025, drift 0.000000
201: jitter 0.000027, drift 0.000002
202: jitter 0.000026, drift -0.000001
203: jitter 0.000025, drift -0.000001
204: jitter 0.000026, drift 0.000001
205: jitter 0.000026, drift 0.000000
206: jitter 0.000022, drift -0.000004
207: jitter 0.000023, drift 0.000001
208: jitter 0.000025, drift 0.000002
209: jitter 0.000027, drift 0.000002
210: jitter 0.000026, drift -0.000001
211: jitter 0.000027, drift 0.000001
212: jitter 0.000027, drift 0.000000
213: jitter 0.000029, drift 0.000002
214: jitter 0.000053, drift 0.000024
215: jitter 0.000025, drift -0.000028
216: jitter 0.000025, drift 0.000000
217: jitter 0.000024, drift -0.000001
218: jitter 0.000025, drift 0.000001
219: jitter 0.000026, drift 0.000001
220: jitter 0.000026, drift 0.000000
221: jitter 0.000050, drift 0.000024
222: jitter 0.000025, drift -0.000025
223: jitter 0.000024, drift -0.000001
224: jitter 0.000026, drift 0.000002
225: jitter 0.000025, drift -0.000001
226: jitter 0.000022, drift -0.000003
227: jitter 0.000024, drift 0.000002
228: jitter 0.000025, drift 0.000001
229: jitter 0.000026, drift 0.000001
230: jitter 0.000051, drift 0.000025
231: jitter 0.000027, drift -0.000024
232: jitter 0.000025, drift -0.000002
233: jitter 0.000026, drift 0.000001
234: jitter 0.000025, drift -0.000001
235: jitter 0.000026, drift 0.000001
236: jitter 0.000051, drift 0.000025
237: jitter 0.000019, drift -0.000032
238: jitter 0.000127, drift 0.000108
239: jitter 0.000026, drift -0.000101
240: jitter 0.000026, drift 0.000000
241: jitter 0.000026, drift 0.000000
242: jitter 0.000026, drift 0.000000
243: jitter 0.000026, drift 0.000000
244: jitter 0.000027, drift 0.000001
245: jitter 0.000027, drift 0.000000
246: jitter 0.000023, drift -0.000004
247: jitter 0.000024, drift 0.000001
248: jitter 0.000025, drift 0.000001
249: jitter 0.000026, drift 0.000001
250: jitter 0.000026, drift 0.000000
Actual: 0.000012
Expected: <0.000100
[PASS] average jitter
Actual: 0.000000
Expected: <0.000100
[PASS] average drift
PASS: dispatch_drift
==================================================
[TEST] Dispatch Group
[PID] 24311
==================================================
Actual: 0x103a420
Expected: 0x103a420
[PASS] dispatch_group_async
Actual: 0x2b1490002260
Expected: 0x2b1490002260
[PASS] dispatch_group_async
sleeping...
sleeping...
sleeping...
Actual: 0
Expected: 0
[PASS] dispatch_group_wait
done.
done.
done.
Actual: 0
Expected: 0
[PASS] dispatch_group_wait
Actual: 0x2b1490001420
Expected: 0x2b1490001420
[PASS] dispatch_group_async
Actual: 0x602eb0
Expected: 0x602eb0
[PASS] Notification Received
PASS: dispatch_group
==================================================
[TEST] Dispatch Ping Pong
[PID] 24334
==================================================
Actual: 0xf7d420
Expected: 0xf7d420
[PASS] dispatch_queue_create(ping)
Actual: 0xf7d4d0
Expected: 0xf7d4d0
[PASS] dispatch_queue_create(pong)
Actual: 0xf7d580
Expected: 0xf7d580
[PASS] dispatch_group_create
Actual: 1000000
Expected: 1000000
[PASS] count
PASS: dispatch_pingpong
==================================================
[TEST] Dispatch Reader/Writer Queues
[PID] 24355
==================================================
PASS: dispatch_readsync
==================================================
[TEST] Dispatch Semaphore
[PID] 24380
==================================================
Actual: 10000
Expected: 10000
[PASS] count
PASS: dispatch_sema
==================================================
[TEST] Dispatch Source Timer, bit 31
[PID] 24401
==================================================
Actual: 0x602a50
Expected: 0x602a50
[PASS] dispatch_get_main_queue
Actual: 0x17c3420
Expected: 0x17c3420
[PASS] DISPATCH_SOURCE_TYPE_TIMER
Actual: 2
Expected: <4
[PASS] elapsed time < 4s
Actual: 1
Expected: <2
[PASS] elapsed time > 2s
PASS: dispatch_timer_bit31
==================================================
[TEST] Dispatch Source Timer, bit 63
[PID] 24423
==================================================
0
PASS: dispatch_timer_bit63
===================
All 18 tests passed
===================
More information about the libdispatch-dev
mailing list