On Mon, 28 Jun 2021 12:41:35 GMT, David Holmes <david.hol...@oracle.com> wrote:
> > You'd do: > > print("nid: " UINT64_FORMAT, (uint64_t) id):; > > thread_t is, among other things, pthread_t, which is opaque. Any current > > code treating that as signed int is incorrect too. > > If it is opaque then I don't see how signed or unsigned makes any > difference. You are assuming it can just be treated as a 64-bit value; > whether you interpret that as a signed or unsigned value just changes > how you print it. I agree printing only positive values is nicer visually. > > David My `signed in` comment was referring to the existing use of `%d` in the code base. I'm more concerned with the 32bit range of int than the signedness (though I never saw an OS tool displaying negative numbers for thread ids). ------------- PR: https://git.openjdk.java.net/jdk/pull/4449