From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Julian Graham" Newsgroups: gmane.lisp.guile.devel Subject: Re: srfi-18 requirements Date: Sat, 1 Mar 2008 14:56:07 -0500 Message-ID: <2bc5f8210803011156i3bfb976bsda2a7902654ba3a6@mail.gmail.com> References: <2bc5f8210710101854m1254160ei451026182b87e767@mail.gmail.com> <2bc5f8210802071604s2519d5c5qa6035426de62f29@mail.gmail.com> <2bc5f8210802102114m4eab895dr3114b7ea74156b38@mail.gmail.com> <87pruso94g.fsf@ossau.uklinux.net> <2bc5f8210802191810v729d8fa5jec070d3ee4358493@mail.gmail.com> <87r6f5zv6t.fsf@ossau.uklinux.net> <2bc5f8210802212014o45a9c79dpd688f11726a1e159@mail.gmail.com> <87ir0e1yka.fsf@ossau.uklinux.net> <2bc5f8210802241017o46468365j33c329a069d96d33@mail.gmail.com> <873ariaq82.fsf@ossau.uklinux.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_13712_11533272.1204401368022" X-Trace: ger.gmane.org 1204401388 16027 80.91.229.12 (1 Mar 2008 19:56:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Mar 2008 19:56:28 +0000 (UTC) Cc: =?ISO-8859-1?Q?Ludovic_Court=E8s?= , guile-devel@gnu.org To: "Neil Jerram" Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Mar 01 20:56:52 2008 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JVXpC-0002Dy-0d for guile-devel@m.gmane.org; Sat, 01 Mar 2008 20:56:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JVXof-0000bu-0F for guile-devel@m.gmane.org; Sat, 01 Mar 2008 14:56:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JVXob-0000bG-8y for guile-devel@gnu.org; Sat, 01 Mar 2008 14:56:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JVXoZ-0000ao-Rs for guile-devel@gnu.org; Sat, 01 Mar 2008 14:56:12 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JVXoZ-0000al-Ju for guile-devel@gnu.org; Sat, 01 Mar 2008 14:56:11 -0500 Original-Received: from nf-out-0910.google.com ([64.233.182.186]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JVXoY-00035e-HA for guile-devel@gnu.org; Sat, 01 Mar 2008 14:56:11 -0500 Original-Received: by nf-out-0910.google.com with SMTP id f5so3141335nfh.26 for ; Sat, 01 Mar 2008 11:56:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=3khjFwpro2gAMrBBeJPT1r9ayQ0dLbQOM3vLwRJSHXI=; b=W3DTdor1Xk+YUWU6WcDqkFsFWFt/vKOfLU1tZYt+GVh6B3sW/qnl6/htTEtezomLGoN1RhoTqgJDDuQpRw704v5VZrKpud8yaNlc29r1wuHfgjrQ7DWfWo0lekGMfDnOsK3b2bsKKjumzDBe1UVKhdrpadtcZ5/KzsPE4Vajfg0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=m1quLm0P8z+EX/tcxTXDSkewedNNLzJMjMIP4IGOxHZpD+h7dvEAPBzapQRVS+i8LA0s71o2BL7gzzJEgZhxDysMLkRKZ4Q3qAChebJlCV+XFVFtuSS0a9TP2fKfOO/2lgl6I1Ym3WMMjzdDhLNy2P2GaTk91MTtgprEcwQrdMI= Original-Received: by 10.82.107.15 with SMTP id f15mr14405582buc.39.1204401368030; Sat, 01 Mar 2008 11:56:08 -0800 (PST) Original-Received: by 10.82.100.9 with HTTP; Sat, 1 Mar 2008 11:56:07 -0800 (PST) In-Reply-To: <873ariaq82.fsf@ossau.uklinux.net> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:7056 Archived-At: ------=_Part_13712_11533272.1204401368022 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Neil et al., > > Cool -- I'll set up make-mutex for Scheme, and for C as described > > above. Let me know if that's not okay. > > All sounds perfect to me. Find attached the latest revision of the core changes for SRFI-18 support. Key changes between this revision and the last are: * scm_to_timespec -> to_timespec * "Timeout values" for timed joins * The extension of make-mutex and addition of make_mutex_with_flags to support additional configuration options that persist for the lifetime of a mutex (unchecked unlocking and external unlocking) * fat_mutex_unlock now takes a condition variable and a timeout to support SRFI-18's condition-signal unlock semantics; mutex unlocking and condition variable waiting are reimplemented in terms of fat_mutex_unlock; unnecessary relocking / unlocking is no longer performed * The threads tests and scheduling documentation have been updated to reflect the above. Let me know what you think! Regards, Julian ------=_Part_13712_11533272.1204401368022 Content-Type: application/octet-stream; name=srfi-18-core.HEAD.patch.20080229 Content-Transfer-Encoding: base64 X-Attachment-Id: f_fdalfalt0 Content-Disposition: attachment; filename=srfi-18-core.HEAD.patch.20080229 SW5kZXg6IGRvYy9yZWYvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9z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gIDsKIAorICB3aGlsZSAoIXNjbV9pc19udWxsICh0 LT5tdXRleGVzKSkgCisgICAgeworICAgICAgU0NNIG11dGV4ID0gU0NNX0NBUiAodC0+bXV0ZXhl cyk7CisgICAgICBmYXRfbXV0ZXggKm0gID0gU0NNX01VVEVYX0RBVEEgKG11dGV4KTsKKyAgICAg IHNjbV9pX3B0aHJlYWRfbXV0ZXhfbG9jayAoJm0tPmxvY2spOworICAgICAgCisgICAgICB1bmJs b2NrX2Zyb21fcXVldWUgKG0tPndhaXRpbmcpOworCisgICAgICBzY21faV9wdGhyZWFkX211dGV4 X3VubG9jayAoJm0tPmxvY2spOyAgICAgIAorICAgICAgdC0+bXV0ZXhlcyA9IFNDTV9DRFIgKHQt Pm11dGV4ZXMpOworICAgIH0KKwogICBzY21faV9wdGhyZWFkX211dGV4X3VubG9jayAoJnQtPmFk bWluX211dGV4KTsKIAogICByZXR1cm4gTlVMTDsKQEAgLTk4OSwxNCArMTA0NywyMyBAQAogfQog I3VuZGVmIEZVTkNfTkFNRQogCi1TQ01fREVGSU5FIChzY21fam9pbl90aHJlYWQsICJqb2luLXRo cmVhZCIsIDEsIDAsIDAsCi0JICAgIChTQ00gdGhyZWFkKSwKK1NDTSBzY21fam9pbl90aHJlYWQg KFNDTSB0aHJlYWQpCit7CisgIHJldHVybiBzY21fam9pbl90aHJlYWRfdGltZWQgKHRocmVhZCwg U0NNX1VOREVGSU5FRCwgU0NNX1VOREVGSU5FRCk7Cit9CisKK1NDTV9ERUZJTkUgKHNjbV9qb2lu X3RocmVhZF90aW1lZCwgImpvaW4tdGhyZWFkIiwgMSwgMiwgMCwKKwkgICAgKFNDTSB0aHJlYWQs IFNDTSB0aW1lb3V0LCBTQ00gdGltZW91dHZhbCksCiAiU3VzcGVuZCBleGVjdXRpb24gb2YgdGhl IGNhbGxpbmcgdGhyZWFkIHVudGlsIHRoZSB0YXJnZXQgQHZhcnt0aHJlYWR9ICIKICJ0ZXJtaW5h dGVzLCB1bmxlc3Mg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lmICghZmlyc3RfaXRlcmF0aW9uKQorCSAgICB7CisJ ICAgICAgaWYgKHRpbWVvdXQgIT0gTlVMTCkgCisJCXsKKwkJICBnZXR0aW1lb2ZkYXkgKCZjdXJy ZW50X3RpbWUsIE5VTEwpOworCQkgIGlmIChjdXJyZW50X3RpbWUudHZfc2VjID4gdGltZW91dC0+ dHZfc2VjIHx8CisJCSAgICAgIChjdXJyZW50X3RpbWUudHZfc2VjID09IHRpbWVvdXQtPnR2X3Nl YyAmJgorCQkgICAgICAgY3VycmVudF90aW1lLnR2X3VzZWMgKiAxMDAwID4gdGltZW91dC0+dHZf bnNlYykpCisJCSAgICB7CisJCSAgICAgICpyZXQgPSAwOworCQkgICAgICBicmVhazsKKwkJICAg IH0KKwkJfQorCSAgICAgIHNjbV9pX3B0aHJlYWRfbXV0ZXhfdW5sb2NrICgmbS0+bG9jayk7CisJ ICAgICAgU0NNX1RJQ0s7CisJICAgICAgc2NtX2lfc2NtX3B0aHJlYWRfbXV0ZXhfbG9jayAoJm0t PmxvY2spOworCSAgICB9CisJICBlbHNlCisJICAgIGZpcnN0X2l0ZXJhdGlvbiA9IDA7CisJICBi bG9ja19zZWxmIChtLT53YWl0aW5nLCBtdXRleCwgJm0tPmxvY2ssIHRpbWVvdXQpOwogCX0KICAg ICB9CiAgIHNjbV9pX3B0aHJlYWRfbXV0ZXhfdW5sb2NrICgmbS0+bG9jayk7Ci0gIHJldHVybiBt c2c7CisgIHJldHVybiBlcnI7CiB9CiAKLVNDTV9ERUZJTkUgKHNjbV9sb2NrX211dGV4LCAibG9j ay1tdXRleCIsIDEsIDAsIDAsCi0JICAgIChTQ00gbXgpLAorU0NNIHNjbV9sb2NrX211dGV4IChT Q00gbXgpCit7CisgIHJldHVybiBzY21fbG9ja19tdXRleF90aW1lZCAobXgsIFNDTV9VTkRFRklO RUQpOworfQorCitTQ01fREVGSU5FIChzY21fbG9ja19tdXRleF90aW1lZCwgImxvY2stbXV0ZXgi LCAxLCAxLCAwLAorC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NwZWMgKHRpbWVvdXQsICZjd2FpdHRpbWUpOworICAgICAg d2FpdHRpbWUgPSAmY3dhaXR0aW1lOworICAgIH0KKworICBleGNlcHRpb24gPSBmYXRfbXV0ZXhf bG9jayAobSwgd2FpdHRpbWUsICZyZXQpOworICBpZiAoIXNjbV9pc19mYWxzZSAoZXhjZXB0aW9u KSkKKyAgICBzY21faXRocm93IChTQ01fQ0FSIChleGNlcHRpb24pLCBzY21fbGlzdF8xIChTQ01f Q0RSIChleGNlcHRpb24pKSwgMSk7CisgIHJldHVybiByZXQgPyBTQ01fQk9PTF9UIDogU0NNX0JP T0xfRjsKIH0KICN1bmRlZiBGVU5DX05BTUUKIApAQCAtMTE2OCw3MSArMTMzMSwxMzQgQEAKIAkJ CQkgICAgICAgU0NNX0ZfV0lORF9FWFBMSUNJVExZKTsKIH0KIAotc3RhdGljIGNoYXIgKgotZmF0 X211dGV4X3RyeWxvY2sgKGZhdF9tdXRleCAqbSwgaW50ICpyZXNwKQotewotICBjaGFyICptc2cg PSBOVUxMOwotICBTQ00gdGhyZWFkID0gc2NtX2N1cnJlbnRfdGhyZWFkICgpOwotCi0gICpyZXNw ID0gMTsKLSAgc2NtX2lfcHRocmVhZF9tdXRleF9sb2NrICgmbS0+bG9jayk7Ci0gIGlmIChzY21f aXNfZmFsc2UgKG0tPm93bmVyKSkKLSAgICBtLT5vd25lciA9IHRocmVhZDsKLSAgZWxzZSBpZiAo c2NtX2lzX2VxIChtLT5vd25lciwgdGhyZWFkKSkKLSAgICB7Ci0gICAgICBpZiAobS0+bGV2ZWwg Pj0gMCkKLQltLT5sZXZlbCsrOwotICAgICAgZWxzZQotCW1zZyA9ICJtdXRleCBhbHJlYWR5IGxv Y2tlZCBieSBjdXJyZW50IHRocmVhZCI7Ci0gICAgfQotICBlbHNlCi0gICAgKnJlc3AgPSAwOwot ICBzY21faV9wdGhyZWFkX211dGV4X3VubG9jayAoJm0tPmxvY2spOwotICByZXR1cm4gbXNnOwot fQotCiBTQ01fREVGSU5FIChzY21fdHJ5X211dGV4LCAidHJ5LW11dGV4IiwgMSwgMCwgMCwKIAkg ICAgKFNDTSBtdXRleCksCiAiVHJ5IHRvIGxvY2sgQHZhcnttdXRleH0uIElmIHRoZSBtdXRleCBp cyBhbHJlYWR5IGxvY2tlZCBieSBzb21lb25lICIKICJlbHNlLCByZXR1cm4gQGNvZGV7I2Z9LiAg RWxzZSBsb2NrIHRoZSBtdXRleCBhbmQgcmV0dXJuIEBjb2RleyN0fS4gIikKICNkZWZpbmUgRlVO Q19OQU1FIHNfc2NtX3RyeV9tdXRleAogewotICBjaGFyICptc2c7Ci0gIGludCByZXM7CisgIFND TSBleGNlcHRpb247CisgIGludCByZXQgPSAwOworICBzY21fdF90aW1lc3BlYyBjd2FpdHRpbWUs ICp3YWl0dGltZSA9IE5VTEw7CiAKICAgU0NNX1ZBTElEQVRFX01VVEVYICgxLCBtdXRleCk7CisK KyAgdG9fdGltZXNwZWMgKHNjbV9mcm9tX2ludCgwKSwgJmN3YWl0dGltZSk7CisgIHdhaXR0aW1l ID0gJmN3YWl0dGltZTsKICAgCi0gIG1zZyA9IGZhdF9tdXRleF90cnlsb2NrIChTQ01fTVVURVhf REFUQSAobXV0ZXgpLCAmcmVzKTsKLSAgaWYgKG1zZykKLSAgICBzY21fbWlzY19lcnJvciAoTlVM TCwgbXNnLCBTQ01fRU9MKTsKLSAgcmV0dXJuIHNjbV9mcm9tX2Jvb2wgKHJlcyk7CisgIGV4Y2Vw dGlvbiA9IGZhdF9tdXRleF9sb2NrIChtdXRleCwgd2FpdHRpbWUsICZyZXQpOworICBpZiAoIXNj bV9pc19mYWxzZSAoZXhjZXB0aW9uKSkKKyAgICBzY21faXRocm93IChTQ01fQ0FSIChleGNlcHRp b24pLCBzY21fbGlzdF8xIChTQ01fQ0RSIChleGNlcHRpb24pKSwgMSk7CisgIHJldHVybiByZXQg PyBTQ01fQk9PTF9UIDogU0NNX0JPT0xfRjsKIH0KICN1bmRlZiBGVU5DX05BT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kIGJ5IGN1cnJlbnQgdGhyZWFkIjsKKwl7CisJICBpZiAoIW0t PnVuY2hlY2tlZF91bmxvY2spCisJICAgIHNjbV9taXNjX2Vycm9yIChOVUxMLCAibXV0ZXggbm90 IGxvY2tlZCIsIFNDTV9FT0wpOworCX0KKyAgICAgIGVsc2UgaWYgKCFtLT5hbGxvd19leHRlcm5h bF91bmxvY2spCisJc2NtX21pc2NfZXJyb3IgKE5VTEwsICJtdXRleCBub3QgbG9ja2VkIGJ5IGN1 cnJlbnQgdGhyZWFkIiwgU0NNX0VPTCk7CisgICAgfQorCisgIGlmICghIChTQ01fVU5CTkRQIChj b25kKSkpCisgICAgeworICAgICAgaW50IGxvY2tfcmV0ID0gMDsKKworICAgICAgYyA9IFNDTV9D T05EVkFSX0RBVEEgKGNvbmQpOworICAgICAgd2hpbGUgKDEpCisJeworCSAgaW50IGJyayA9IDA7 CisKKwkgIHNjbV9pX3NjbV9wdGhyZWFkX211dGV4X2xvY2sgKCZjLT5sb2NrKTsKKwkgIGlmICht LT5sZXZlbCA+IDApCisJICAgIG0tPmxldmVsLS07CisJICBlbHNlCisJICAgIG0tPm93bmVyID0g dW5ibG9ja19mcm9tX3F1ZXVlIChtLT53YWl0aW5nKTsKKwkgIHNjbV9pX3B0aHJlYWRfbXV0ZXhf dW5sb2NrICgmbS0+bG9jayk7CisJICAKKwkgIHQtPmJsb2NrX2FzeW5jcysrOworCSAgCisJICBl cnIgPSBibG9ja19zZWxmIChjLT53YWl0aW5nLCBjb25kLCAmYy0+bG9jaywgd2FpdHRpbWUpOwor CisJICBpZiAoZXJyID09IDApCisJICAgIHsKKwkgICAgICByZXQgPSAxOworCSAgICAgIGJyayA9 IDE7CisJICAgIH0KKwkgIGVsc2UgaWYgKGVyciA9PSBFVElNRURPVVQpCisJICAgIHsKKwkgICAg ICByZXQgPSAwOworCSAgICAgIGJyayA9IDE7CisJICAgIH0KKwkgIGVsc2UgaWYgKGVyciAhPSBF SU5UUikKKwkgICAgewkgICAgICAKKwkgICAgICBlcnJubyA9IGVycjsKKwkgICAgICBzY21faV9w dGhyZWFkX211dGV4X3VubG9jayAoJmMtPmxvY2spOworCSAgICAgIHNjbV9zeXNlcnJvciAoTlVM TCk7CisJICAgIH0JICAKKworCSAgaWYgKGJyaykKKwkgICAgeworCSAgICAgIGlmIChyZWxvY2sp CisJCWZhdF9tdXRleF9sb2NrIChtdXRleCwgTlVMTCwgJmxvY2tfcmV0KTsKKwkgICAgICBzY21f aV9wdGhyZWFkX211dGV4X3VubG9jayAoJmMtPmxvY2spOworCSAgICAgIGJyZWFrOworCSAgICB9 CisJICAKKwkgIHNjbV9pX3B0aHJlYWRfbXV0ZXhfdW5sb2NrICgmYy0+bG9jayk7CisKKwkgIHQt PmJsb2NrX2FzeW5jcy0tOworCSAgc2NtX2FzeW5jX2NsaWNrICgpOworCSAgCisJICBzY21fcmVt ZW1iZXJfdXB0b19oZXJlXzIgKGNvbmQsIG11dGV4KTsKKworCSAgc2NtX2lfc2NtX3B0aHJlYWRf bXV0ZXhfbG9jayAoJm0tPmxvY2spOworCX0KICAgICB9Ci0gIGVsc2UgaWYgKG0tPmxldmVsID4g MCkKLSAgICBtLT5sZXZlbC0tOwogICBlbHNlCi0gICAgbS0+b3duZXIgPSB1bmJsb2NrX2Zyb21f cXVldWUgKG0tPndhaXRpbmcpOwotICBzY21faV9wdGhyZWFkX211dGV4X3VubG9jayAoJm0tPmxv Y2spOworICAgIHsKKyAgICAgIGlmIChtLT5sZXZlbCA+IDApCisJbS0+bGV2ZWwtLTsKKyAgICAg IGVsc2UKKwltLT5vd25lciA9IHVuYmxvY2tfZnJvbV9xdWV1ZSAobS0+d2FpdGluZyk7CisgICAg ICBzY21faV9wdGhyZWFkX211dGV4X3VubG9jayAoJm0tPmxvY2spOworICAgICAgcmV0ID0gMTsK KyAgICB9CisgIAorICByZXR1cm4gcmV0OworfQogCi0gIHJldHVybiBtc2c7CitTQ00gc2NtX3Vu bG9ja19tdXRleCAoU0NNIG14KQo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CisKICAgU0NN X1ZBTElEQVRFX01VVEVYICgxLCBteCk7Ci0gIAotICBtc2cgPSBmYXRfbXV0ZXhfdW5sb2NrIChT Q01fTVVURVhfREFUQSAobXgpKTsKLSAgaWYgKG1zZykKLSAgICBzY21fbWlzY19lcnJvciAoTlVM TCwgbXNnLCBTQ01fRU9MKTsKLSAgcmV0dXJuIFNDTV9CT09MX1Q7CisgIGlmICghIChTQ01fVU5C TkRQIChjb25kKSkpCisgICAgeworICAgICAgU0NNX1ZBTElEQVRFX0NPTkRWQVIgKDIsIGNvbmQp OworCisgICAgICBpZiAoISAoU0NNX1VOQk5EUCAodGltZW91dCkpKQorCXsKKwkgIHRvX3RpbWVz cGVjICh0aW1lb3V0LCAmY3dhaXR0aW1lKTsKKwkgIHdhaXR0aW1lID0gJmN3YWl0dGltZTsKKwl9 CisgICAgfQorCisgIHJldHVybiBmYXRfbXV0ZXhfdW5sb2NrIChteCwgY29uZCwgd2FpdHRpbWUs IDApID8gU0NNX0JPT0xfVCA6IFNDTV9CT09MX0Y7CiB9CiAjdW5kZWYgRlVOQ19OQU1FCiAKK1ND TV9ERUZJTkUgKHNjbV9tdXRleF9wLCAibXV0ZXg/IiwgMSwgMCwgMCwKKwkgICAgKFNDTSBvYmop LAorCSAgICAiUmV0dXJuIEBjb2RleyN0fSBpZiBAdmFye29ian0gaXMgYSBtdXRleC4iKQorI2Rl ZmluZSBGVU5DX05BTUUgc19zY21fbXV0ZXhfcAoreworICByZXR1cm4gU0NNX01VVEVYUCAob2Jq KSA/IFNDTV9CT09MX1QgOiBTQ01fQk9PTF9GOworfQorI3VuZGVmIEZVTkNfTkFNRSAKKwogI2lm IDAKIAogU0NNX0RFRklORSAoc2NtX211dGV4X293bmVyLCAibXV0ZXgtb3duZXIiLCAxLCAwLCAw LApAQCAtMTI3NywxNiArMTUyMCw2IEBACiAKICNlbmRpZgogCi0vKioqIEZhdCBjb25kaXRpb24g dmFyaWFibGVzICovCi0KLXR5cGVkZWYgc3RydWN0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NiA0IDIgMCkpKSkpCiAKICAgICAgIDs7CisgICAgICA7OyB0aW1lZCBtdXRleCBs b2NraW5nCisgICAgICA7OworCisgICAgICAod2l0aC10ZXN0LXByZWZpeCAibG9jay1tdXRleCIK KworCShwYXNzLWlmICJ0aW1lZCBsb2NraW5nIGZhaWxzIGlmIHRpbWVvdXQgZXhjZWVkZWQiCisJ ICAobGV0ICgobSAobWFrZS1tdXRleCkpKQorCSAgICAobG9jay1tdXRleCBtKQorCSAgICAobGV0 ICgodCAoYmVnaW4tdGhyZWFkIChsb2NrLW11dGV4IG0gKCsgKGN1cnJlbnQtdGltZSkgMSkpKSkp CisJICAgICAgKG5vdCAoam9pbi10aHJlYWQgdCkpKSkpCisKKyAgICAgICAgKHBhc3MtaWYgInRp bWVkIGxvY2tpbmcgc3VjY2VlZHMgaWYgbXV0ZXggdW5sb2NrZWQgd2l0aGluIHRpbWVvdXQiCisJ ICAobGV0KiAoKG0gKG1ha2UtbXV0ZXgpKQorCQkgKGMgKG1ha2UtY29uZGl0aW9uLXZhcmlhYmxl KSkKKwkJIChjbSAobWFrZS1tdXRleCkpKQorCSAgICAobG9jay1tdXRleCBjbSkKKwkgICAgKGxl dCAoKHQgKGJlZ2luLXRocmVhZCAoYmVnaW4gKGxvY2stbXV0ZXggY20pCisJCQkJCSAgKHNpZ25h bC1jb25kaXRpb24tdmFyaWFibGUgYykKKwkJCQkJICAodW5sb2NrLW11dGV4IGNtKQorCQkJCQkg IChsb2NrLW11dGV4IG0KKwkJCQkJCSAgICAgICgrIChjdXJyZW50LXRpbWUpIDIpKSkpKSkKKwkg ICAgICAobG9jay1tdXRleCBtKQorCSAgICAgICh3YWl0LWNvbmRpdGlvbi12YXJpYWJsZSBjIGNt KQorCSAgICAgICh1bmxvY2stbXV0ZXggY20pCisJICAgICAgKHNsZWVwIDEpCisJICAgICAgKHVu bG9jay1tdXRleCBtKQorCSAgICAgIChqb2luLXRocmVhZCB0KSkpKSkKKworICAgICAgOzsKKyAg ICAgIDs7IHRpbWVkIG11dGV4IHVubG9ja2luZworICAgICAgOzsKKworICAgICAgKHdpdGgtdGVz dC1wcmVmaXggInVubG9jay1tdXRleCIKKworICAgICAgICAocGFzcy1pZiAidGltZWQgdW5sb2Nr aW5nIHJldHVybnMgI2YgaWYgdGltZW91dCBleGNlZWRlZCIKKyAgICAgICAgICAobGV0ICgobSAo bWFrZS1tdXRleCkpCisJCShjIChtYWtlLWNvbmRpdGlvbi12YXJpYWJsZSkpKQorCSAgICAobG9j ay1tdXRleCBtKQorCSAgICAobm90ICh1bmxvY2stbXV0ZXggbSBjIChjdXJyZW50LXRpbWUpKSkp KQorCisgICAgICAgIChwYXNzLWlmICJ0aW1lZCB1bmxvY2tpbmcgcmV0dXJucyAjdCBpZiBjb25k aXRpb24gc2lnbmFsZWQiCisJICAobGV0ICgobTEgKG1ha2UtbXV0ZXgpKQorCQkobTIgKG1ha2Ut bXV0ZXgpKQorCQkoYzEgKG1ha2UtY29uZGl0aW9uLXZhcmlhYmxlKSkKKwkJKGMyIChtYWtlLWNv bmRpdGlvbi12YXJpYWJsZSkpKQorCSAgICAobG9jay1tdXRleCBtMSkKKwkgICAgKGxldCAoKHQg KGJlZ2luLXRocmVhZCAoYmVnaW4gKGxvY2stbXV0ZXggbTEpCisJCQkJCSAgKHNpZ25hbC1jb25k aXRpb24tdmFyaWFibGUgYzEpCisJCQkJCSAgKGxvY2stbXV0ZXggbTIpCisJCQkJCSAgKHVubG9j ay1tdXRleCBtMSkKKwkJCQkJICAodW5sb2NrLW11dGV4IG0yIAorCQkJCQkJCWMyIAorCQkJCQkJ CSgrIChjdXJyZW50LXRpbWUpIAorCQkJCQkJCSAgIDIpKSkpKSkKKwkgICAgICAod2FpdC1jb25k aXRpb24tdmFyaWFibGUgYzEgbTEpCisJICAgICAgKHVubG9jay1tdXRleCBtMSkKKwkgICAgICAo bG9jay1tdXRleCBtMikKKwkgICAgICAoc2lnbmFsLWNvbmRpdGlvbi12YXJpYWJsZSBjMikKKwkg ICAgICAodW5sb2NrLW11dGV4IG0yKQorCSAgICAgIChqb2luLXRocmVhZCB0KSkpKSkKKworICAg ICAgOzsKKyAgICAgIDs7IHRpbWVkIGpvaW5pbmcKKyAgICAgIDs7CisKKyAgICAgICh3aXRoLXRl c3QtcHJlZml4ICJqb2luLXRocmVhZCIKKworCShwYXNzLWlmICJ0aW1lZCBqb2luaW5nIGZhaWxz IGlmIHRpbWVvdXQgZXhjZWVkZWQiCisJICAobGV0KiAoKG0gKG1ha2UtbXV0ZXgpKQorCQkgKGMg KG1ha2UtY29uZGl0aW9uLXZhcmlhYmxlKSkKKwkJICh0IChiZWdpbi10aHJlYWQgKGJlZ2luIChs b2NrLW11dGV4IG0pCisJCQkJCSAod2FpdC1jb25kaXRpb24tdmFyaWFibGUgYyBtKSkpKQorCQkg KHIgKGpvaW4tdGhyZWFkIHQgKGN1cnJlbnQtdGltZSkpKSkKKwkgICAgKGNhbmNlbC10aHJlYWQg dCkKKwkgICAgKG5vdCByKSkpCisgICAgICAKKyAgICAgICAgKHBhc3MtaWYgImpvaW4tdGhyZWFk IHJldHVybnMgdGltZW91dHZhbCBvbiB0aW1lb3V0IgorICAgICAgICAgIChsZXQqICgobSAobWFr ZS1tdXRleCkpCisJCSAoYyAobWFrZS1jb25kaXRpb24tdmFyaWFibGUpKQorCQkgKHQgKGJlZ2lu LXRocmVhZCAoYmVnaW4gKGxvY2stbXV0ZXggbSkKKwkJCQkJICh3YWl0LWNvbmRpdGlvbi12YXJp YWJsZSBjIG0pKSkpCisJCSAociAoam9pbi10aHJlYWQgdCAoY3VycmVudC10aW1lKSAnZm9vKSkp CisJICAgIChjYW5jZWwtdGhyZWFkIHQpCisJICAgIChlcT8gciAnZm9vKSkpCisJICAgIAorCisJ KHBhc3MtaWYgInRpbWVkIGpvaW5pbmcgc3VjY2VlZHMgaWYgdGhyZWFkIGV4aXRzIHdpdGhpbiB0 aW1lb3V0IgorICAgICAgICAgIChsZXQgKCh0IChiZWdpbi10aHJlYWQgKGJlZ2luIChzbGVlcCAx KSAjdCkpKSkKKwkgICAgKGpvaW4tdGhyZWFkIHQgKCsgKGN1cnJlbnQtdGltZSkgMikpKSkpCisK KyAgICAgIDs7CiAgICAgICA7OyB0aHJlYWQgY2FuY2VsbGF0aW9uCiAgICAgICA7OwogCkBAIC0x ODUsNCArMjc2LDM1IEBACiAJICAgICAgKGVxPyAoam9pbi10aHJlYWQgdCkgJ2JhcikpKSkKIAog CShwYXNzLWlmICJpbml0aWFsIGhhbmRsZXIgaXMgZmFsc2UiCi0JICAobm90ICh0aHJlYWQtY2xl YW51cCAoY3VycmVudC10aHJlYWQpKSkpKSkpCisJICAobm90ICh0aHJlYWQtY2xlYW51cCAoY3Vy cmVudC10aHJlYWQpKSkpKQorCisgICAgICA7OworICAgICAgOzsgbXV0ZXggYmVoYXZpb3IKKyAg ICAgIDs7CisKKyAgICAgICh3aXRoLXRlc3QtcHJlZml4ICJtdXRleC1iZWhhdmlvciIKKworICAg ICAgICAocGFzcy1pZiAidW5jaGVja2VkIHVubG9jayIKKyAgICAgICAgICAobGV0KiAoKG0gKG1h a2UtbXV0ZXggJ3VuY2hlY2tlZC11bmxvY2spKSkKKwkgICAgKHVubG9jay1tdXRleCBtKSkpCisK KwkocGFzcy1pZiAiYWxsb3cgZXh0ZXJuYWwgdW5sb2NrIgorCSAgKGxldCogKChtIChtYWtlLW11 dGV4ICdhbGxvdy1leHRlcm5hbC11bmxvY2spKQorCQkgKHQgKGJlZ2luLXRocmVhZCAobG9jay1t dXRleCBtKSkpKQorCSAgICAoam9pbi10aHJlYWQgdCkKKwkgICAgKHVubG9jay1tdXRleCBtKSkp CisKKwkocGFzcy1pZiAicmVjdXJzaXZlIG11dGV4ZXMiCisJICAobGV0KiAoKG0gKG1ha2UtbXV0 ZXggJ3JlY3Vyc2l2ZSkpKQorCSAgICAobG9jay1tdXRleCBtKQorCSAgICAobG9jay1tdXRleCBt KSkpCQkgCisKKwkocGFzcy1pZiAibG9ja2luZyBhYmFuZG9uZWQgbXV0ZXggdGhyb3dzIGV4Y2Vw dGlvbiIKKyAgICAgICAgICAobGV0KiAoKG0gKG1ha2UtbXV0ZXgpKQorCQkgKHQgKGJlZ2luLXRo cmVhZCAobG9jay1tdXRleCBtKSkpCisJCSAoc3VjY2VzcyAjZikpCisJICAgIChqb2luLXRocmVh ZCB0KQorCSAgICAoY2F0Y2ggJ2FiYW5kb25lZC1tdXRleC1lcnJvcgorCQkgICAobGFtYmRhICgp IChsb2NrLW11dGV4IG0pKQorCQkgICAobGFtYmRhIGtleSAoc2V0ISBzdWNjZXNzICN0KSkpCisJ ICAgIHN1Y2Nlc3MpKSkpKQo= ------=_Part_13712_11533272.1204401368022--