Re: [pthreads-devel] NGPT 2.2.0 RELEASED: TOPS LINUXTHREADS AND NPTL IN

Saurabh Desai (sdesai@us.ibm.com)
Fri, 10 Jan 2003 18:28:11 -0700


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-300-1042248570-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

The benchmark program (pingpong) developed by Sun Microsystem can be found
at
http://wwws.sun.com/software/whitepapers/solaris9/multithread.pdf

This patch is needed to compile and run under Linux.

(See attached file: pingpong.c.diff)

Thanks,
- - - - -
Saurabh Desai

--=_courier-300-1042248570-0001-2
Content-Type: application/octet-stream; name="pingpong.c.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="pingpong.c.diff"

LS0tIHBpbmdwb25nLmMub3JpZwlGcmkgSmFuIDEwIDE5OjAzOjQ1IDIwMDMKKysrIHBpbmdwb25n
LmMJRnJpIEphbiAxMCAxOTowNDo1OCAyMDAzCkBAIC03LDcgKzcsNyBAQAogICogKiBjYyAtbXQg
LXhhcmNoPXY5IC14TzQgcHAuYyAtbyBwcDY0IC1scHRocmVhZCAtbHJ0CiAgKiAqLwogI2luY2x1
ZGUgPHB0aHJlYWQuaD4KLSNpbmNsdWRlIDx0aHJlYWQuaD4KKy8qICNpbmNsdWRlIDx0aHJlYWQu
aD4gKi8KICNpbmNsdWRlIDxzdGRsaWIuaD4KICNpbmNsdWRlIDxzdHJpbmdzLmg+CiAjaW5jbHVk
ZSA8c3RkaW8uaD4KQEAgLTY5LDcgKzY5LDcgQEAKIG1haW4oaW50IGFyZ2MsIGNoYXIgKmFyZ3Zb
XSkKIHsKIAlpbnQgYzsKLQlocnRpbWVfdCB0MDsKKwlzdHJ1Y3QgdGltZXZhbCB0MCwgdDE7CiAJ
aW50IG50YWJsZXMgPSAxOwogCWludCB0YXJnZXQgPSAxMDAwMDAwOwogCWludCBzbGVlcG1zID0g
MDsKQEAgLTE1OSwyNyArMTU5LDMxIEBAC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