tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pthread2lwp API



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 23.04.2016 15:01, Martin Husemann wrote:
> On Sat, Apr 23, 2016 at 12:53:15PM +0000, Christos Zoulas wrote:
>>> That is a lot cleaner, though the Posix description of 
>>> pthread_getcpuclockid is not explaining the semantics of that
>>> clock (or I am overlooking it?)
>> 
>> This is not hard to do...
> 
> Yes but I was wondering if the "cpu" in the function name would
> imply anything (like effects of cpu speed changes being considered
> or whatever), and I could not find any explanation in posix.
> 
> If we assume that this is just a way to access the per-lwp
> statistics, it should indeed be simple.
> 
> Martin
> 

The pthread_getcpuclockid() function shall return in clock_id the
clock ID of the CPU-time clock of the thread specified by thread_id,
if the thread specified by thread_id exists.

- --
https://man-k.org/man/posix/3P/pthread_getcpuclockid?r=1&q=pthread_getcp
uclockid


There is a sibling POSIX call clock_getcpuclockid():

 The clock_getcpuclockid() function shall return the clock ID of the
CPU-time clock of the process specified by pid. If the process
described by pid exists and the calling process has permission, the
clock ID of this clock shall be returned in clock_id.

If pid is zero, the clock_getcpuclockid() function shall return the
clock ID of the CPU-time clock of the process making the call, in
clock_id.

The conditions under which one process has permission to obtain the
CPU-time clock ID of other processes are implementation-defined.

- --
https://man-k.org/man/posix/3P/clock_getcpuclockid?r=1&q=clock_getcpuclo
ckid
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJXG3XzAAoJEEuzCOmwLnZsZ/kP/iTjFEhgrtara4aUZ2MzFIjU
SctUNy5VhMC1rciKAEexE7QRB6wnGv7HCgAPInl2ioWlv2WQ9jLEwsesj0LsWYVj
d2fTYDbzSL3FebnRCnBCtEi8WHkAXrazm9Ogo2UyWHnX4lsAj8h0ZDHWzBVFaomR
qA5R5d0IVn1CBeXJz/BT+EnTuNx3HSpfSeNEavZcjUbyoZyZpdDrkhrGCyAkOYmE
DsMemXMzm35g1fe+a6e+W50EJ7Gwu3W8cw5emE9SSdS5iwD7xDG1Wai2g/tGG/j0
sLf1hStETwrxzZoEF17lw22Dtz9vVde3rviz4qnd95mMkUbS/qHCvefIrB8ta1Mh
k4C+YmnuIM+CEd4f7ot8Ok7cy2qCATVKP69GJuh8sc7uQcHyEeB9HeYU0NsC3D/r
0FrAcP6fUl3/67msw4BHfs1J6CAl3yi2vwTG1+lQVFOg/u1ADH1Eu3CKBmHFG/6N
nnf0wfyCPLa1cIgbbAkkKtVch83NSRXDLsyhaIQkHUJa1xYmW1LSrvSkUkQuuq96
UnIkCe167+LTg96XLDoG8TXAuYfNmecf0T+I4MZFl4e2yGMKvMHwx3S408DP42tL
KBOs9U8tRjSBDBg/OUEF2E9GE40yriG1RZnzZ0Q9V0Nesh2ULHf1J7njGdVw5vwG
6pqTcGQB+bm4jaKkXxO1
=OdEr
-----END PGP SIGNATURE-----


Home | Main Index | Thread Index | Old Index