Date: Wed, 21 Nov 2001 22:32:02 +0000 From: David Hill <david@phobia.ms> To: freebsd-audit@freebsd.org, freebsd-current@freebsd.org Subject: libfetch kqueue patch Message-ID: <20011121223202.0e85d777.david@phobia.ms>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --Multipart_Wed__21_Nov_2001_22:32:02_+0000_081c5200 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hello - This patch converts libfetch to use kqueue instead of select. Thanks David Hill --Multipart_Wed__21_Nov_2001_22:32:02_+0000_081c5200 Content-Type: application/octet-stream; name="fetch-common.c.patch" Content-Disposition: attachment; filename="fetch-common.c.patch" Content-Transfer-Encoding: base64 LS0tIC91c3Ivc3JjL2xpYi9saWJmZXRjaC9jb21tb24uYy5vcmlnCVdlZCBOb3YgMjEgMjI6MTE6 MjMgMjAwMQorKysgL3Vzci9zcmMvbGliL2xpYmZldGNoL2NvbW1vbi5jCVdlZCBOb3YgMjEgMjI6 MjE6NTAgMjAwMQpAQCAtMzIsNiArMzIsNyBAQAogI2luY2x1ZGUgPHN5cy9wYXJhbS5oPgogI2lu Y2x1ZGUgPHN5cy9zb2NrZXQuaD4KICNpbmNsdWRlIDxzeXMvdGltZS5oPgorI2luY2x1ZGUgPHN5 cy9ldmVudC5oPgogI2luY2x1ZGUgPHN5cy91aW8uaD4KICNpbmNsdWRlIDxuZXRpbmV0L2luLmg+ CiAKQEAgLTI1Niw4ICsyNTcsOSBAQAogX2ZldGNoX2dldGxuKGludCBmZCwgY2hhciAqKmJ1Ziwg c2l6ZV90ICpzaXplLCBzaXplX3QgKmxlbikKIHsKICAgICBzdHJ1Y3QgdGltZXZhbCBub3csIHRp bWVvdXQsIHdhaXQ7Ci0gICAgZmRfc2V0IHJlYWRmZHM7Ci0gICAgaW50IHI7CisgICAgc3RydWN0 IHRpbWVzcGVjIHdhaXRrcTsKKwlzdHJ1Y3Qga2V2ZW50IGtlOworICAgIGludCByLCBrcTsKICAg ICBjaGFyIGM7C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B7CiAJCWlmIChlcnJubyA9PSBFSU5UUiAmJiBmZXRjaFJl c3RhcnRDYWxscykKIAkJICAgIGNvbnRpbnVlOwogCQkvKiBFQkFERiBvciBFSU5WQUw6IHNob3Vs ZG4ndCBoYXBwZW4gKi8KIAkJcmV0dXJuIC0xOwogCSAgICB9Ci0JICAgIGlmICghRkRfSVNTRVQo ZmQsICZyZWFkZmRzKSkKLQkJY29udGludWU7CiAJfQogCXIgPSByZWFkKGZkLCAmYywgMSk7CiAJ aWYgKHIgPT0gMCkKQEAgLTMyNSw2ICszMzIsOCBAQAogICAgIH0gd2hpbGUgKGMgIT0gJ1xuJyk7 CiAgICAgCiAgICAgREVCVUcoZnByaW50ZihzdGRlcnIsICJcMDMzWzFtPDw8ICUuKnNcMDMzW20i LCAoaW50KSpsZW4sICpidWYpKTsKKwkKKwljbG9zZShrcSk7CiAgICAgcmV0dXJuIDA7CiB9CiAK --Multipart_Wed__21_Nov_2001_22:32:02_+0000_081c5200-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011121223202.0e85d777.david>