www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=kZzeDZVxU1oITfgAldSgwD4XTeRdM37b9IM4ho/WfZBdYB1TG9MMG | |
4KPNbYrSFmq0IxhbXdgd60ypzixso63qwe0uD6e6GOGTChQknsM8Bpp7jJ/+bZNU | |
LIwmms9YLn7K8wj0ZD0C2ZckGTL/Mxbb4wvfNyvQ5nuvwvsDrozmQQ= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=ehqQ17k7SQym3bZn5owevKRyb1c=; b=Z8rPUQ0u6no5B0PshVx1OXxrNQjp | |
dpnOFrLoBi9DvGVYzSqI7kUHGmY5qF1ErZlHg7519o0DMPN0H3WbALC2VNpZgddY | |
Psqtf6oHSMsm55qka6dG2G9lvrOIGoQTg0YZliLSEZp4XN/wnr8I5hI87oFjaSm7 | |
IEcuMBIDNJUMKGY= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-5.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 |
X-HELO: | calimero.vinschen.de |
Date: | Tue, 23 Jun 2015 10:41:30 +0200 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Support for ITIMER_PROF? |
Message-ID: | <20150623084130.GA9548@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <5587FA08 DOT 8080404 AT cornell DOT edu> <20150622132541 DOT GA21402 AT calimero DOT vinschen DOT de> <558878FD DOT 3050909 AT cornell DOT edu> |
MIME-Version: | 1.0 |
In-Reply-To: | <558878FD.3050909@cornell.edu> |
User-Agent: | Mutt/1.5.23 (2014-03-12) |
--0F1p//8PRICkK4MW Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Jun 22 17:07, Ken Brown wrote: > On 6/22/2015 9:25 AM, Corinna Vinschen wrote: > >On Jun 22 08:05, Ken Brown wrote: > >>According to the Cygwin API documentation > >>(https://cygwin.com/cygwin-api/std-notes.html), "getitimer and setitimer > >>only support ITIMER_REAL for now." I'm wondering whether there's any c= hance > >>that support for ITIMER_PROF might be added. I have no idea what the > >>obstacles are. > >> > >>My reason for asking is that emacs has a CPU profiling function, which > >>doesn't work on Cygwin because it relies on ITIMER_PROF. (There's an > >>alternative implementation, but it requires timer_getoverrun, also not > >>available in Cygwin.) > > > >Both very tricky. Given the description of timer_getoverrun and how > >this stuff is implemented in Cygwin, you might get away with > > > > #ifdef __CYGWIN__ > > #define timer_getoverrun(x) 0 > > #endif > > > >indepedently of using SIGEV_SIGNAL or SIGEV_THREAD. >=20 > This seems to work. Thanks! >=20 > One question: It seems that SIGEV_SIGNAL and friends are defined as macros > on Linux (or at least on the one Linux distribution I looked at), but on > Cygwin they're only enum constants. And emacs expects them to be defined= as > macros. Would something like the following be reasonable for the sake of > compatibility? >=20 > --- a/winsup/cygwin/include/cygwin/signal.h > +++ b/winsup/cygwin/include/cygwin/signal.h > @@ -311,6 +311,10 @@ enum > perform notification */ > }; >=20 > +#define SIGEV_SIGNAL SIGEV_SIGNAL > +#define SIGEV_NONE SIGEV_NONE > +#define SIGEV_THREAD SIGEV_THREAD > + > #if __WORDSIZE =3D=3D 64 > typedef __uint64_t sigset_t; > #else Sure. I applied the patch. Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --0F1p//8PRICkK4MW Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJViRu6AAoJEPU2Bp2uRE+gq5EP/i4A0C4RLW4srLckX5LrPiQ2 m1lYXAeT0uuPppFgtYsIEXahdecm9Ee1x1lERNn2ekPP5HNkPIMGC/T4MB9hruW5 SSGXwz9qzs32o+CA2UMEDU+lemTRVrSZuSxXffL2pFWqlieTRmiGGC0423o4E7Il GFiNFyWh9N4OovSEW2PZVGmon+tLU7Bw2DDlFJuPBXWvx+AZjeT4DbQS5m9xiM7S qRC2LmOzbVqacFrKWOgFdnr/S2KkplLte0BDipc3dp+5paoQDydVB002z//MPE3S LK6fM2kBypiXE9/aEX0Xq4084Hp0ZhorRVm9WanyWwyDqHbniUjwJ/u+ccsPxK7x L2B6/AV0ZyBSEmnOZsmuYGBW05k61PQnAj5aeZnVKZVXWQFnaHMInkEBvGBiM0FG PItsry9NtLSfmo9KVkrfI4eFwZw5OndD9PdxujZ+zip2a9pzxDs9EgtFHn0nrXv7 WvM8ZYeJe+ehvSJPSiAimzS2qd/X7sAF0rwWTALjPlsR/PQl0w51HXyGVIEj+siP NkqKzr3W05TRcM0TgnJiTCNjDFbfEuetlBpxXSHR2WcEHz4E41FkUGAhtIXex3an oF3zQBtAmzj9wew6fbaqzaE/AyCLU0kIqwn1+zPNDKMZgCoItM3BADjmD36jIlfd TbGZYvR7gHz6XVekOoUC =WL1o -----END PGP SIGNATURE----- --0F1p//8PRICkK4MW--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |