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: Mon, 29 Oct 2007 10:37:33 -0400 Message-ID: <2bc5f8210710290737j32fe7b1s86aaa7e084bb69b6@mail.gmail.com> References: <2bc5f8210710101854m1254160ei451026182b87e767@mail.gmail.com> <87lka8pvv3.fsf@laas.fr> <2bc5f8210710120831q5c90dcfes930595fa3eb16a77@mail.gmail.com> <2bc5f8210710151526t6345200ao997988c1877e8cce@mail.gmail.com> <4713EB20.3080608@member.fsf.org> <2bc5f8210710151547l5e245ed1ucaf07e9006e95387@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_16972_26741729.1193668653202" X-Trace: ger.gmane.org 1193668692 13424 80.91.229.12 (29 Oct 2007 14:38:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Oct 2007 14:38:12 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Oct 29 15:38:13 2007 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 1ImVkc-0008AP-UW for guile-devel@m.gmane.org; Mon, 29 Oct 2007 15:38:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ImVkS-0002fh-Nh for guile-devel@m.gmane.org; Mon, 29 Oct 2007 10:37:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ImVkL-0002fL-GP for guile-devel@gnu.org; Mon, 29 Oct 2007 10:37:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ImVkI-0002ed-Dt for guile-devel@gnu.org; Mon, 29 Oct 2007 10:37:41 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ImVkI-0002eX-70 for guile-devel@gnu.org; Mon, 29 Oct 2007 10:37:38 -0400 Original-Received: from mu-out-0910.google.com ([209.85.134.187]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ImVkG-0005gI-86 for guile-devel@gnu.org; Mon, 29 Oct 2007 10:37:37 -0400 Original-Received: by mu-out-0910.google.com with SMTP id g7so2112371muf for ; Mon, 29 Oct 2007 07:37:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=TKWjmt1DY2VjD1bPOoslAXRWUVzFvm0ZOfZ9BQ85Mds=; b=Aip6EY1b9N6h6bpghAWYFf3m//k8U95X+YWxWgtAQj9GplGHUkxYtIEaC6vYbiM/vUC5fI44TKsmwgvvcRDnfDVoTsSF3bAmnHnWtnO/1dmNegZXmOq2MB7SbpbTf38bTmw9GcoRhILkxP94rFOvazSb6tp7/BK4A2nG4rgncZ8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=Lrf+8bWSQ7uH3ZMM5k9T1ajdh32ufm9aGlSE+1JoTVRc9YMsQ/olfSILzj6PVJNFjTQJ3nW9jaAu8HotwjyL+QaGO2HK9QuK2Cq8q4OeBBR7smhblyi5zirb16PHBfWqlqerZVLP8/nLNB5VLG7043bb6L+WGD2MlwXCCkpmKck= Original-Received: by 10.82.107.15 with SMTP id f15mr10511985buc.1193668653231; Mon, 29 Oct 2007 07:37:33 -0700 (PDT) Original-Received: by 10.82.166.1 with HTTP; Mon, 29 Oct 2007 07:37:33 -0700 (PDT) In-Reply-To: <2bc5f8210710151547l5e245ed1ucaf07e9006e95387@mail.gmail.com> 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:6862 Archived-At: ------=_Part_16972_26741729.1193668653202 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Guilers, Find attached a first draft of a patch to add SRFI-18 support to Guile. The patch contains the necessary modifications to Guile's C code to support SRFI-18, which is provided as a Scheme module (also attached). I don't believe any breaking changes to the API are introduced by this code, and, in general, the only behavior that is significantly different is that which was previously "unspecified" or of dubious correctness -- e.g., unlocking mutexes from outside the threads that originally locked them, or leaving abandoned mutexes locked forever. I realize this is kind of a big patch, so I've included some, uh, commentary to help you guys sift through it. I'm working on updating the Texinfo documentation, but didn't want to wait to submit, as the scope and content of this patch could conceivably change. I'm also attaching some test code that might be helpful in illustrating some of the concepts involved in SRFI-18. Of course, I also encourage everyone to take a look at the SRFI itself, which is available at http://srfi.schemers.org/srfi-18/srfi-18.html. Please let me know if you have any questions / comments! Best Regards, Julian SIGNIFICANT CHANGES TO THREADS.H ================================ * Three members have been added to the thread data structure: ** admin_mutex, which is a lighter-weight version of the thread_admin_mutex, which should be used instead of thread_admin_mutex in situations requiring synchronous access to thread-specific information, such as checking whether a thread has been marked exited, that do not require access to the global list of threads ** mutexes, a SCM list of mutexes owned by a thread. This is necessary so that threads waiting on mutexes that an exiting thread is abandoning can be notified ** exception, a SCM holding any uncaught exceptions thrown by the thread or its cleanup handler. We need this so we can deliver uncaught exceptions to threads that join on a terminated thread NEW C FUNCTIONS =============== * scm_join_thread_timed (t, timeout, timeout_val): An overload of scm_join_thread featuring extended timeout semantics from SRFI-18 * scm_thread_p (obj): A type predicate for threads * scm_lock_mutex_timed (m, abstime, thread): An overload of scm_lock_mutex featuring extended timeout and ownership semantics from SRFI-18 * scm_unlock_mutex_timed (m, cond, abstime): An overload of scm_unlock_mutex featuring extended timeout semantics from SRFI-18 * scm_mutex_state (m): Mutex state reporting from SRFI-18 * scm_mutex_p (obj): A type predicate for mutexes * scm_condition_variable_p (obj): A type predicate for condition variables NEW SCHEME FUNCTIONS (without loading SRFI-18) ============================================== * join-thread thread -> join-thread thread [timeout [timeoutval]] * thread? obj * lock-mutex mutex -> lock-mutex mutex [timeout [owner]] * unlock-mutex mutex -> unlock-mutex mutex [cond [timeout]] * mutex-state mutex * mutex? obj * condition-variable? obj SIGNIFICANT CHANGES TO THREADS.C ================================ * A static function, scm_to_timespec, has been added to thread.c that converts SCM timeouts -- either in numerical form or as (secs . usecs) -- to an scm_t_timespec * Because the owner of a locked mutex can be #f, unblock_from_queue now returns SCM_UNDEFINED when a queue is empty, in order to avoid ambiguity. This is purely for consistency -- #f cannot actually be added to a queue * The catch calls in do_thread_exit and really_launch now include a handler (if the caller does not specify one already), exception_preserve_catch_handler, which saves exception data in the thread's exception field * scm_join_thread, which now calls scm_join_thread_timed, will rethrow any uncaught exceptions thrown by the terminated thread * fat_mutex_lock and fat_mutex_unlock now add and remove mutexes from a thread's list of locked mutexes. As part of thread exit, other threads waiting on mutexes in this list are woken up * An unlocked fat_mutex now has its owner set to SCM_UNDEFINED, not SCM_BOOL_F * fat_mutex_lock has been largely rewritten (although the behavior is almost exactly the same for calls that do not specify a timeout) in order to deal with SRFI-18's concept of mutex states. It is now a loop that synchronously inspects the current state of the mutex to determine whether it can be locked, sleeping on the mutex's condition variable if it cannot be. As per SRFI-18, an attempt to lock an abandoned mutex will succeed, although an abandoned-mutex-exception will be thrown. fat_mutex_lock now returns an exception instead of a char *, indicating the success of the lock via a passed-in int pointer. * fat_mutex_unlock now allows a mutex to be unlocked from any thread, as per SRFI-18 SIGNIFICANT CHANGES TO SCMSIGS.C ================================ * The scm_spawn_thread call that launches the signal delivery thread no longer specifies a handler. No one should call scm_spawn_thread with a handler, because of an already-present deadlock in 1.8.x -- in a multithreaded context, a guile mode thread (i.e., one that has locked its heap mutex) may attempt to enter a critical section in eval.i.c at the same time a non-guile mode thread created by scm_spawn_thread is within a critical section in make_jmpbuf while setting up a catch handler and attempts to do a GC ------=_Part_16972_26741729.1193668653202 Content-Type: text/x-patch; name=srfi-18.HEAD.patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_f8d3cxka Content-Disposition: attachment; filename=srfi-18.HEAD.patch SW5kZXg6IHNjbXNpZ3MuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJDUyBmaWxlOiAvc291cmNlcy9ndWlsZS9ndWls ZS9ndWlsZS1jb3JlL2xpYmd1aWxlL3NjbXNpZ3MuYyx2CnJldHJpZXZpbmcgcmV2aXNpb24gMS45 OApkaWZmIC1hIC11IC1yMS45OCBzY21zaWdzLmMKLS0tIHNjbXNpZ3MuYwkyMCBPY3QgMjAwNyAx MTowOTo1OCAtMDAwMAkxLjk4CisrKyBzY21zaWdzLmMJMjkgT2N0IDIwMDcgMTM6MTU6MzEgLTAw MDAKQEAgLTIxMiw5ICsyMTIsNyBAQAogCiAgIGlmIChwaXBlIChzaWduYWxfcGlwZSkgIT0gMCkK ICAgICBzY21fc3lzZXJyb3IgKE5VTEwpOwotICBzaWduYWxfdGhyZWFkID0gc2NtX3NwYXduX3Ro cmVhZCAoc2lnbmFsX2RlbGl2ZXJ5X3RocmVhZCwgTlVMTCwKLQkJCQkgICAgc2NtX2hhbmRsZV9i eV9tZXNzYWdlLAotCQkJCSAgICAic2lnbmFsIGRlbGl2ZXJ5IHRocmVhZCIpOworICBzaWduYWxf dGhyZWFkID0gc2NtX3NwYXduX3RocmVhZCAoc2lnbmFsX2RlbGl2ZXJ5X3RocmVhZCwgTlVMTCwg TlVMTCwgTlVMTCk7CiAgIHNjbV9pX3NpZ25hbF9kZWxpdmVy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BzY21faV9wdGhyZWFkX211dGV4X3VubG9jayAoJnQtPmFkbWluX211dGV4KTsKIAkgIFND TV9USUNLOwotCSAgc2NtX2lfc2NtX3B0aHJlYWRfbXV0ZXhfbG9jayAoJnRocmVhZF9hZG1pbl9t dXRleCk7CisJICBzY21faV9zY21fcHRocmVhZF9tdXRleF9sb2NrICgmdC0+YWRtaW5fbXV0ZXgp OwogCX0KICAgICB9Ci0gIHJlcyA9IHQtPnJlc3VsdDsKKyAgCisgIGlmICghdGltZWRfb3V0KQor ICAgIHsKKyAgICAgIHJlcyA9IHQtPnJlc3VsdDsKKyAgICAgIGV4ID0gdC0+ZXhjZXB0aW9uOwor ICAgIH0KIAotICBzY21faV9wdGhyZWFkX211dGV4X3VubG9jayAoJnRocmVhZF9hZG1pbl9tdXRl eCk7CisgIHNjbV9pX3B0aHJlYWRfbXV0ZXhfdW5sb2NrICgmdC0+YWRtaW5fbXV0ZXgpOwogCi0g IHJldHVybiByZXM7CisgIGlmICghc2NtX2lzX2ZhbHNlIChleCkpCisgICAgc2NtX2l0aHJvdyAo U0NNX0NBUiAoZXgpLCBTQ01fQ0RSIChleCksIDEpOworCisgIHJldHVybiByZXM7ICAKK30KKyN1 bmRlZiBGVU5DX05BTUUKKworU0NNX0RFRklORSAoc2NtX3RocmVhZF9wLCAidGhyZWFkPyIsIDEs IDAsIDAsCisJICAgIChTQ00gb2JqKSwKKwkgICAgIlJldHVybiBAY29kZXsjdH0gaWYgQHZhcntv Ymp9IGlzIGEgdGhyZWFkLiIpCisjZGVmaW5lIEZVTkNfTkFNRSBzX3NjbV90aHJlYWRfcAorewor ICByZXR1cm4gU0NNX0lfSVNfVEhSRUFEKG9iaikgPyBTQ01fQk9PTF9UIDogU0NNX0JPT0xfRjsK IH0KICN1bmRlZiBGVU5DX05BTUUKIApAQCAtMTAzNCwxNiArMTE1MiwzNiBAQAogICAgZGVidWdn aW5nLgogKi8KIAorI2RlZmluZSBNVVRFWF9TVEFURV9VTkxPQ0tFRF9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p3YWl0dGltZSkKIHsKICAgc2NtX2lfdGhyZWFkICp0ID0gU0NNX0lfQ1VS UkVOVF9USFJFQUQ7CisgIFNDTSBvbGRfb3duZXIgPSBTQ01fVU5ERUZJTkVEOworCiAgIGZhdF9j b25kICpjID0gU0NNX0NPTkRWQVJfREFUQSAoY29uZCk7CiAgIGZhdF9tdXRleCAqbSA9IFNDTV9N VVRFWF9EQVRBIChtdXRleCk7Ci0gIGNvbnN0IGNoYXIgKm1zZzsKLSAgaW50IGVyciA9IDA7Cisg IGludCBlcnIgPSAwLCByZXQgPSAwOwogCiAgIHdoaWxlICgxKQogICAgIHsKKyAgICAgIG9sZF9v d25lciA9IG0tPm93bmVyOworICAgICAgCiAgICAgICBzY21faV9zY21fcHRocmVhZF9tdXRleF9s b2NrICgmYy0+bG9jayk7Ci0gICAgICBtc2cgPSBmYXRfbXV0ZXhfdW5sb2NrIChtKTsKKyAgICAg IGZhdF9tdXRleF91bmxvY2sgKG11dGV4KTsKKwogICAgICAgdC0+YmxvY2tfYXN5bmNzKys7Ci0g ICAgICBpZiAobXNnID09IE5VTEwpCi0JewotCSAgZXJyID0gYmxvY2tfc2VsZiAoYy0+d2FpdGlu ZywgY29uZCwgJmMtPmxvY2ssIHdhaXR0aW1lKTsKLQkgIHNjbV9pX3B0aHJlYWRfbXV0ZXhfdW5s b2NrICgmYy0+bG9jayk7Ci0JICBmYXRfbXV0ZXhfbG9jayAobXV0ZXgpOwotCX0KLSAgICAgIGVs c2UKLQlzY21faV9wdGhyZWFkX211dGV4X3VubG9jayAoJmMtPmxvY2spOworICAgICAgCisgICAg ICBlcnIgPSBibG9ja19zZWxmIChjLT53YWl0aW5nLCBjb25kLCAmYy0+bG9jaywgd2FpdHRpbWUp OworCisgICAgICBzY21faV9wdGhyZWFkX211dGV4X3VubG9jayAoJmMtPmxvY2spOworICAgICAg ZmF0X211dGV4X2xvY2sgKG11dGV4LCBvbGRfb3duZXIsIE5VTEwsICZyZXQpOworCiAgICAgICB0 LT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YWJsZSAoU0NNIGNvbmQpOwogU0NNX0FQSSBTQ00gc2NtX2Jyb2FkY2FzdF9jb25kaXRp b25fdmFyaWFibGUgKFNDTSBjb25kKTsKK1NDTV9BUEkgU0NNIHNjbV9jb25kaXRpb25fdmFyaWFi bGVfcCAoU0NNIG8pOwogCiBTQ01fQVBJIFNDTSBzY21fY3VycmVudF90aHJlYWQgKHZvaWQpOwog U0NNX0FQSSBTQ00gc2NtX2FsbF90aHJlYWRzICh2b2lkKTsK ------=_Part_16972_26741729.1193668653202 Content-Type: text/x-scheme; name=srfi-18.scm Content-Transfer-Encoding: base64 X-Attachment-Id: f_f8d3eom6 Content-Disposition: attachment; filename=srfi-18.scm Ozs7IHNyZmktMTguc2NtIC0tLSBNdWx0aXRocmVhZGluZyBzdXBwb3J0Cgo7OyBDb3B5cmlnaHQg KEMpIDIwMDcgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuCjs7Cjs7IFRoaXMgbGlicmFy eSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IKOzsgbW9k aWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIExlc3NlciBHZW5lcmFsIFB1YmxpYwo7 OyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBl aXRoZXIKOzsgdmVyc2lvbiAyLjEgb2YgdGhlIExpY2Vuc2UsIG9yIChhdCB5b3VyIG9wdGlvbikg YW55IGxhdGVyIHZlcnNpb24uCjs7IAo7OyBUaGlzIGxpYnJhcnkgaXMgZGlzdHJpYnV0ZWQgaW4g dGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwKOzsgYnV0IFdJVEhPVVQgQU5ZIFdBUlJB TlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YKOzsgTU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WU/ IHRpbWUgInRpbWUtPnNlY29uZHMiKQogICAgICAgKCsgKGNhciB0aW1lKSAoLyAoY2RyIHRpbWUp IDEwMDAwMDApKSkpCgooZGVmaW5lIChzZWNvbmRzLT50aW1lIHgpCiAgKGFuZCAoY2hlY2stYXJn LXR5cGUgbnVtYmVyPyB4ICJzZWNvbmRzLT50aW1lIikKICAgICAgIChsZXQgKChmeCAodHJ1bmNh dGUgeCkpKQoJIChjb25zIChpbmV4YWN0LT5leGFjdCBmeCkKCSAgICAgICAoaW5leGFjdC0+ZXhh Y3QgKHRydW5jYXRlICgqICgtIHggZngpIDEwMDAwMDApKSkpKSkpCgo7OyBzcmZpLTE4LnNjbSBl bmRzIGhlcmU= ------=_Part_16972_26741729.1193668653202 Content-Type: application/octet-stream; name=srfi-18.test Content-Transfer-Encoding: base64 X-Attachment-Id: f_f8d3f04n Content-Disposition: attachment; filename=srfi-18.test Ozs7OyBzcmZpLTE4LnRlc3QgLS0tIFRlc3Qgc3VpdGUgZm9yIEd1aWxlJ3MgU1JGSS0xOCBmdW5j dGlvbnMuIC0qLSBzY2hlbWUgLSotCjs7OzsgSnVsaWFuIEdyYWhhbSwgMjAwNy0xMC0yNgo7Ozs7 Cjs7OzsgQ29weXJpZ2h0IChDKSAyMDA3IEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwgSW5jLgo7 Ozs7IAo7Ozs7IFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJp YnV0ZSBpdCBhbmQvb3IgbW9kaWZ5Cjs7OzsgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUg R2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkKOzs7OyB0aGUgRnJlZSBTb2Z0 d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyLCBvciAoYXQgeW91ciBvcHRpb24pCjs7 OzsgYW55IGxhdGVyI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I2YpKSkpKQogICAgICAobXV0ZXgt bG9jayEgbSkKICAgICAgKHRocmVhZC1zdGFydCEgdCkKICAgICAgKG5vdCAodGhyZWFkLWpvaW4h IHQpKSkpCgogIChwYXNzLWlmICJtdXRleC1sb2NrISByZXR1cm5zIHRydWUgd2hlbiBsb2NrIG9i dGFpbmVkIHdpdGhpbiB0aW1lb3V0IgogICAgKGxldCogKChtIChtYWtlLW11dGV4ICdtdXRleC1s b2NrLTMpKQoJICAgKHQgKG1ha2UtdGhyZWFkIChsYW1iZGEgKCkgCgkJCSAgICAgKG11dGV4LWxv Y2shIG0gKCsgKHRpbWUtPnNlY29uZHMgKGN1cnJlbnQtdGltZSkpIAoJCQkJCSAgICAgICAxMDAp IAoJCQkJCSAgI2YpKSkpKQogICAgICAobXV0ZXgtbG9jayEgbSkKICAgICAgKHRocmVhZC1zdGFy dCEgdCkKICAgICAgKG11dGV4LXVubG9jayEgbSkKICAgICAgKHRocmVhZC1qb2luISB0KSkpCgog IChwYXNzLWlmICJjYW4gbG9jayBtdXRleCBmb3Igbm9uLWN1cnJlbnQgdGhyZWFkIgogICAgKGxl dCogKChtIChtYWtlLW11dGV4ICdtdXRleC1sb2NrLTQpKQoJICAgKHQgKG1ha2UtdGhyZWFkICNm IChsYW1iZGEgKCkgJ2ZvbykpKSkKICAgICAgKG11dGV4LWxvY2shIG0gI2YgdCkKICAgICAgKHRo cmVhZC10ZXJtaW5hdGUhIHQpCiAgICAgIChlcT8gKG11dGV4LXN0YXRlIG0pIHQpKSkKCiAgKHBh c3MtaWYgImxvY2tpbmcgYWJhbmRvbmVkIG11dGV4IHRocm93cyBleGNlcHRpb24iCiAgICAobGV0 KiAoKG0gKG1ha2UtbXV0ZXggJ211dGV4LWxvY2stNSkpCgkgICAodCAobWFrZS10aHJlYWQgKGxh bWJkYSAoKSAobXV0ZXgtbG9jayEgbSkpICdtdXRleC1sb2NrLTUpKQoJICAgKHN1Y2Nlc3MgI2Yp KQogICAgICAodGhyZWFkLXN0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ISBtKQog ICAgICAoZXE/IChtdXRleC1zdGF0ZSBtKSAnbm90LWFiYW5kb25lZCkpKQoKICAocGFzcy1pZiAi Y2FuIHVubG9jayBmcm9tIGFueSB0aHJlYWQiCiAgICAobGV0KiAoKG0gKG1ha2UtbXV0ZXggJ211 dGV4LXVubG9jay0yKSkKCSAgICh0IChtYWtlLXRocmVhZCAobGFtYmRhICgpIChtdXRleC11bmxv Y2shIG0pKSAnbXV0ZXgtdW5sb2NrLTIpKSkKICAgICAgKG11dGV4LWxvY2shIG0pCiAgICAgICh0 aHJlYWQtc3RhcnQhIHQpCiAgICAgICh0aHJlYWQtam9pbiEgdCkKICAgICAgKGVxPyAobXV0ZXgt c3RhdGUgbSkgJ25vdC1hYmFuZG9uZWQpKSkKCiAgKHBhc3MtaWYgIm11dGV4IHVubG9jayBpcyB0 cnVlIHdoZW4gY29uZGl0aW9uIGlzIHNpZ25hbGxlZCIKICAgIChsZXQqICgobSAobWFrZS1tdXRl eCAnbXV0ZXgtdW5sb2NrLTMpKQoJICAgKGMgKG1ha2UtY29uZGl0aW9uLXZhcmlhYmxlICdtdXRl eC11bmxvY2stMykpCgkgICAodCAobWFrZS10aHJlYWQgKGxhbWJkYSAoKSAKCQkJICAgICAobXV0 ZXgtbG9jayEgbSkgCgkJCSAgICAgKGNvbmRpdGlvbi12YXJpYWJsZS1zaWduYWwhIGMpIAoJCQkg ICAgIChtdXRleC11bmxvY2shIG0pKSkpKQogICAgICAobXV0ZXgtbG9jayEgbSkKICAgICAgKHRo cmVhZC1zdGFydCEgdCkKICAgICAgKG11dGV4LXVubG9jayEgbSBjKSkpCgogIChwYXNzLWlmICJt dXRleCB1bmxvY2sgaXMgZmFsc2Ugd2hlbiBjb25kaXRpb24gdGltZXMgb3V0IgogICAgKGxldCog KChtIChtYWtlLW11dGV4ICdtdXRleC11bmxvY2stNCkpCgkgICAoYyAobWFrZS1jb25kaXRpb24t dmFyaWFibGUgJ211dGV4LXVubG9jay00KSkpCiAgICAgICht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ZW0hKSkpKQoJICAgKHQyIChtYWtlLXRocmVhZCAobGFtYmRhICgpIAoJCQkgICAgICAobXV0ZXgt bG9jayEgbTIpCgkJCSAgICAgIChpbmMtc2VtISkKCQkJICAgICAgKG11dGV4LXVubG9jayEgbTIg YzIpCgkJCSAgICAgIChpbmMtc2VtISkpKSkpCiAgICAgICh0aHJlYWQtc3RhcnQhIHQxKQogICAg ICAodGhyZWFkLXN0YXJ0ISB0MikKICAgICAgKGRlYy1zZW0hKQogICAgICAoZGVjLXNlbSEpCiAg ICAgIChtdXRleC1sb2NrISBtMikKICAgICAgKGNvbmRpdGlvbi12YXJpYWJsZS1icm9hZGNhc3Qh IGMyKQogICAgICAobXV0ZXgtdW5sb2NrISBtMikKICAgICAgKGRlYy1zZW0hKQogICAgICAoZGVj LXNlbSEpKSkpCgood2l0aC10ZXN0LXByZWZpeCAidGltZT8iCgogIChwYXNzLWlmICJjdXJyZW50 LXRpbWUgaXMgdGltZSIgKHRpbWU/IChjdXJyZW50LXRpbWUpKSkKICAocGFzcy1pZiAibnVtYmVy IGlzIG5vdCB0aW1lIiAobm90ICh0aW1lPyAxMjMpKSkKICAocGFzcy1pZiAic3ltYm9sIG5vdCB0 aW1lIiAobm90ICh0aW1lPyAnZm9vKSkpKQoKKHdpdGgtdGVzdC1wcmVmaXggInRpbWUtPnNlY29u ZHMiCgogIChwYXNzLWlmICJ0aW1lLT5zZWNvbmRzIG1ha2VzIHRpbWUgaW50byByYXRpb25hbCIK ICAgIChyYXRpb25hbD8gKHRpbWUtPnNlY29uZHMgKGN1cnJlbnQtdGltZSkpKSkKCiAgKHBhc3Mt aWYgInRpbWUtPnNlY29uZHMgaXMgcmV2ZXJzaWJsZSIKICAgIChsZXQgKCh0IChjdXJyZW50LXRp bWUpKSkKICAgICAgKGVxdWFsPyB0IChzZWNvbmRzLT50aW1lICh0aW1lLT5zZWNvbmRzIHQpKSkp KSkKCih3aXRoLXRlc3QtcHJlZml4ICJzZWNvbmRzLT50aW1lIg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ZW50LWV4Y2VwdGlvbi1oYW5kbGVyKSBpKSkpKQoKICAocGFzcy1pZiAiZXhjZXB0aW9uIGhh bmRsZXIgaW5zdGFsbGF0aW9uIGlzIHRocmVhZC1zYWZlIgogICAgKGxldCogKChoMSAoY3VycmVu dC1leGNlcHRpb24taGFuZGxlcikpCgkgICAoaDIgKGxhbWJkYSAoa2V5IC4gYXJncykgJ25vdGhp bmctMikpCgkgICAobSAobWFrZS1tdXRleCAnY3VycmVudC1leGNlcHRpb24taGFuZGxlci00KSkK CSAgIChjIChtYWtlLWNvbmRpdGlvbi12YXJpYWJsZSAnY3VycmVudC1leGNlcHRpb24taGFuZGxl ci00KSkKCSAgICh0IChtYWtlLXRocmVhZCAobGFtYmRhICgpIAoJCQkgICAgICh3aXRoLWV4Y2Vw dGlvbi1oYW5kbGVyIAoJCQkgICAgICBoMiAobGFtYmRhICgpIAoJCQkJICAgKG11dGV4LWxvY2sh IG0pIAoJCQkJICAgKGNvbmRpdGlvbi12YXJpYWJsZS1zaWduYWwhIGMpIAoJCQkJICAgKHdhaXQt Y29uZGl0aW9uLXZhcmlhYmxlIGMgbSkKCQkJCSAgIChhbmQgKGVxPyAoY3VycmVudC1leGNlcHRp b24taGFuZGxlcikgaDIpCgkJCQkJKG11dGV4LXVubG9jayEgbSkpKSkpCgkJCSAgICdjdXJyZW50 LWV4Y2VwdGlvbi1oYW5kbGVyLTQpKSkKICAgICAgKG11dGV4LWxvY2shIG0pCiAgICAgICh0aHJl YWQtc3RhcnQhIHQpCiAgICAgICh3YWl0LWNvbmRpdGlvbi12YXJpYWJsZSBjIG0pCiAgICAgIChh bmQgKGVxPyAoY3VycmVudC1leGNlcHRpb24taGFuZGxlcikgaDEpCgkgICAoY29uZGl0aW9uLXZh cmlhYmxlLXNpZ25hbCEgYykKCSAgIChtdXRleC11bmxvY2shIG0pCgkgICAodGhyZWFkLWpvaW4h IHQpKSkpKQoKKHdpdGgtdGVzdC1wcmVmaXggInVuY2F1Z2h0LWV4Y2VwdGlvbi1yZWFzb24iCgog IChwYXNzLWlmICJpbml0aWFsIGhhbmRsZXIgY2FwdHVyZXMgdG9wIGxldmVsIGV4Y2VwdGlvbiIK ICAgIChsZXQgKCh0IChtYWtlLXRocmVhZCAobGFtYmRhICgpICh0aHJvdyAnZm9vKSkpKQoJICAo c3VjY2VzcyAjZikpCiAgICAgICh0aHJlYWQtc3RhcnQhIHQpCiAgICAgIChjYXRjaCAndW5jYXVn aHQtZXhjZXB0aW9uCgkgICAgIChsYW1iZGEgKCkgKHRocmVhZC1qb2luISB0KSkKCSAgICAgKGxh bWJkYSBhcmdzIAoJICAgICAgIChhbmQgKGVxPyAoY2FyICh1bmNhdWdodC1leGNlcHRpb24tcmVh c29uIGFyZ3MpKSAnZm9vKQoJCSAgICAoc2V0ISBzdWNjZXNzICN0KSkpKQogICAgICBzdWNjZXNz KSkpCgooZXhpdCkK ------=_Part_16972_26741729.1193668653202 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel ------=_Part_16972_26741729.1193668653202--