-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03.05.2013 18:11, Kai Tietz wrote:
> Well int clock_getcpuclockid we miss.  I think it is obvious that we
> would like to provide it, so a patch to clock.c file would be desired
> here.  The patch for an implementation for this function takes for
> sure less time as it took you to collect all those information.  So
> why you weren't providing one in you mail?
> 
> 
> int clock_getcpuclockid(pid_t pid, clockid_t *clock_id)
> {
>   /* TODO: we might want to check pid to verify process.  */
>   (void) pid;
>   *clock_id = CLOCK_PROCESS_CPUTIME_ID;
>   return 0;
> }
> 
> and as we are about it the
This is wrong.
Correct stub is:

int
clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
{
  if (0 == pid)
  {
    /* Calling with 0 pid is the same as using
     * CLOCK_PROCESS_CPUTIME_ID.
     */
    *clock_id = CLOCK_PROCESS_CPUTIME_ID;
    return 0;
  }
  /* Special clock values for getting time of other
   * processes are not supported yet.
   */
  errno = ENOSYS;
  return ENOSYS;
}

Whether it could be correctly implemented or not - i can't tell. Maybe
if you restrict the CLOCK_* constants to a particular range, and then
use "special" pid+CLOCK_PROCESS_MAX_ID constants...that might just work
(as long as pid is less than (MAX_PID_T - CLOCK_PROCESS_MAX_ID)).

- -- 
O< ascii ribbon - stop html email! - www.asciiribbon.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)

iQEcBAEBAgAGBQJRhAlIAAoJEOs4Jb6SI2CwR4oIAIiLnfe0MhR1XcFxXoCQxUfQ
vAlHxdkOXhebCm/6q9LwX/U9j1lkZa7sP7HM4vWS6/L6M/D19c0vQNVoI3FYefga
g0heuQaqCMQPI6xkoYTZEK643l41F8HKWsGVzeIHqmEAzvWIu5U5K1dzDbBekC5g
D1sGDrvUizSH5qtHKxn+d5e846eeMDq5JngsnpZaMeIwA8/cpi9wT+wcneVg9Xt7
ejSI4/ruxOJHUGpIQnkmJizNffESXhpU5A1D3NeIITY/UeXTCa3LkqMXYoFUnpzK
4YsDB0Z/JwI+KBfoFfHz5mbS6DrfjWwPhzjTKnP//6hpAlspPg+LId7tr8PCLHU=
=Jf3g
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to