This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [MTASCsft PATCH WIP5 01/33] Multi Thread, Async Signal and Async Cancel safety documentation: intro


On Nov 20, 2013, Torvald Riegel <triegel@redhat.com> wrote:

> What about linking statically and using LTO?

I've added the following to the definition of MT-Safe.  Does it address
satisfactorily the issues you brought up in this regard?

  A function being MT-Safe does not imply any form of synchronization,
  nor that any combination of calls of MT-Safe functions would be
  regarded as MT-Safe.  For example, having a thread call two MT-Safe
  functions one right after the other does not guarantee behavior
  equivalent to atomic execution of a combination of both functions,
  since concurrent calls in other threads may cause behavior to diverge.

  In some cases, even expanding MT-Safe functions inline could cause
  combinations to become MT-Unsafe due to reordering that this could
  enable; this is never the case of @glibcadj{} functions defined in
  user-visible headers, because these are meant to be inlined, but it
  may be for functions that are exported by @glibcadj{} shared
  libraries; whole-program optimizations that might inline functions
  across library interfaces might expose this sort of problem, so
  performing inlining across the @glibcadj{} interface is not
  recommended, nor is the documented MT-Safety status guaranteed under
  such arrangements.

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]