[[!meta copyright="Copyright © 2012, 2013 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled [[GNU Free Documentation License|/fdl]]."]]"""]] [[!meta title="libpthread: CLOCK_MONOTONIC"]] [[!tag open_issue_glibc open_issue_libpthread]] [[!message-id "201204220058.37328.toscano.pino@tiscali.it"]] # IRC, freenode, #hurd, 2012-04-22 youpi: what i thought would be creating a glib/hurd/hurdtime.{c,h}, adding _hurd_gettimeofday and _hurd_clock_{gettime,settime,getres} to it and making the current .c in sysdeps call those yep that's unfortunate, but that's what nptl actually does this way we could add inside hurdtime.c the mapped time stuff too [[Mapped-time_interface|microkernel/mach/gnumach/interface/device/time]]. most probably a noobish question, but why does rt link to pthread? no idea :) possibly due to aio implementation ./sysdeps/pthread/aio_cancel.c probably due to that (and others) ## IRC, freenode, #hurd, 2012-04-23 pinotree: about librt vs libpthread, don't worry too much for now libpthread can lib against the already-installed librt it does work youpi: wouldn't that cause a dependency loop? pinotree: what dependency loop? youpi: librt wouldd link to pthread, no? and ? I don't think it's an issue that .so link with each other it isn't? well, try * pinotree never did that but I don't think it will pose problem well, perhaps initialization order anyway, I now have packages built, I'll test that pinotree: ok, it seems it doesn't work indeed :) early in initialization pinotree: the initialization bug might actually not be due to librt at all pinotree: yes, things work even with -lrt wow ## IRC, OFTC, #debian-hurd, 2012-06-04 pinotree: -lrt in libpthread is what is breaking glib2.0 during ./configure it makes clock_gettime linked in, while at library link it doesn't probably for obscure reasons I'll have to disable it in debian ### IRC, OFTC, #debian-hurd, 2012-06-05 youpi: i saw your message about the linking issues with pthread/rt; do you want me to provide a patch to switch clock_gettime → gettimeofday in libpthread? you mean switch it back as it was previously? kind of, yes I have reverted the change in libc for now ok ## IRC, freenode, #hurd, 2012-07-22 pinotree, youpi: I once saw you discussing issue with librt usage is libpthread -- is it this issue? http://sourceware.org/PR14304 tschwinge: (librt): no it's the converse tschwinge: kind of unexpectedly loading libpthread is almost never a problem it's unexpectedly loading librt which was a problem for glib tschwinge: basically what happened with glib is that at configure time, it could find clock_gettime without any -lrt, because of pulling -lpthread, but at link time that wouldn't happen ## IRC, freenode, #hurd, 2012-07-23 pinotree: oh, i see you changed __pthread_timedblock to use clock_gettime i wonder if i should do the same in libthreads yeah, i realized later it was a bad move ok i'll stick to gettimeofday for now it'll be safe when implementing some private __hurd_clock_get{time,res} in libc proper, making librt just forward to it and adapting the gettimeofday to use it ## IRC, freenode, #hurd, 2012-10-22 youpi: apparently somebody in glibc land is indirectly solving our "libpthread needs lirt which pulls libphtread" circular issue by moving the clock_* functions to libc proper I've seen that yes :) [[!sourceware_PR 14304]], [[!sourceware_PR 14743]], [[!message-id "CAH6eHdQRyTgkXE7k+UVpaObNTOZf7QF_fNoU-bqbMhfzXxXUDg@mail.gmail.com"]], commit 6e6249d0b461b952d0f544792372663feb6d792a (2012-10-24).